United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6562090 TTY: com/sun/jdi/CatchPatternTest.sh failed in a nightly test run
JDK-6562090 : TTY: com/sun/jdi/CatchPatternTest.sh failed in a nightly test run

Details
Type:
Bug
Submit Date:
2007-05-25
Status:
Closed
Updated Date:
2012-02-02
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
core-svc
OS:
generic
Sub-Component:
debugger
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:

Related Reports
Backport:

Sub Tasks

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
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.
                                     
2007-05-25
SUGGESTED FIX

See attached webrev
                                     
2007-05-25



Hardware and Software, Engineered to Work Together