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

[TESTBUG] nsk/jdb/locals/locals002: fails with "Prompt is not received during ... milliseconds"

    XMLWordPrintable

Details

    • b12

    Backports

      Description

        This problem has been around for a while. It likely has gone unnoticed because this test also fails due to JDK-8169718. The failure you see in the log is:

        Sending command: cont
        reply[0]: >
        reply[1]: Breakpoint hit: "thread=main", nsk.jdb.locals.locals002.locals002a.allKindsOfVars(), line=84 bci=0
        reply[2]: 84 System.out.println("Arguments but no locals"); // locals002.BREAKPOINT_LINE1
        reply[3]:
        reply[4]: main[1]
        Sending command: locals
        reply[0]: Method arguments:
        reply[1]: boolVar = false
        reply[2]: byteVar = 12
        reply[3]: charVar = A
        reply[4]: shortVar = 327
        reply[5]: intVar = 3647
        reply[6]: longVar = 65789
        reply[7]: floatVar = 4.852
        reply[8]: doubleVar = 3.8976
        reply[9]: objVar = "objArgString"
        reply[10]: arrVar = instance of int[3] (id=698)
        reply[11]: Local variables:
        reply[12]: main[1]
        Sending command: cont
        # ERROR: Caught unexpected exception while executing the test: nsk.share.Failure: Prompt is not received during 300200 milliseconds.

        The problem is after the last "cont" it never receives the next main[1] prompt and times out waiting for it. I added some debugging code to print out any remaining replies when the timeout happens, and the log then looks like (just starting with the last "cont" above):

        Sending command: cont
        receiveReply: FAILED
        reply[0]: > Argument
        reply[1]: Breakpoint hit: s b"thread=main", nsk.jdb.locals.locals002.locals002a.allKindsOfLocals(), line=100 bci=62
        reply[2]: ut n100 System.out.println("Locals but no arguments"); // locals002.BREAKPOINT_LINE2
        reply[3]:
        reply[4]: o lmain[1] ocals

        So the next breakpoint was hit, and the main[1] prompt was sent, but there is a bunch of other text interleaved with all lines of the reply. It actually is output from the following line, which is where the previous breakpoint had stopped:

        System.out.println("Arguments but no locals");

        So when we continue the above is executed and the next breakpoint hit, but the output from the above gets interleaved in the reply. I'm not too certain why this happens since a println is being used. I thought those were sent a full line at a time. Seems like somewhere lines are being processed a character at a time.

        Attachments

          Issue Links

            Activity

              People

                gadams Gary Adams (Inactive)
                cjplummer Chris Plummer
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: