Bug 134392

Summary: curl: Fix several deadlocks
Product: WebKit Reporter: cand <cand>
Component: PlatformAssignee: Basuke Suzuki <Basuke.Suzuki>
Status: RESOLVED INVALID    
Severity: Critical CC: Basuke.Suzuki, bunhere, cdumez, commit-queue, galpeter, gyuyoung.kim, sergio
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Bug Depends on:    
Bug Blocks: 117300    
Attachments:
Description Flags
Patch
none
remove mutex none

Description cand 2014-06-27 05:06:54 PDT
Mutexes on posix platforms are not recursive, unlike on Windows. CurlDownload tried to re-lock a mutex in several places, causing deadlocks.
Comment 1 cand 2014-06-27 05:07:23 PDT
Created attachment 233977 [details]
Patch
Comment 2 Peter Gal 2014-07-01 01:10:45 PDT
(In reply to comment #1)
> Created an attachment (id=233977) [details]
> Patch

This patch doesn't have a changelog and please mark patches with r? to be reviewed.
Comment 3 Basuke Suzuki 2017-07-19 22:17:19 PDT
Created attachment 315971 [details]
remove mutex

Because JobManager calls callback sequentially from phase to phase, there is no need to maintain thread safety by mutex. m_response is the only object which is touched from background and main thread, all header received event is the last method to touch the response and all manipulation is finished by that timing.
Comment 4 Basuke Suzuki 2017-07-19 22:18:13 PDT
This patch should be landed after following patch is landed.
- https://bugs.webkit.org/show_bug.cgi?id=134393
Comment 5 Basuke Suzuki 2018-02-28 09:13:30 PST
With the huge architecture change, this deadlocks are resolved. Actually those mutex was gone and was replaced with operation queue style architecture.