-
-
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
curl dns resolution broken on x32 #16237
Comments
Any chance you can bisect to figure out which change that broke it? I presume 8.11.1 works fine for you? |
Is the .so built used here? From the log it doesn't appear that If not, perhaps there's some conflict somehow from .so that it does pick up. |
What does |
Bisection points to
|
|
That commit enabled eventfd use, but only for 64-bit architectures. x32 is a weird mixture so it feels like this could potentially explain what's happening. |
I found the explanation in the eventfd manpage:
and since the code uses the size of a pointer there, which on x32 is 4 bytes, it does not work correctly. Let me try a PR that fixes the write |
Curl writes a pointer to the eventfd. which is 4 bytes on 32-bit pointers:
So yeah, that's it. |
The eventfd manpage says: A write(2) fails with the error EINVAL if the size of the supplied buffer is less than 8 bytes When doing x32 on a 64-bit system, pointers are still four bytes so this code must not use the size of a pointer but the size of a 64-bit type. Fixes #16237 Reported-by: Jan Engelhardt
Tried a627a25, but with this change, dns is still failing like before. There has to be another place still.. |
@jengelh can you add some extra code or something in there to check that the write() is successful? |
There is similar code in Lines 286 to 291 in c012c60
|
c477062 works |
I did this
Version: curl 8.12 tarball from most recent github tag
Observed:
getaddrinfo in thread2 even succeeds, but it appears the dnscache in thread1 remains empty (h->table = NULL).
I expected the following
succeed, given DNS is functioning properly.
curl/libcurl version
https://github.com/curl/curl/archive/refs/tags/curl-8_12_0.tar.gz
operating system
The text was updated successfully, but these errors were encountered: