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
assetion failed #570
Comments
Thank you for reporting this. As for assertion error in nghttp2_session.c, did you use data_length_callback to extend frame size? Also are you using v1.9.2? |
So, line 6576 is
and datamax = 16384 and nghttp2_buf_avail(buf) = 16384, then assert should be fine. |
Is there any chance that your program called nghttp2 API from multiple thread at the same time? |
No i don't, i only use asio wrapper. I update my nghhtp2 to master and first assertion dissapears. |
I think first assertion error also comes with the multiple calls from different thread to the same nghttp2 session object. The call to the same nghttp2 session must be guarded by mutex, otherwise there is plenty of chance for undefined behaviour. |
I add mutex, and it doesn't help, as i can undestand the problem is bigger. I can add mutex only to calls like |
You are write, they happens inside libnghttp2_asio library. I have not reproduced this issue. I used examples/asio-sv. Could you share the simplest server side code to reproduce this issue? |
i can't reproduce this issue with simple server, but it repoduced on my working server.
Assertion's dissapears, do you have any ideas why this happens? |
res.io_service() returns the io_service the request/response is handled. And we assume that all API calls must be done in the same thread where underlying io_service is running. So res.io_service.post will invoke callbacks on the same thread, which follows our assumption. |
But why call of |
All objects associated to one nghttp2 server object must be used in the same thread that the underlying io_service object is running. If res object is used in the another thread and res.io_service() is called, at the same time, the res object might be destroyed. That would be UB. |
if i'll try to get ioservice from server, i can't know which one from the set of io_services is exactly handling this request. |
We will accept PR if it is generally useful. I saw similar concerns from other users regarding io_service, so probably we have some issues there. |
Closed since asio library has been removed. |
i have failed assetion in nghttp2_session.c on line 6576, in gdb i see that datamax = 16384 and nghttp2_buf_avail(buf) = 16384.
And sometimes i have failed assertion here:
so what i must do to fix this?
I repoduce this if i send a make a lot(over 100 in for loop) submits in one http2 session.
The text was updated successfully, but these errors were encountered: