RFR 8069048: (process) Suspend finishing threads when process exits [win]
ivan.gerasimov at oracle.com
Thu Jan 15 12:09:15 UTC 2015
This is yet another iteration in the attempt to solve the 'wrong exit
code' bug on Windows .
The wrong exit code has been observed once again with one of the
The suspicion is that this might be due to the critical section had been
destroyed before all the children threads were terminated.
In that case, one of the threads had been unblocked and called
_endthreadex(), which resulted in a race.
To address this scenario, it is proposed to make the thread that is
about to exit the process raise a flag.
If the flag is raised, any threads wishing to exit should instead
More information about the hotspot-runtime-dev