-
-
Notifications
You must be signed in to change notification settings - Fork 272
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
Suppress some irrelevant stack traces #274
Conversation
@@ -383,7 +383,11 @@ public void run() { | |||
} catch (IOException e) { | |||
// communication error. | |||
// this means the caller will block forever | |||
logger.log(Level.WARNING, "Failed to send back a reply to the request " + this, e); | |||
if (e instanceof ChannelClosedException) { | |||
logger.log(Level.INFO, "Failed to send back a reply to the request {0}: {1}", new Object[] {this, e}); |
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 would retain the original behavior on the FINE level so that we can locate what caused Closed in some cases.
Or maybe you could retrieve the cause
message via new API method or getMessage()
update in ChannelStateException
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.
retrieve the
cause
message
Should not be necessary. Throwable.toString
by default prints the toString
of a cause.
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.
Information about Close Cause should be printed on the FINE level at least.
int keySize; | ||
try { | ||
keySize = selector.keys().size(); | ||
} catch (ClosedSelectorException x) { |
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.
Separate bugfix IIUC
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.
See the PR description. There were two exceptions. I fixed both.
After updating from java 8 to java 11 getting the below error:- Exception in thread "main" java.lang.IllegalArgumentException: object is not an instance of declaring class at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at hudson.remoting.Launcher.addClasspath(Launcher.java:129) On analysing the remoting source code found that the hudson.remoting.Launcher.addClasspath invokes URLClassLoader and passes the instance using ClassLoader.getSystemClassLoader(). However in java 11, this seems like an illegal operation as ClassLoader.getSystemClassLoader() does not get the instance of URLClassLoader due to which we are getting the error "object is not an instance of declaring class". To fix this issue what updated the addClasspath method to invoke the URLClassLoader using a new instance of the class. Reference:- GitIssues:-jenkinsci#274,jenkinsci#275
Noticed a bunch of stack traces during
io.jenkins.plugins.artifact_manager_jclouds.NetworkTest#unrecoverableExceptionArchiving
(jenkinsci/artifact-manager-s3-plugin#41) for example, but really these have been irritating me for a long time (years?):Should now be reduced to:
See also JENKINS-31652, a different case.