-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Assertion `!_end && !_zc_bufs && "Was this stream properly closed?"' failed #19494
Comments
Is this a self-built 5.4.7? backtrace.scylladb.com doesn't decode the trace properly (and yours seems to be missing some frames). @xemul the http timeout is a good hint though. |
We spent some time investigating with several versions (5.4.3, some intermediate commit of 5.4.5), and latest version was 5.4.7. |
Hello, Also I have a good question: For example std respects this rule: https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/include/std/fstream#L256 |
I found a commit where the destructor was added: scylladb/scylla-seastar@78e3924 |
In general one can't call a function returning a future from a destructor, because there is no way to wait for it. |
@avikivity thx for the reply and your clarification. But could be close() not a future but sync call? For ex: we could introduce sync version of the close(). May be that could be a good strategy to avoid such situations in the future. Btw wondering If no close() called, then we would have fd leak at least, am I right? |
I've a simple reproduced in scylladb/seastar#2310 (fixed issue number) |
Ah, it's even simpler |
…PI handler' from ScyllaDB All streams used by httpd handlers are to be closed by the handler itself, caller doesn't take care of that. fixes: #19494 (cherry picked from commit d1fd886) (cherry picked from commit a0c1552) (cherry picked from commit 1839030) Refs #19541 Closes #19563 * github.com:scylladb/scylladb: api: Fix indentation after previous patch api: Close output_stream on error api: Flush response output stream before closing
All streams used by httpd handlers are to be closed by the handler itself, caller doesn't take care of that. On master this place is coroutinized, thus the original fix doesn't fit as is. Original commit is 0ce00eb refs: scylladb#19494 closes: scylladb#19561 Signed-off-by: Pavel Emelyanov <[email protected]>
All streams used by httpd handlers are to be closed by the handler itself, caller doesn't take care of that. On master this place is coroutinized, thus the original fix doesn't fit as is. Original commit is 0ce00eb refs: #19494 closes: #19561 Signed-off-by: Pavel Emelyanov <[email protected]> Closes #19570
Installation details
Scylla version (or git commit hash): 5.4.7
Cluster size: 11 peers
OS (RHEL/CentOS/Ubuntu/AWS AMI): RHEL/CentOS
We observed process crash when the execution time of a REST API exceeds the client's HTTP timeout.
For instance, when the client requests a list of snapshots (we've generated approximately 5,000 snapshots during our tests), it may not receive a response
during the timeout and close the connection.
This can be reproduced with the following command:
As a result, an assert will be triggered in
~output_stream()
.The text was updated successfully, but these errors were encountered: