JDK-4905551 : JDI: shmemBase_listen failed: Cannot create a file when that file already exists
  • Type: Bug
  • Component: core-svc
  • Sub-Component: debugger
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_8
  • CPU: sparc
  • Submitted: 2003-08-13
  • Updated: 2015-04-23
  • Resolved: 2004-07-19
Related Reports
Duplicate :  
Relates :  
Description
On windows 2000 platform, a lot of NSK tests failed with following message.
"java.io.IOException: shmemBase_listen failed: Cannot create a file when that file already exists"

This occur with server VM only, it passed with client VM. It also passed with
server VM in int mode. 

Here is how to reproduce the failure:
1. MAP \\vmsqe.sfbay.sun.com\export to Y: (on windows 2000 machine)
2. cd y:/Bugs/4905551
3. ksh run.ksh [Location to your java] [vmopts for debugger]
Example:
ksh run.ksh y:/pit/tiger/JDK/b13/win/bin/java -server -Xmixed

#java.io.IOException: shmemBase_listen failed: Cannot create a file when that file already exists
#
#       at com.sun.tools.jdi.SharedMemoryTransportService.startListening0(Native Method)
#       at com.sun.tools.jdi.SharedMemoryTransportService.startListening(SharedMemoryTransportService.java:96)
#       at com.sun.tools.jdi.SharedMemoryTransportService.startListening(SharedMemoryTransportService.java:101)
#       at com.sun.tools.jdi.SunCommandLineLauncher.launch(SunCommandLineLauncher.java:145)
#       at nsk.share.jdi.Binder.localDefaultLaunchDebugee(Binder.java:250)
#       at nsk.share.jdi.Binder.bindToDebugeeNoWait(Binder.java:156)
#       at nsk.share.jdi.Binder.bindToDebugee(Binder.java:219)
#       at nsk.share.jdi.Debugee.prepareDebugee(Debugee.java:441)
#       at nsk.jdi.VirtualMachine.redefineClasses.redefineclasses011.run(redefineclasses011.java:100)
#       at nsk.jdi.VirtualMachine.redefineClasses.redefineclasses011.main(redefineclasses011.java:85)

#nsk.share.Failure: Cought exception while launching debugee VM:
#       java.io.IOException: shmemBase_listen failed: Cannot create a file when that file already exists
#
#       at nsk.share.jdi.Binder.localDefaultLaunchDebugee(Binder.java:259)
#       at nsk.share.jdi.Binder.bindToDebugeeNoWait(Binder.java:156)
#       at nsk.share.jdi.Binder.bindToDebugee(Binder.java:219)
#       at nsk.share.jdi.Debugee.prepareDebugee(Debugee.java:441)
#       at nsk.jdi.VirtualMachine.redefineClasses.redefineclasses011.run(redefineclasses011.java:100)
#       at nsk.jdi.VirtualMachine.redefineClasses.redefineclasses011.main(redefineclasses011.java:85)

###@###.### 2003-08-13

Jim reported another failure mode with Server VM -Xmixed on Win2000:

#command: Y:\pit\tiger\JDK\latest\win\jre\bin\java -server -Xmixed -XX:-ShowMessageBoxOnError -DHANGINGJAVA5440 -Xdebug -Xnoagent -Xrunjdwp:transport=dt_shmem,server=y,address=nskjpdatestchannel nsk.jdi.AttachingConnector.attach.attach002t
#Connector name=com.sun.jdi.SharedMemoryAttach
#       description=Attaches by shared memory to other VMs
#       transport=dt_shmem
#       argument name=address
#               value=
#       argument name=timeout
#               value=
#       argument name=name
#               value=nskjpdatestchannel
#Connection attempt #0 failed: java.io.IOException: shmemBase_attach failed: The system cannot find the file specified


Comments
EVALUATION ###@###.### 2003-08-18 The NSK tests that are failing with the following message: shmemBase_listen failed: Cannot create a file when that file already exists are doing so because a debuggee VM in a previous test has crashed. This crash is due to the following known bug: 4890710 2/4 'java -server -Xdebug' fails a guarantee at interpreter.c The crash of debuggee VM occurs so early in the debuggee VM's startup that the debugger VM hangs while holding onto the shared memory resource. The nsk/regression/b4359247 test is running into another known bug: 4368399 4/4 JDI: -verbose option passed to debugger launcher fails and hangs vm and this results in a hang between the jdb debugger and java debuggee processes. Normally that would not be a problem, but this test is a little bit different in that it has a java program driving the jdb program which is debugging the java debuggee. The Tonga harness knows about the java program that is driving the jdb program, but it does not know about the jdb program or the java debuggee. This is another known bug: 4702273 4/5 Need more powerfull ability to kill an orphan processes This bug is the result of three different bugs coming together in just the right way at just the right time. Name: dd4877 Date: 07/19/2004 daniel.daugherty@Sun 2004-07-19 Cleaning up loose ends. Here is an e-mail that I sent on 2003.09.24: > Greetings, > > A bug for the Tonga portion of the problems described by 4905551 > already exists: > > 4702273 4/5 Need more powerfull ability to kill an orphan processes > > A bug for the JDI portion of the problems described by 4905551 > already exists: > > 4368399 4/4 JDI: -verbose option passed to debugger launcher fails and > > hangs vm > > The bug that enabled 4368399 and 4702273 to interact badly with each > other has been fixed: > > 4890710 2/4 'java -server -Xdebug' fails a guarantee at interpreter.c > > We kept 4905551 open to document the analysis and design discussions > that we were having at the time. I added the design discussion notes > to 4368399 back on 2003.08.26. > > If Francis does not object, I would like to close 4905551 as a duplicate > > of 4368399. > > Dan There were no objections so I'm closing this bug. ======================================================================
21-07-2004