On Wed, 18 Mar 2026 15:44:24 GMT, Kevin Walls <[email protected]> wrote:

>> I removed unused return value `replaced`.
>> 
>> The simplified version is not equivalent - e.g. when `10 <= count <= 20`, 
>> the behavior depends on early `replacing` value.
>
> I tested this version and it still causes the crash, so we can make the 
> change if you like.
> As long as replaceThreads() gets called we cause trouble.
> Actually this loop can be simpler:
> 
> 139             while (true) {
> 140                 replaceThreads(ids, infos);
> 141                 goSleep(1);
> 142             }
> 
> 
> My earlier experiment used hundreds of threads, finishing at different times, 
> and would stop replacing threads if there were many alive.  But we only need 
> a few threads active to cause the problem quite reliably.  So it can just 
> continually keep trying to replace threads, and it is enough to cause the 
> crash.
> 
> The sleep was to yield and make sure other threads got a chance to crash us.  
> It it still required.

(so replaceThreads does not need to return anything, more simplification).
Apologies the file attached to the bug was not polished. 8-)

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/30105#discussion_r2954421332

Reply via email to