-
Notifications
You must be signed in to change notification settings - Fork 341
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
multi-thread lsquic server crashed because header stream was released before connection closed(Q043). #201
Comments
@jazune, did this turn out not to be an lsquic bug? |
It seems lsquic bug. I fix this by: headers_on_close (lsquic_stream_t *stream, struct lsquic_stream_ctx *ctx) } @@ -3099,6 +3099,8 @@ maybe_conn_flush_headers_stream (struct full_conn *conn) But I still don't know why full_conn_ci_tick was executed when header stream was closed |
It does not happen in single-threaded code that a connection is ticked after the headers stream is destroyed. I incline to think that it is more likely that the bug is in your multi-threaded logic. |
We have been able to reproduce this issue. Fix is forthcoming. |
- [BUGFIX] gQUIC: do not destroy critical streams when connection is closed. See issue #201. - [BUGFIX] Drop #if LSQUIC_CONN_STATS from lsquic.h. See issue #211. - [BUGFIX] Challenge cancellation when path validation fails. - [BUGFIX] Do not send FIN if RST is scheduled to be sent on a stream. - [BUGFIX] gQUIC's is_tickable() when connection is closing. - [BUGFIX] Q050 processing of GOAWAY frames.
Fixed in 2.27.3 -- closing. |
I got a crash in maybe_conn_flush_headers_stream function because the header stream was abnormal released when I carried out my stress test on my multi-thread server.(lsquc version is 2.20.0 with multi-thread safe patch)
I found the header stream was released (with AddressSanitizer compile) in service_streams function because (stream->sm_qflags & SMQF_FREE_STREAM) was true.
Since maybe_conn_flush_headers_stream will be executed in every full_conn_ci_tick, Should we not release header stream before connection closed?
It seems header stream flag SMQF_FREE_STREAM was set but conn was not closed, and after the next full_conn_ci_tick, it crashed.
The text was updated successfully, but these errors were encountered: