While screwing around with some random pthread test programs, I noticed I
kept getting this assertion failure:
#0 0x00007ffff4be9a75 in *__GI_raise (sig=<value optimized out>) at
../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1 0x00007ffff4bed5c0 in *__GI_abort () at abort.c:92
#2 0x00007ffff4be2941 in *__GI___assert_fail (assertion=0x732043
"physreg->data", file=<value optimized out>, line=2181, function=0x7324a0
"int OutOfOrderModel::ReorderBufferEntry::commit()")
at assert.c:81
#3 0x0000000000618923 in OutOfOrderModel::ReorderBufferEntry::commit
(this=0x26b81f8) at ptlsim/build/core/ooopipe.cpp:2181
#4 0x000000000061936f in OutOfOrderModel::ThreadContext::commit
(this=0x26b6630) at ptlsim/build/core/ooopipe.cpp:1685
#5 0x00000000005eb7c3 in OutOfOrderModel::OutOfOrderCore::runcycle
(this=0x272cdb0) at ptlsim/build/core/ooocore.cpp:497
#6 0x00000000005ec2e8 in OutOfOrderModel::OutOfOrderMachine::run
(this=0x162c2c0, config=...) at ptlsim/build/core/ooocore.cpp:2061
#7 0x000000000063bce6 in ptl_simulate () at
ptlsim/build/sim/ptlsim.cpp:1059
#8 0x00000000005a7e56 in sim_cpu_exec () at qemu/cpu-exec.c:302
#9 0x0000000000419e73 in main_loop (argc=0, argv=<value optimized out>,
envp=<value optimized out>) at qemu/vl.c:4246
#10 main (argc=0, argv=<value optimized out>, envp=<value optimized out>) at
qemu/vl.c:6234
The code that generates this error is trivial (create two pthreads that do
busy work and then call join and print out the thread id and cpu id), but
I've noticed that if I take out the call to sched_getcpu(), the failure goes
away.
Probably not a huge deal since I have no idea what kind of magic
sched_getcpu() is doing, but just in case others stumble on this problem.
I can post the user code if anyone is interested too.
-Paul
_______________________________________________
http://www.marss86.org
Marss86-Devel mailing list
[email protected]
https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel