JDK-6812971 : SA: re-attaching to process fails
  • Type: Bug
  • Component: hotspot
  • Sub-Component: svc
  • Affected Version: 7
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris
  • CPU: sparc
  • Submitted: 2009-03-04
  • Updated: 2011-02-16
  • Resolved: 2009-04-02
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 JDK 7 Other
6u18Fixed 7Fixed hs15Fixed
Description
When SA is attached to a process using attach(), detached using detach() and then re-attached to the same process using attach(), the second attach() call fails. On Windows, it fails with the following trace:

java.lang.RuntimeException: not attached to a process or Dr Watson dump
	at sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal.requireAttach(WindbgDebuggerLocal.java:438)
	at sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal.readBytesFromProcess(WindbgDebuggerLocal.java:484)
	at sun.jvm.hotspot.debugger.DebuggerBase$Fetcher.fetchPage(DebuggerBase.java:76)
	at sun.jvm.hotspot.debugger.PageCache.getPage(PageCache.java:178)
	at sun.jvm.hotspot.debugger.PageCache.getInt(PageCache.java:96)
	at sun.jvm.hotspot.debugger.DebuggerBase.readCInteger(DebuggerBase.java:355)
	at sun.jvm.hotspot.debugger.DebuggerBase.readAddressValue(DebuggerBase.java:454)
	at sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal.readAddress(WindbgDebuggerLocal.java:316)
	at sun.jvm.hotspot.debugger.windbg.WindbgAddress.getAddressAt(WindbgAddress.java:72)
	at sun.jvm.hotspot.types.basic.BasicField.getAddress(BasicField.java:248)
	at sun.jvm.hotspot.types.basic.BasicAddressFieldWrapper.getValue(BasicAddressFieldWrapper.java:48)
	at sun.jvm.hotspot.memory.Universe.getHeapBase(Universe.java:104)
	at sun.jvm.hotspot.runtime.VM.initialize(VM.java:345)
	at sun.jvm.hotspot.HotSpotAgent.setupVM(HotSpotAgent.java:420)
Caused: sun.jvm.hotspot.debugger.DebuggerException
	at sun.jvm.hotspot.HotSpotAgent.setupVM(HotSpotAgent.java:424)
	at sun.jvm.hotspot.HotSpotAgent.go(HotSpotAgent.java:315)
	at sun.jvm.hotspot.HotSpotAgent.attach(HotSpotAgent.java:158)

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/54782a4cd321
16-03-2009