Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6220903

TTY: Race in printing prompt and printing output in the event handler

    Details

    • Subcomponent:
    • Resolved In Build:
      b16
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Backports

        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)

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jjh James Holmlund (Inactive)
                  Reporter:
                  jjh James Holmlund (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: