JDK-7162400 : Intermittent java.io.IOException: Bad file number during HotSpotVirtualMachine.executeCommand
  • Type: Bug
  • Component: hotspot
  • Sub-Component: svc
  • Affected Version: hs24,hs25
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris
  • CPU: generic
  • Submitted: 2012-04-18
  • Updated: 2014-01-14
  • Resolved: 2013-07-12
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 7 JDK 8 Other
7u40Fixed 8Fixed hs24Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Description
Intermittent java.io.IOException: Bad file number during HotSpotVirtualMachine.executeCommand on Solaris.

java.io.IOException: Bad file number
        at sun.tools.attach.SolarisVirtualMachine.enqueue(Native Method)
        at sun.tools.attach.SolarisVirtualMachine.execute(SolarisVirtualMachine.java:131)
        at sun.tools.attach.HotSpotVirtualMachine.executeCommand(HotSpotVirtualMachine.java:217)
        at sun.tools.attach.HotSpotVirtualMachine.remoteDataDump(HotSpotVirtualMachine.java:174)
We should investigate further, but time is slipping for 7u6. Suggest defer for 7u8 so we can get a grip on it. We already have an engineer assigned, so we're not afraid that it will slip under radar.

Ok to defer to 7u8
dev /nloodin
sqe / ctornqvi

Comments
A straggler from Promotion testing of JDK8_b99 RULE closed/com/oracle/jfr/jcmd/TestJcmdStartWithOptions.java Exception java.io.IOException: Bad file number
02-08-2013

Just a couple of stragglers (Promotion JDK8 b97) RULE nsk/aod/VirtualMachine/VirtualMachine04 Exception java.io.IOException: Bad file number (PIT JDK7u40-b43) RULE nsk/aod/VirtualMachine/VirtualMachine08 Exception java.io.IOException: Bad file number RULE nsk/aod/VirtualMachine/VirtualMachine09 Exception java.io.IOException: Bad file number RULE com/sun/jdi/ProcessAttachTest.sh Exception java.io.IOException: Bad file number
16-07-2013

I've added the "noreg-hard" label as it is hard to reproduce this issue. The setup for such a test has to be pretty complex and includes at least two VM launches. Also we really don't know in what conditions we usually get stale door files.
08-07-2013

Seen in: runtime/NMT/BaselineWithParameter.java runtime/NMT/JcmdWithNMTDisabled.java runtime/NMT/SummaryAfterShutdown.java
02-07-2013

This is the same issue as JDK-8001464 on Linux.
01-07-2013

This issue is due to stale .java_pid-files in /tmp/. We're working on a fix but meanwhile an 'rm -f /tmp/.java_pid*' on the affected machines will go a long way to mitigating the problem.
28-06-2013

closed/com/oracle/jfr/jcmd/TestJcmdDump.java also failed like this in PIT of HS24 b48 for JDK7u40 b29 (2013-06-10)
11-06-2013

ILW MHH -> P2 I: Medium, intermittent noise in testing L: High, seems to happen often enough W: High
11-06-2013

runtime/NMT/AllocTestType.java runtime/NMT/ThreadedMallocTestType.java
05-04-2013

Just saw this in a couple more tests: nsk/jdi/AttachingConnector/attach/attach004, http://vmsqe-app.russia.sun.com/surl/RJ nsk/jdi/AttachingConnector/attachnosuspend/attachnosuspend002, http://vmsqe-app.russia.sun.com/surl/RK Here, the only exception in the test log is: [2013-02-02T22:24:30.00] java.io.IOException: Bad file number [2013-02-02T22:24:30.00] at com.sun.tools.jdi.ProcessAttachingConnector.attach(ProcessAttachingConnector.java:104) [2013-02-02T22:24:30.00] at nsk.share.jdi.ConnectorTest.tryAttach(ConnectorTest.java:145) [2013-02-02T22:24:30.00] at nsk.jdi.AttachingConnector.attach.attach004.attach004.doTest(attach004.java:96) [2013-02-02T22:24:30.00] at nsk.share.jdi.ConnectorTest.runIt(ConnectorTest.java:109) [2013-02-02T22:24:30.00] at nsk.jdi.AttachingConnector.attach.attach004.attach004.run(attach004.java:44) [2013-02-02T22:24:30.00] at nsk.jdi.AttachingConnector.attach.attach004.attach004.main(attach004.java:40) But looking in jstack output in a separate file, the following is found: Exception in thread "main" java.io.IOException: Bad file number at sun.tools.attach.SolarisVirtualMachine.enqueue(Native Method) at sun.tools.attach.SolarisVirtualMachine.execute(SolarisVirtualMachine.java:131) at sun.tools.attach.HotSpotVirtualMachine.executeCommand(HotSpotVirtualMachine.java:217) at sun.tools.attach.HotSpotVirtualMachine.remoteDataDump(HotSpotVirtualMachine.java:174) at sun.tools.jstack.JStack.runThreadDump(JStack.java:177) at sun.tools.jstack.JStack.main(JStack.java:112)
05-02-2013

EVALUATION Intermitently we detachs from target VM between fd validation and actual door call.
21-08-2012