RFR: JDK-8235211: serviceability/attach/RemovingUnixDomainSocketTest.java fails with AttachNotSupportedException: Unable to open socket file

Alex Menkov alexey.menkov at oracle.com
Sat May 9 01:14:32 UTC 2020


Hi all,

please review the fix for
https://bugs.openjdk.java.net/browse/JDK-8235211
webrev:
http://cr.openjdk.java.net/~amenkov/jdk15/RemovingUnixDomainSocket/webrev/

Test failures are caused by deadlock during attach listener restarting:
check_socket_file function aborts socket listening and waits while 
attach listener state becomes AL_NOT_INITIALIZED (it happens when 
AttachListener::dequeue returns NULL).
AttachListener::dequeue method is blocked in ThreadBlockInVM dtor.
To solve it ThreadBlockInVM was added inside waiting cycle in 
check_socket_file.

Other changes:
- made _listener (and _shutdown for aix) volatile as they are used by 2 
threads (attach listener thread and signal handler thread) without 
synchronization;
- added close() for listening socket on aix (before it had only 
shutdown() for it);
- additional logging and some cleanup in the test;
- added handling of LingeredApp hang.

--alex


More information about the serviceability-dev mailing list