JDK-6220903 : TTY: Race in printing prompt and printing output in the event handler
  • Type: Bug
  • Component: core-svc
  • Sub-Component: debugger
  • Affected Version: 6
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2005-01-24
  • 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 b16Fixed
Related Reports
Relates :  
Relates :  
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.
22-06-2007

EVALUATION See the Description.
22-06-2007