You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The failure is flaky: if you modify the program slightly to simplify useless bits like the printfs in the thread, then it starts working again. Increasing the number of cores often makes it fail again however.
cirosantilli
changed the title
gem5 user mode running userland/posix/pthread_self.c with 2 or more pthreads fails with "simulate() limit reached"
gem5 se.py user mode running userland/posix/pthread_self.c with 2 or more pthreads fails with "simulate() limit reached"
Jul 22, 2019
Fix proposed at: https://gem5-review.googlesource.com/c/public/gem5/+/21606
At lkmc 3d0cc60 and gem5/gem5@08c79a1 file https://github.com/cirosantilli/linux-kernel-module-cheat/blob/3d0cc6014baa6dddb4dfa25b656ba37c5e1540d1/userland/posix/pthread_self.c should spawn 2 trivial threads that just print their IDs:
However, simulation fails with:
It works if we span just one thread:
The failure is flaky: if you modify the program slightly to simplify useless bits like the printfs in the thread, then it starts working again. Increasing the number of cores often makes it fail again however.
With:
we see:
Then on the kernel:
so the address is 4805768 for all calls,128 is WAIT and 129 WAKE, all timeouts are NULL, uaddr2 and val3 are ignored for both calls.
The return value of all WAIT was 0, which means "Returns 0 if the caller was woken up.", and of wall WAKE was 1, which means 1 caller was woken up.
All WAKE calls have val 1, which means wake up one thread. All WAIT calls have 2, which for all calls matches
*4805768
.So the entire execution can be summarized as:
TODO after 0 and 2 WAIT, 1 does WAKE, and both 0 and 2 seem to WAKE?
The text was updated successfully, but these errors were encountered: