RFR: 8290043: serviceability/attach/ConcAttachTest.java failed "guarantee(!CheckJNICalls) failed: Attached JNI thread exited without being detached" [v2]

David Holmes dholmes at openjdk.org
Fri Jan 10 01:43:17 UTC 2025


> This bug was introduced by [JDK-8252921](https://bugs.openjdk.org/browse/JDK-8252921) which moved the unregister call from the thread destructor (because it was not called for all threads) to the post_run() method. But this totally overlooked native threads that attach and detach! This is easily fixed by moving the unregister call to the end of JavaThread::exit.
> 
> We also update the ProblemList and disable -Xcheck:JNI for a test that does actually terminate threads without detaching.
> 
> Testing: tiers 1-4
> 
> Thanks.

David Holmes has updated the pull request incrementally with three additional commits since the last revision:

 - Fixup
 - Merge branch '8290043-guarantee' of github.com:dholmes-ora/jdk into 8290043-guarantee
 - Take 2

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/22924/files
  - new: https://git.openjdk.org/jdk/pull/22924/files/68c0ed3e..4bd26648

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=22924&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=22924&range=00-01

  Stats: 12 lines in 3 files changed: 7 ins; 2 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/22924.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/22924/head:pull/22924

PR: https://git.openjdk.org/jdk/pull/22924


More information about the hotspot-runtime-dev mailing list