Code Review 6988618: JCK test setDaemon0101 hangs on specific machine

Chris Hegarty chris.hegarty at
Thu Nov 4 14:57:24 UTC 2010

On 04/11/2010 12:13, Alan Bateman wrote:
> Chris Hegarty wrote:
>> David, Alan,
>> There is a race, if the thread being created completes before the
>> starting thread has a chance to complete its start method ( and
>> decrement the groups nUnstartedThreads count ), then when the newly
>> started threads exit method notifies the group that it is terminating
>> the group will not be destroyed because it believes it still as an
>> unstarted thread in it.
>> Basically we decrement the unstarted thread count in threadStarting.
>> Since the thread is added to the group the reason for the unstarted
>> thread count is no longer applicable, i.e. the thread is a real member
>> of the group. We rectify the unstarted thread count if start fails,
>> allowing a subsequent attempt to start the thread (this is consistent
>> with current behavior).
>> Webrev:
>> Thanks,
>> -Chris.
> Looks good to me. Do you think it would be feasible to include a
> regression test or would it be too problematic?

Creating a reliable test would be problematic. I'll proceed with the 
changes as they are. Thanks for the review.


> -Alan

More information about the core-libs-dev mailing list