JDK-7168110 : Misleading jstack error message
  • Type: Bug
  • Component: core-svc
  • Sub-Component: tools
  • Affected Version: 6
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-05-11
  • Updated: 2014-11-19
  • Resolved: 2012-05-23
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 Availabitlity Release.

To download the current JDK release, click here.
JDK 6 JDK 7 JDK 8
6u34Fixed 7u6Fixed 8 b40Fixed
Description
SHORT SUMMARY: Misleading jstack message when attempting to attach to a 
process owned by another user in Windows
INDICATORS: jstack fails with "Not enough storage is available to process 
this command"
COUNTER INDICATORS: jstack succeeds
TRIGGERS: running jstack on a process owned by another users
KNOWN WORKAROUND: na
PRESENT SINCE: forever
HOW TO VERIFY: Log into a windows 2003 machine using windows terminal 
services and a normal user account. Launch a java application. Log into an 
Administrator session in another window and attempt to run jstack on the java 
application process.
NOTES FOR SE:
REGRESSION: no


*** RMCKENNA 05/10/12 08:07 pm *** (CHG: Tag Updated)
Old Tag: sust:ui
New Tag: sust:ui new_shadow
*** RMCKENNA 05/10/12 08:08 pm ***
Thanks for the detailed instructions Kim. I see the cause of the problem. 
There are two potential ways to deal with it so I'm going to consult Dev to 
see which they'd prefer. I'll get back to you shortly.
*** RMCKENNA 05/10/12 08:25 pm *** (CHG: SubComp->PROFILER)
*** NDCOSTA 05/10/12 10:43 pm *** (CHG: Asg->JDKREP Comp->SVC)

Comments
EVALUATION The problem is caused by windows disallowing CreateRemoteThread on a process created in another terminal session. The solution is to add a check for the error that results.
2012-05-17