JDK-6417266 : sun/management/jmxremote/bootstrap/LocalManagementTest.sh fails with IOException: Bad file number
  • Type: Bug
  • Component: core-svc
  • Sub-Component: tools
  • Affected Version: 6
  • Priority: P1
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic,solaris
  • CPU: generic,sparc
  • Submitted: 2006-04-24
  • Updated: 2012-10-01
  • Resolved: 2006-05-25
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 6
6 b85Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
sun/management/jmxremote/bootstrap/LocalManagementTest.sh starts failing in b80 with IOException: Bad file number

Part of the log:

/java/re/jdk/1.6.0/latest/binaries/solaris-sparc/bin/java -classpath /tmp/mchung/JTwork/classes/sun/management/jmxremote/bootstrap:/java/re/jdk/1.6.0/latest/binaries/solaris-sparc/lib/tools.jar TestManager 12075 34465 true
Loading /net/jre.sfbay/p/v06/jdk/6.0/beta2/b81/binaries/solaris-sparc/jre/lib/management-agent.jar into target VM ...
Exception in thread "main" java.io.IOException: Bad file number
        at TestManager.startManagementAgent(TestManager.java:60)
        at TestManager.main(TestManager.java:88)

This test passes with B79.

Comments
SUGGESTED FIX Re-implementing the unref handling is tricky so I suggest that the safest solution for Mustang is to remove it and we can address it properly in a future update. If that is the agreed approach then these are the changes required: ------- attachListener_solaris.cpp ------- *** /tmp/sccs.dDaqf6 Mon May 8 13:47:25 2006 --- attachListener_solaris.cpp Mon May 8 12:13:12 2006 *************** *** 266,292 **** int return_fd = -1; SolarisAttachOperation* op = NULL; - // if argp is DOOR_UNREF_DATA it means the last client is gone. In - // that case we re-attach the door, and enqueue a special operation - // to the AttachListener. - if (argp == DOOR_UNREF_DATA) { - int res = fattach(SolarisAttachListener::door_descriptor(), - SolarisAttachListener::door_path()); - if (res < 0) { - warning("Unable to re-attach door"); - } - - // enqueue special operation - SolarisAttachListener::enqueue(create_detachall_operation()); - - door_return(NULL, 0, NULL, 0); - ShouldNotReachHere(); - } - - // need to detach to cause unreferenced invocation - fdetach(SolarisAttachListener::door_path()); - - // no listener jint res = 0; if (!AttachListener::is_initialized()) { --- 266,271 ---- *************** *** 375,386 **** ::atexit(listener_cleanup); // create the door descriptor ! int dd = ::door_create(enqueue_proc, NULL, DOOR_UNREF_MULTI); if (dd < 0) { return -1; } ! sprintf(door_path, "%s/.java_pid%d", os::get_temp_directory(), os::current_process_id()); RESTARTABLE(::creat(door_path, S_IRUSR | S_IWUSR), fd); if (fd == -1) { --- 354,365 ---- ::atexit(listener_cleanup); // create the door descriptor ! int dd = ::door_create(enqueue_proc, NULL, 0); if (dd < 0) { return -1; } ! sprintf(door_path, "%s.java_pid%d", os::get_temp_directory(), os::current_process_id()); RESTARTABLE(::creat(door_path, S_IRUSR | S_IWUSR), fd); if (fd == -1)
08-05-2006

EVALUATION Unreferenced door handling is incorrect for the case where there is open by than one client. This is a regression since b80.
25-04-2006