Open basil opened 4 days ago
@basil thanks for this report and the excellent bisection down to a specific commit.
I've not yet tried your reproduction, but am just initially trying to get a general feel for the issue. The stacks indicate that we are trying to normally complete a response that has already been aborted. The strange thing is that the commit you identified was primarily removing unnecessary abort calls? So this suggests that something else is aborting the response??
Since you have an easy reproduction, any chance that you can run this with debug logging turned on for the org.eclipse.jetty.ee9.nested
package or if too verbose, just the org.eclipse.jetty.ee9.nested.HttpChannelState
class?
thanks
@gregw I ran through the scenario described above again, this time with java -Djava.util.logging.config.file=logging.properties -jar war/target/jenkins.war --http2Port=8000 --httpsKeyStore=target/wildcard.jks --httpsKeyStorePassword=changeit
, where logging.properties
contained
.level=INFO
org.eclipse.jetty.ee9.nested.level=ALL
handlers=java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level=ALL
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
org.eclipse.jetty.ee9.nested.handlers=java.util.logging.ConsoleHandler
It took me almost a minute of clicking around in the Jenkins UI before the IllegalStateException
s started appearing. The full logs are at: https://basilcrow.com/tmp/debug-logs.txt
This file is 16 MB (!) in size, covering about 1 minute of Jenkins usage. The IllegalStateException
s described in this issue start at the very end of the file, at line 111525.
@basil Thanks for that log. I can see throughout the log lots of unconsumed content exceptions. These are unrelated and just mean that a response was sent for a request without reading all of the request content. This can be normal, but is something you might want to check.
The actual problem appears to start at 6:54:19 when I can see a write it failed with a reset connection. This them results in an other exception regarding insufficient content written, which is the cause of the abort, which in turn results in the logged exception about the channel being in ABORT state.
Failing gracefully when having a reset slammed in our faces whilst writing a response can be difficult, at least not without accidentally suppressing other exceptions. So we will need to check if a) we can avoid the insufficient content written exception, as that is a result of the resets; and b) should we not log at warning when a response has been aborted before completion?
stand by....
Jetty version(s)
12.0.15
Jetty Environment
EE 9
Java version/vendor
OS type/version
Ubuntu 22.04.5 LTS x86_64
Context
https://github.com/jenkinsci/jenkins/pull/9951
Steps to reproduce
Start by pulling down https://github.com/jenkinsci/jenkins/pull/9951. This does nothing other than pull in https://github.com/jenkinsci/winstone/pull/419, which in turn does nothing other than update Jetty from 12.0.14 to 12.0.15.
Compile it with Java 17 by running
mvn clean verify -DskipTests
.Run it as follows:
Once Jenkins comes up, visit https://127.0.0.1:8000 in Firefox and enter the password that was given to you on the console. Click on Install suggested plugins, wait for that to complete, click Skip and continue as admin, click Save and finish, and click Start using Jenkins.
Do some generic actions in the Jenkins UI. For example, click on New Item, enter a name, select Freestyle Project, click Add Build Step, click Execute Shell, type
echo hello
, save the project, and build the project a few times.Check the console where you started Jenkins. You should see the stack traces mentioned below.
If not, open a new tab in Firefox (leaving the old one untouched) and continue clicking around in the UI. Click to go back to the Dashboard, click on the Freestyle project again, build it a few more times, etc. Within a minute, I am always able to see the stack traces mentioned below.
If this bug is being really stubborn, kill the Java process and start Jenkins again, log in again, and browse around again in a new tab. I am always able to reproduce the issue within about a minute after doing this.
Expected results
Back in the console where you started Jenkins, the logs should be clean after:
Actual results
The console is full of warnings and stack traces like this:
Evaluation
I bisected this change in behavior to commit f48be0d by @sbordet, part of #12313 and #12370.
I am not comfortable delivering Jetty 12.0.15 to Jenkins users with these stack traces being logged at warning level; in other words, this issue is blocking the Jenkins project from upgrading to the latest release of Jetty.