JDK-8343344 : Windows attach logic failed to handle a failed open on a pipe
  • Type: Bug
  • Component: hotspot
  • Sub-Component: svc
  • Affected Version: 24
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: windows
  • Submitted: 2024-10-31
  • Updated: 2024-11-08
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 24
24Unresolved
Related Reports
Relates :  
Relates :  
Description
[stress.process.out] [1604.409s][error][attach] could not open (2) pipe \\\\.\\pipe\\javatool-612134031
[stress.process.out] #
[stress.process.out] # A fatal error has been detected by the Java Runtime Environment:
[stress.process.out] #
[stress.process.out] #  Internal Error (c:\\sb\\prod\\1730331883\\workspace\\open\\src\\hotspot\\os\\windows\\attachListener_windows.cpp:114), pid=18460, tid=24856
[stress.process.out] #  assert(opened()) failed: must be
[stress.process.out] #
[stress.process.out] # JRE version: Java(TM) SE Runtime Environment (24.0+22) (fastdebug build 24-ea+22-2644)
[stress.process.out] # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 24-ea+22-2644, compiled mode, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)

We log the fact we couldn't open the pipe but then assert it is open. Need to check the error handling logic.


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

Current thread (0x000002257f8643b0):  JavaThread "Attach Listener" daemon [_thread_blocked, id=24856, stack(0x000000dbf8200000,0x000000dbf8300000) (1024K)]

Stack: [0x000000dbf8200000,0x000000dbf8300000]
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [jvm.dll+0xd06c01]  os::win32::platform_print_native_stack+0x101  (os_windows_x86.cpp:235)
V  [jvm.dll+0xfd2532]  VMError::report+0x14b2  (vmError.cpp:1015)
V  [jvm.dll+0xfd4bad]  VMError::report_and_die+0x80d  (vmError.cpp:1850)
V  [jvm.dll+0xfd52b4]  VMError::report_and_die+0x64  (vmError.cpp:1615)
V  [jvm.dll+0x59f84b]  report_vm_error+0x5b  (debug.cpp:193)
V  [jvm.dll+0x30a3ac]  PipeChannel::write+0x7c  (attachListener_windows.cpp:114)
V  [jvm.dll+0x30912e]  AttachOperation::write_reply+0x7e  (attachListener.cpp:676)
V  [jvm.dll+0x309709]  Win32AttachOperation::complete+0x69  (attachListener_windows.cpp:428)
V  [jvm.dll+0x308eba]  AttachListenerThread::thread_entry+0x1da  (attachListener.cpp:472)
V  [jvm.dll+0x867876]  JavaThread::thread_main_inner+0x266  (javaThread.cpp:760)
V  [jvm.dll+0xf33264]  Thread::call_run+0x1b4  (thread.cpp:239)
V  [jvm.dll+0xd05267]  thread_native_entry+0xd7  (os_windows.cpp:554)
C  [ucrtbase.dll+0x2268a]  (no source info available)
C  [KERNEL32.DLL+0x17ac4]  (no source info available)
C  [ntdll.dll+0x5a4e1]  (no source info available)
Comments
A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/21888 Date: 2024-11-05 00:42:23 +0000
05-11-2024

Log contains: [1604.409s][error][attach] could not open (2) pipe \\\\.\\pipe\\javatool-612134031 # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (c:\\sb\\prod\\1730331883\\workspace\\open\\src\\hotspot\\os\\windows\\attachListener_windows.cpp:114), pid=18460, tid=24856 # assert(opened()) failed: must be 2 == ERROR_FILE_NOT_FOUND hs_err stack: V [jvm.dll+0x59f84b] report_vm_error+0x5b (debug.cpp:193) V [jvm.dll+0x30a3ac] PipeChannel::write+0x7c (attachListener_windows.cpp:114) V [jvm.dll+0x30912e] AttachOperation::write_reply+0x7e (attachListener.cpp:676) V [jvm.dll+0x309709] Win32AttachOperation::complete+0x69 (attachListener_windows.cpp:428) V [jvm.dll+0x308eba] AttachListenerThread::thread_entry+0x1da (attachListener.cpp:472) V [jvm.dll+0x867876] JavaThread::thread_main_inner+0x266 (javaThread.cpp:760) V [jvm.dll+0xf33264] Thread::call_run+0x1b4 (thread.cpp:239) V [jvm.dll+0xd05267] thread_native_entry+0xd7 (os_windows.cpp:554) The assert is: src/hotspot/os/windows/attachListener_windows.cpp 113 int write(const void* buffer, int size) override { 114 assert(opened(), "must be"); Win32AttachOperation::complete() is being called when the earlier PipeChannel::open() failed. Win32AttachOperation:open_pipe could have its operations (read_request and complete) check _pipe is OK first.
31-10-2024