Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-1571

NetworkServerControlImpl.consoleExceptionPrintTrace() prints stack trace even when logWriter is null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 10.2.1.6
    • 10.2.1.6
    • Network Server
    • None
    • Regression Test Failure

    Description

      NetworkServerControlImpl.consoleExceptionPrintTrace() prints the stack
      trace to System.err if logWriter is null. This has occasionally caused
      errors in the regression tests. See
      http://www.multinet.no/~solberg/public/Apache/10.2.0.3_Snapshot/jvm1.5/testlog/sparc_zone3/412239-derbyall_diff.txt
      for an example.

      The test failure happens when NetworkServerControlImpl.shutdown() has
      sent the shutdown command and starts a loop calling ping() until it
      gets an error. Since it expects ping() to fail, it sets logWriter to
      null to avoid getting error messages printed on the console.

      In most cases, the network server is already stopped before the first
      call to ping(). Then ping() fails when calling setUpSocket(), and no
      message is printed. On the other hand, if the server is stopped while
      ping() is being executed, the error might occur other places. For
      instance, it might fail with a SocketException in
      fillReplyBuffer(). fillReplyBuffer() then calls clientSocketError(),
      which in turn calls consolePropertyMessage() and
      consoleExceptionPrintTrace(). consolePropertyMessage() correctly
      suppresses the error message, but consoleExceptionPrintTrace() prints
      the stack trace.

      Attachments

        1. 1571.diff
          0.5 kB
          Knut Anders Hatlen
        2. 1571-v2.diff
          1 kB
          Knut Anders Hatlen

        Activity

          People

            knutanders Knut Anders Hatlen
            knutanders Knut Anders Hatlen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: