United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6220903 TTY: Race in printing prompt and printing output in the event handler
JDK-6220903 : TTY: Race in printing prompt and printing output in the event handler

Details
Type:
Bug
Submit Date:
2005-01-24
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:
6
Fixed Versions:

Related Reports
Backport:
Relates:
Relates:

Sub Tasks

Description
After jdb processes a command, eg, 'step', it (the main thread) prints 
a prompt, eg '>'.  When the event handler thread gets an
event, the event handler sometimes prints a line, eg:
'Step completed: ...'.
There is no synch between these prints which means that the
prompt can appear in the middle of the event handler msg, eg:
   St>ep completed: ....

This is a bit ugly for the user to have to see, but more importantly,
it can make jdb tests that expect particular strings in the output
fail.  We have seen this in the test JdbMethodExitTest.sh on solaris-sparc64.


###@###.### 2005-1-24 20:21:06 GMT

This bug affects the following test:

    com/sun/jdi/JdbMethodExitTest.sh

###@###.### 2005-03-11 00:57:16 GMT
This test is also known as:

    closed/com/sun/jdi/JdbMethodExitTest.sh
A couple of thoughts on this bug:

- change the test program's compare function to try a more
  tolerant compare if the straight forward compare fails
- fix jdb to synchronize output between the different
  threads (command processor, event handler, stdout handler, etc)

                                    

Comments
SUGGESTED FIX

Make the test in ShellScaffold.sh that is looking for required output
tolerate the ' >' jdb prompt.
                                     
2007-06-22
EVALUATION

See the Description.
                                     
2007-06-22



Hardware and Software, Engineered to Work Together