[Webkit-unassigned] [Bug 32864] New: Mutex objects are not required to protect libcurl

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 22 03:19:40 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=32864

           Summary: Mutex objects are not required to protect libcurl
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Platform
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: kwangyul.seo at gmail.com


There is a known bug in libcurl's threaded resolver in Win32:

crash using libcurl 7.19 multi interface
http://curl.haxx.se/mail/lib-2009-03/0092.html

In the past, Kevin Watters suggested a solution to fix the crash by protecting
libcurl's shared data with mutex.

curl DNS lookup occurs on multiple threads but storage is not threadsafe
https://bugs.webkit.org/show_bug.cgi?id=28920

I'm afraid that this is not the correct way to solve the problem. As mentioned
in the libcurl's mailing list, this bug is caused by the internal bug in
libcurl's threaded DNS resolver.

According to the libcurl's manual:

"Since you can use this share from multiple threads, and libcurl has no
internal thread synchronization, you must provide mutex callbacks if you're
using this multi-threaded. "

Because ResourceHandleManager is single-threaded with multi interface, we don't
need thread synchronization at all.

The right way to fix this problem is to use the synchronous resolver or c-ares
resolver in libcurl build as mentioned in the mailing list. The current
ResourceHandleManager code causes unnecessary locking overhead in other
platforms.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list