RFR 7162400: Intermittent java.io.IOException: Bad file number during HotSpotVirtualMachine.executeCommand

Peter Allwin peter.allwin at oracle.com
Tue Jul 9 05:26:21 PDT 2013


Oh my bad, I'll update the webrev.

 

Thanks!

 

/peter

 

From: Daniel D. Daugherty [mailto:daniel.daugherty at oracle.com] 
Sent: Tuesday, July 9, 2013 12:28 AM
To: Peter Allwin
Cc: serviceability-dev at openjdk.java.net;
hotspot-runtime-dev at openjdk.java.net
Subject: Re: RFR 7162400: Intermittent java.io.IOException: Bad file number
during HotSpotVirtualMachine.executeCommand

 

On 7/8/13 7:54 AM, Peter Allwin wrote:



Hello!

 

Looking for reviews of this change:

http://cr.openjdk.java.net/~allwin/7162400/webrev.01/
<http://cr.openjdk.java.net/%7Eallwin/7162400/webrev.01/> 


src/share/vm/services/attachListener.hpp
    No comments.

src/os/bsd/vm/attachListener_bsd.cpp
    line 443: // an attaching process to think we are ready to recieve on
the
        typo: 'recieve'
           -> 'receive'

src/os/linux/vm/attachListener_linux.cpp
    line 438: // an attaching process to think we are ready to recieve on
the
        typo: 'recieve'
           -> 'receive'

src/os/solaris/vm/attachListener_solaris.cpp
    line 582: // an attaching process to think we are ready to recieve a
door_call
        typo: 'recieve'
           -> 'receive'

src/os/windows/vm/attachListener_windows.cpp
    No comments.

src/share/vm/runtime/thread.cpp
    No comments.


Thumbs up.

Dan






 

For CR:

http://bugs.sun.com/view_bug.do?bug_id=7162400

https://jbs.oracle.com/bugs/browse/JDK-7162400

 

Summary:

This change addresses an issue in the Attach API on Solaris, Linux and BSD
where an attaching application can receive IOExceptions such as "Bad file
number" (Solaris), "Connection refused" (Linux/BSD), or "well-known file is
not secure". 

 

The attach process uses a file in the temporary directory as a door
(Solaris) or domain socket (Linux,BSD) to communicate with the VM. In
certain circumstances stale files can be left in the file system which can
cause the attaching application to believe that the VM is ready to receive a
connection when it's not. With this change the stale file will be removed
during VM startup.

 

Note that there is still an issue if we don't have permission to remove the
stale file, the attaching process will fail to connect.

 

 

Testing:

JPRT, reproducing script on Solaris, Linux.

 

Credits:

Thanks to Staffan Larsen who worked on this issue with me.

 

 

 

Regards,




Peter

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/attachments/20130709/dbb2251f/attachment.html 


More information about the hotspot-runtime-dev mailing list