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

JShell: shutdown could cause remote JDWP errors to be visible to users

XMLWordPrintable

    • b121
    • Not verified

      We are seeing this error on some automated test runs:

            ERROR: transport error 202: send failed: Broken pipe

      This is generated in dev/jdk/src/jdk.jdwp.agent/share/native/libjdwp
            transport.c:

              ERROR_MESSAGE(("transport error %d: %s",err, utf8msg));

      The context is the tool level /reload command which calls JShell.close() and, in turn, JDIExecutionControl.close() which starts shutdown. However, the forwarding of output from the remote client to JShell's userout and usererr channels continues until the bitter end. What this means is that when the JDWP connection shuts down, the remote JDWP agent may still attempt to transmit events (probably its death) and fail with the above error sent to stderr and from there sent across the JShell socket (separate from the JDWP connection) to into JShell usererr.

      The solution is once JShell's JDIExecutionControl begins shutdown to no longer forward any output (aka death throws). And thus prevent intermittent test failures (and intermittent confusing output which could be seen by actual users).

            rfield Robert Field (Inactive)
            rfield Robert Field (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: