RFR 8069048: (process) Suspend finishing threads when process exits [win]
Ivan Gerasimov
ivan.gerasimov at oracle.com
Thu Jan 15 12:09:15 UTC 2015
Hello everyone!
This is yet another iteration in the attempt to solve the 'wrong exit
code' bug on Windows [1].
The wrong exit code has been observed once again with one of the
regression tests.
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
suspend themselves.
BUGURL: https://bugs.openjdk.java.net/browse/JDK-8069048
WEBREV: http://cr.openjdk.java.net/~igerasim/8069048/0/webrev/
[1] https://bugs.openjdk.java.net/browse/JDK-6573254
Sincerely yours,
Ivan
More information about the serviceability-dev
mailing list