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

Chris Plummer chris.plummer at oracle.com
Mon May 11 17:41:58 UTC 2020


Hi Alex,

  228             // if for a reason the app hangs, we don't want to 
wait test timeout
  229             if 
(!appProcess.waitFor(Utils.adjustTimeout(appWaitTime), TimeUnit.SECONDS)) {

Can you fix the comment. Maybe:

  228             // If the app hangs, we don't want to wait for the to 
test timeout.

And your use of appWaitTime had me look for other uses, and I noticed a 
pre-existing comment there that could use some work. Perhaps you can 
clean it up with this RFR.

  273      * Waits the application to start with the default timeout.

Should be "Waits for the application..."

thanks,

Chris

On 5/8/20 6:14 PM, Alex Menkov wrote:
> 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