[ http://issues.apache.org/jira/browse/DERBY-1571?page=all ]
Knut Anders Hatlen updated DERBY-1571:
--------------------------------------
Attachment: 1571-v2.diff
Uploading a new patch (1571-v2.diff) which replaces the previous patch. Instead
of setting logWriter to null in shutdown(), logWriter is now set to an output
stream that throws away all output. Since the stream is not null, the stack
trace will be written to this stream instead of System.err. This way, all
messages (including stack traces) are suppressed while shutdown() is running
ping(), but we preserve the old behaviour with printing stack traces to
System.err when logWriter is null.
I have run derbyall and verified that the patch fixes the regression test
failure. Please review. Thanks!
% svn stat
M java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
> NetworkServerControlImpl.consoleExceptionPrintTrace() prints stack trace even
> when logWriter is null
> ----------------------------------------------------------------------------------------------------
>
> Key: DERBY-1571
> URL: http://issues.apache.org/jira/browse/DERBY-1571
> Project: Derby
> Issue Type: Bug
> Components: Network Server, Newcomer, Regression Test Failure
> Affects Versions: 10.2.0.0
> Reporter: Knut Anders Hatlen
> Assigned To: Knut Anders Hatlen
> Priority: Minor
> Attachments: 1571-v2.diff, 1571.diff
>
>
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira