Mutexes on posix platforms are not recursive, unlike on Windows. CurlDownload tried to re-lock a mutex in several places, causing deadlocks.
Created attachment 233977 [details]
(In reply to comment #1)
> Created an attachment (id=233977) [details]
This patch doesn't have a changelog and please mark patches with r? to be reviewed.
Created attachment 315971 [details]
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.
This patch should be landed after following patch is landed.
With the huge architecture change, this deadlocks are resolved. Actually those mutex was gone and was replaced with operation queue style architecture.