New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8255148: Confusing log output: SSLSocket duplex close failed #4354
Conversation
|
Webrevs
|
@@ -587,7 +587,7 @@ public void close() throws IOException { | |||
} catch (IOException ioe) { | |||
// ignore the exception | |||
if (SSLLogger.isOn && SSLLogger.isOn("ssl")) { | |||
SSLLogger.warning("SSLSocket duplex close failed", ioe); | |||
SSLLogger.warning("SSLSocket duplex close failed. Debug info only. Exception details:", ioe); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is a debug message, shouldn't we just use SSLLogger.fine()
instead of SSLLogger.warning()
, with the same message "SSLSocket duplex close failed"? @coffeys what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@seanjmullan - It's the exception stacktrace printed after the message that's causing issue for some. Some are reading it as a JDK functionality issue (when it's not)
I've no strong preference whether this should be printed at warning() or fine() level. That granularity is largely broken since JDK 11 - people need to use -Djavax.net.debug=all to get any reasonable amount of data. It would be good to see https://bugs.openjdk.java.net/browse/JDK-8044609 worked on.
I think the patch looks ok as ie. Evan has fixed up some issues with the test - we should expect a new version shortly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also don't have a logging level preference, so if there's merit to changing it, I'll be happy to do so.
I've updated the test case and verified it passes on all platforms.
Looking forward to any further feedback :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, It sounds like whether it should be a different logging level (fine) or not can be handled separately as part of a more global effort across other SSL logging messages. So I am ok with the change as-is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Sean!
@evwhelan This change now passes all automated pre-integration checks. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 213 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@seanjmullan) but any other Committer may sponsor as well.
|
/integrate |
/sponsor |
@seanjmullan @evwhelan Since your change was applied there have been 213 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 408e0a9. |
@@ -1329,7 +1329,7 @@ public void close() throws IOException { | |||
} catch (IOException ioe) { | |||
// ignore the exception | |||
if (SSLLogger.isOn && SSLLogger.isOn("ssl")) { | |||
SSLLogger.warning("output stream close failed", ioe); | |||
SSLLogger.warning("output stream close failed. Debug info only. Exception details:", ioe); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may look at this bug report different. It is a problem that the user does not understand the debug log properly. Debug log is for debug information only, and the debug log level indicates the level of the message.
It looks like there is too much duplicated information. A log message has already indicated that the message is debug information only. Otherwise, exception should has been thrown in application level. The adding of "Exception details:" adds unnecessary dependency of the exception logging format.
It may be fine to keep it unchanged, as if the users understand the logging message and logging levels. This kind of information normally means there is something that an application should take care of. That why we use a warning level log, rather than a fine level log message.
It we really want an update, may be we could have a documentation enhancement instead.
Similar comments for other update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry that I did not have my comment earlier, and while I was typing the comment the update was integrated. Please just ignore this comment.
Hi,
Please review my fix for JDK-8255148 which clarifies when an exception contains debug information only.
Regards,
Evan
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/4354/head:pull/4354
$ git checkout pull/4354
Update a local copy of the PR:
$ git checkout pull/4354
$ git pull https://git.openjdk.java.net/jdk pull/4354/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 4354
View PR using the GUI difftool:
$ git pr show -t 4354
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/4354.diff