[jdk17u-dev] Withdrawn: 8340547: Starting many threads can delay safepoints

duke duke at openjdk.org
Mon Mar 31 13:35:22 UTC 2025


On Mon, 3 Feb 2025 08:36:12 GMT, Sergey Nazarkin <snazarki at openjdk.org> wrote:

> I'd like to backport this fix to fix the issue with starting a lot of threads in a burst. 
> 
> Despite the low priority of this issue, some users have found this to be a barrier to migrating from JDK8. 
> 
> The backport is not clean as it needs to adjust `globals.hpp` and replace `ConditionalMutexLocker` with classic MutexLocker. The rank `nonleaf` of `UseThreadsLockThrottleLock` has been chosen to be as close as possible to the rank of `Threads_lock` and to not cause a crash in debug mode:
> 
> #  Internal Error (/home/ubuntu/jdk17u-dev/src/hotspot/share/runtime/mutex.cpp:398), pid=1777, tid=1782
> #  assert(false) failed: Attempting to acquire lock Threads_lock/22 out of order with lock ThreadsLockThrottle_lock/22 -- possible deadlock
> 
> 
> Field `_allow_vm_block` is set to `false` to prevent 
> 
> #  Internal Error (/home/ubuntu/jdk17u-dev/src/hotspot/share/runtime/thread.cpp:981), pid=56846, tid=56851
> #  assert(false) failed: Possible safepoint reached by thread that does not allow it
> 
> 
> Similar PR is on review at [jdk21](https://github.com/openjdk/jdk21u-dev/pull/1365)
> Original fix and discussion are https://github.com/openjdk/jdk/pull/21111
> 
> Tested with tier1 (release), tier2(fastdebug), and reproducers from [JDK-8340547](https://bugs.openjdk.org/browse/JDK-8340547), [JDK-8307970](https://bugs.openjdk.org/browse/JDK-8307970)

This pull request has been closed without being integrated.

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

PR: https://git.openjdk.org/jdk17u-dev/pull/3263


More information about the jdk-updates-dev mailing list