Skip to content
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

SelectorManager: Random close error #4297

Closed
jknack opened this issue Nov 12, 2019 · 7 comments
Closed

SelectorManager: Random close error #4297

jknack opened this issue Nov 12, 2019 · 7 comments
Assignees
Labels
More Info Required Stale For auto-closed stale issues and pull requests

Comments

@jknack
Copy link

jknack commented Nov 12, 2019

I do see some random close errors generated by SelectorManager.

java.io.IOException: Close org.eclipse.jetty.server.HttpConnection$SendCallback@5aa2a752[PROCESSING][i=HTTP/1.1{s=200,h=4,cl=-1},cb=org.eclipse.jetty.server.HttpChannel$SendCallback@1fa03262] in state PROCESSING
	at org.eclipse.jetty.util.IteratingCallback.close(IteratingCallback.java:428)
	at org.eclipse.jetty.server.HttpConnection.onClose(HttpConnection.java:518)
	at org.eclipse.jetty.io.SelectorManager.connectionClosed(SelectorManager.java:345)
	at org.eclipse.jetty.io.ManagedSelector$DestroyEndPoint.run(ManagedSelector.java:957)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:782)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918)
	at java.lang.Thread.run(Thread.java:748)

Response is generated OK, just sometimes got this error on logs (this is the whole stacktrace).

jetty: 9.4.20
jvm: 1.8.0_222-8u222-b10-1ubuntu1~16.04.1-b10

@gregw
Copy link
Contributor

gregw commented Nov 13, 2019

Not much we can say about just that stack trace without more background info.
What kind of requests are you serving? Big? Little? Static? Dynamic? Async? Blocking? OutputStream? Writer? Known Content-Length? Chunked? HTTP/1.0? HTTP/1.1? HTTP/2?
How does your app expect closes? at the end of a request? Was it due to a timeout? Was it initialised by the client?

@jknack
Copy link
Author

jknack commented Nov 14, 2019

Little (14 bytes), I don't set content-length bc Jetty does it in this case.

Issue is generated randomly while using the async version of HttpOutput.sendContent:

HttpOutput sender = response.getHttpOutput();
sender.sendContent(data, this);

The callback checks for non-null exceptions and log them:

failure(Throwable x) {
   if (x != null) {
    log.error("exception found while sending response", x);
   }
}

NOTE: The blocking version sendContent(data) doesn't generate this error.

Async or blocking version the response in both cases are received OK by client, just got that random exception on logs while using async.

@sbordet
Copy link
Contributor

sbordet commented Feb 3, 2020

@jknack can you please try 9.4.26 or later? We have fixed #4461 that may be related.

@jknack
Copy link
Author

jknack commented Feb 3, 2020

Still see it. Will look again and try to give you more details

@gregw
Copy link
Contributor

gregw commented Apr 7, 2021

@jknack are you still seeing this? If so, what release are you on now?
Can you tell us more about how your response was generated? Can you show us the response headers? Perhaps get a wireshark trace?

@github-actions
Copy link

github-actions bot commented Apr 8, 2022

This issue has been automatically marked as stale because it has been a
full year without activity. It will be closed if no further activity occurs.
Thank you for your contributions.

@github-actions github-actions bot added the Stale For auto-closed stale issues and pull requests label Apr 8, 2022
@github-actions
Copy link

github-actions bot commented May 9, 2022

This issue has been closed due to it having no activity.

@github-actions github-actions bot closed this as completed May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
More Info Required Stale For auto-closed stale issues and pull requests
Projects
None yet
Development

No branches or pull requests

3 participants