-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
DEBUGASSERT(NULL) fails in Curl_multi_pollset_ev #16174
Comments
callstack:
|
I created another debug logging patch, and got this log. Here is an excerpt of the log.
The transfers hash 0000023644AFD3C0 was destroyed unexpectedly. |
I'd like to suggest this patch. if diff --git a/lib/multi.c b/lib/multi.c
index d4dd4a004..324d999fe 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -3010,8 +3010,7 @@ CURLMcode Curl_multi_pollset_ev(struct Curl_multi *multi,
if(cur_action & CURL_POLL_OUT)
entry->writers++;
}
- else if(!last_action &&
- !Curl_hash_pick(&entry->transfers, (char *)&data, /* hash key */
+ else if(!Curl_hash_pick(&entry->transfers, (char *)&data, /* hash key */
sizeof(struct Curl_easy *))) {
DEBUGASSERT(entry->users < 100000); /* detect weird values */
/* a new transfer using this socket */ Unfortunately, the same |
@fujii thanks for the detailed report. The event based scheduling in curl is a bit tricky. We have adde test coverage for it, but the problem space for possible configurations and run patters is very large. Since your application stumbles on edge cases, may this is an opportunity to tweak things a bit with your cooperation. I did #16297 in the meantime that adds more tracing to the multi operations. If you build that with debug, you can set the environment var
to make that tracing active (you seem do have a I'll do a PR on top of #16297 and try some tweaking. If you are willing to test that, we should be able to iron this out, I guess. Do you have cycles to spare? |
Created #16308 with rework on internal event callback handling. |
Thank you very much. I took some logs by loading https://www.reddit.com/ with #16308 and |
@fujii thanks a lot for the traces! I see that the assertion in the reworked code still triggers and that we have not understood the situation here. I updated #16308 that reveals the transfer and connection ids involved and that hopefully allow us to understand what is going on. Could you repeat you test with a fresh #16308 and set the environment variable:
If that takes effect, you should see in every log line things like Thanks for your help! |
Thank you. I got logs. |
Thanks for the logs! With them I believe I was able to understand why the assertion was triggered. I have updated PR #16308 and it would be nice to know how that one now fares in your tests. |
Great! It works perfectly. Thank you very much. |
I did this
I'm using libcurl for Windows WebKit. Windows WebKit has been using release builds of libcurl for debug build WebKit.
Now, I'm planning to use debug builds of libcurl for debug build WebKit.
However, I'm facing an assertion failure in libcurl while browsing some web sites.
DEBUGASSERT(NULL)
fails in Curl_multi_pollset_ev.curl/lib/multi.c
Line 3104 in 1b4e635
This is reproducible with libcurl 8.12.0.
I added debug logging to Curl_multi_pollset_ev.
fujii@35d508f
I got a log and uploaded there.
https://gist.github.com/fujii/7696b2fe5a9a392766e4283d14ff1ccf
Here is the excerpt of the log of loading https://www.reddit.com/.
libcurl was trying to delete a hash key not added to a transfers hash.
I expected the following
No response
curl/libcurl version
8.12.0
operating system
Windows 11
The text was updated successfully, but these errors were encountered: