JDK-6562090 : TTY: com/sun/jdi/CatchPatternTest.sh failed in a nightly test run
  • Type: Bug
  • Component: core-svc
  • Sub-Component: debugger
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2007-05-25
  • Updated: 2012-02-02
  • Resolved: 2011-03-08
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
6u10Fixed 7 b14Fixed
Description
It fails with msg
   --Fail: main: jdb input stream closed prematurely

See:
http://gtee/gtee/results/JDK7/NIGHTLY/VM/2007-05-02/Serv_Baseline/vm/64BITWIN-AMD64/server/comp/vm-vm_6.0_server_comp_64BITWIN-AMD642007-05-02-19-52-35/com/sun/jdi/CatchPatternTest.jtr
(this file is also attached)
This bug affects the following JDI_REGRESSION test:

    com/sun/jdi/CatchPatternTest.sh

Comments
SUGGESTED FIX See attached webrev
25-05-2007

EVALUATION The ShellScaffold thread that feeds commands to jdb always sends a 'quit' command at the end, and jdb doesn't read any more commands after receiving a 'quit'. So, it is hard to see how jdb could get an EOF reading the next command. I suppose one possibility is that the feeder thread does this echo quit exit 1 maybe there is some situation where the exit could cause the pipe to close before jdb has read the quit command. An associated problem is that if jdb does get an EOF while reading a command, it terminates the main thread but leaves other threads running , ie, the event handler, and the threads that read the stdout/stderr from the debuggee.
25-05-2007