Closed dmik closed 4 years ago
I've also once caught the following error:
ERROR: test 12: done threads 24, not 25
Looks like on SMP the thread done counter value is not updated for the main thread after being increased by one of the aux threads. I will use GCC atomics for both incrementing and reading it as a fix.
While working on #77, I found that the following sometimes happens when running
tst-spawn2
in debug mode several times in a raw (3 times is usually enough to trigger it):This is the stats from the last LIBCx process (the parent test case). It asserts because shared LIBCx memory heap is still in use (
Heap size used now: 1960 bytes
) while it must be completely free when the last LIBCx process is about to terminate.It doesn't seem to be related to #77 directly as even with the old code it sometimes spits this. I suspect there is some shared memory leak somewhere or such. Most likely, during the multi-thtreaded testcase #12 which starts 25 processes simultaneously at 25 threads. This creates an insane race somewhere it seems and some struct is not properly released or the heap headers are not properly updated.