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

data race on ipv6_works #915

Closed
bprodoehl opened this Issue Jul 14, 2016 · 3 comments

Comments

Projects
None yet
3 participants
@bprodoehl
Contributor

bprodoehl commented Jul 14, 2016

I did this

I ran a multi-threaded app that uses libcurl under Clang 3.9 ThreadSanitizer.

I expected the following

Clean operation.

curl/libcurl version

7.44

operating system

Ubuntu 14.04, x86_64.

I encountered a data race with two threads calling Curl_ipv6works() at the same time. I think perhaps the call to Curl_ipv6works() should be moved into curl_global_init() to avoid this.

@bagder

This comment has been minimized.

Member

bagder commented Jul 14, 2016

Sounds like an excellent suggestion to me. You up to providing such a change as a pull request?

@bprodoehl

This comment has been minimized.

Contributor

bprodoehl commented Jul 14, 2016

Sure thing. I should be able to put that together and test it tonight.

jay added a commit that referenced this issue Jul 18, 2016

curl_global_init: Check if IPv6 works
- Curl_ipv6works() is not thread-safe until after the first call, so
call it once during global init to avoid a possible race condition.

Bug: #915
PR: #918
@jay

This comment has been minimized.

Member

jay commented Jul 18, 2016

Thanks, landed in c509808.

@jay jay closed this Jul 18, 2016

@lock lock bot locked as resolved and limited conversation to collaborators May 7, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.