JDK-8356177 : Regression after JDK-8352180
  • Type: Bug
  • Component: hotspot
  • Sub-Component: svc
  • Affected Version: 25
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2025-05-05
  • Updated: 2025-05-29
  • Resolved: 2025-05-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 25
25 b24Fixed
Related Reports
Causes :  
Description
https://bugs.openjdk.org/browse/JDK-8352180 added a ThreadBlockInVM in `PipeChannel::close()`, which in turn is called from the PipeChannel destructor.  We may delete a `Win32AttachOperation` and call this destructor from Win32AttachListener::dequeue() with an open pipe. And as the thread is already block at this point, we will try to enter blocked from blocked.

```
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (runtime/interfaceSupport.inline.hpp:111), pid=10844, tid=2304
#  assert(thread->thread_state() == _thread_in_vm) failed: coming from wrong thread state
#
# JRE version: Java(TM) SE Runtime Environment (25.0) (fastdebug build 25-internal-LTS-2025-05-05-0743130.axel.boldt-christmas.zgc)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 25-internal-LTS-2025-05-05-0743130.axel.boldt-christmas.zgc, compiled mode, compressed class ptrs, z gc, windows-amd64)
# Problematic frame:
# V  [jvm.dll+0x38716b]  ThreadBlockInVM::ThreadBlockInVM+0xfb
#

---------------  T H R E A D  ---------------

Current thread (0x00000229e12a06d0):  JavaThread "Attach Listener" daemon [_thread_blocked, id=2304, stack(0x0000009641e00000,0x0000009641f00000) (1024K)]

Stack: [0x0000009641e00000,0x0000009641f00000],  sp=0x0000009641eff9a0,  free space=1022k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [jvm.dll+0x38716b]  ThreadBlockInVM::ThreadBlockInVM+0xfb  (interfaceSupport.inline.hpp:226)
V  [jvm.dll+0x387480]  PipeChannel::~PipeChannel+0x40  (attachListener_windows.cpp:70)
V  [jvm.dll+0x38751c]  Win32AttachOperation::`scalar deleting destructor'+0x1c  (no source info available)
V  [jvm.dll+0x387803]  Win32AttachListener::dequeue+0x1e3  (attachListener_windows.cpp:417)
V  [jvm.dll+0x3875dc]  AttachListener::dequeue+0x3c  (attachListener_windows.cpp:449)
V  [jvm.dll+0x386cb6]  AttachListenerThread::thread_entry+0x4d6  (attachListener.cpp:607)
V  [jvm.dll+0x918188]  JavaThread::thread_main_inner+0x288  (javaThread.cpp:774)
V  [jvm.dll+0x1001e02]  Thread::call_run+0x1b2  (thread.cpp:236)
V  [jvm.dll+0xdc2891]  thread_native_entry+0xe1  (os_windows.cpp:564)
C  [ucrtbase.dll+0x26b4c]  (no source info available)
C  [KERNEL32.DLL+0x14cb0]  (no source info available)
C  [ntdll.dll+0x7edcb]  (no source info available)
```
Comments
Changeset: fe790cb3 Branch: master Author: Alex Menkov <amenkov@openjdk.org> Date: 2025-05-15 20:39:48 +0000 URL: https://git.openjdk.org/jdk/commit/fe790cb319243dc381f5f12f9010e33681ecb17a
15-05-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/25219 Date: 2025-05-13 20:49:14 +0000
13-05-2025