Bug 188240 - WebContent crashes on initialization with a local WebKit build on macOS Mojave seed
Summary: WebContent crashes on initialization with a local WebKit build on macOS Mojav...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-08-01 14:52 PDT by Devin Rousso
Modified: 2018-08-06 15:33 PDT (History)
5 users (show)

See Also:


Attachments
[Log] Crash (52.84 KB, text/plain)
2018-08-01 14:52 PDT, Devin Rousso
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2018-08-01 14:52:10 PDT
Created attachment 346303 [details]
[Log] Crash

Possibly related to <https://webkit.org/b/188238>, but I can't say for sure.
Comment 1 Joseph Pecoraro 2018-08-01 14:54:16 PDT
Hmm, this code just does a dispatch_sync to the main queue after checking ![NSThread isMainThread]. Whats up wit that?

> Exception Type:        EXC_BAD_INSTRUCTION (SIGILL)
> Exception Codes:       0x0000000000000001, 0x0000000000000000
> Exception Note:        EXC_CORPSE_NOTIFY
> 
> Application Specific Information:
> BUG IN CLIENT OF LIBDISPATCH: dispatch_sync called on queue already owned by current thread
> 
> Thread 1 Crashed:: Dispatch queue: com.apple.main-thread
> 0   libdispatch.dylib             	0x00007fff7e0bda2e __DISPATCH_WAIT_FOR_QUEUE__ + 392
> 1   libdispatch.dylib             	0x00007fff7e0bd611 _dispatch_sync_f_slow + 171
> 2   com.apple.WebKit              	0x000000010eab2e60 WebKit::InitializeWebKit2()::$_0::operator()() const + 80 (WebKit2InitializeCocoa.mm:68)
> 3   com.apple.WebKit              	0x000000010eab2dfb void std::__1::__call_once_proxy<std::__1::tuple<WebKit::InitializeWebKit2()::$_0&&> >(void*) + 91 (mutex:650)
> 4   libc++.1.dylib                	0x00007fff7b8e1c8a std::__1::__call_once(unsigned long volatile&, void*, void (*)(void*)) + 139
> 5   com.apple.WebKit              	0x000000010eab2d91 WebKit::InitializeWebKit2() + 289 (WebKit2InitializeCocoa.mm:69)
> ...
Comment 2 Alexey Proskuryakov 2018-08-04 13:34:05 PDT
It appears to be quite confused about which thread is main.
Comment 3 Radar WebKit Bug Importer 2018-08-04 13:34:18 PDT
<rdar://problem/42936173>
Comment 4 Chris Dumez 2018-08-04 15:32:17 PDT
Seems related:
http://blog.benjamin-encz.de/post/main-queue-vs-main-thread/
Comment 5 Chris Dumez 2018-08-04 15:48:18 PDT
Maybe we can use:
https://developer.apple.com/documentation/objectivec/nsobject/1414900-performselectoronmainthread

With waitUntilDone:YES.
Comment 6 Chris Dumez 2018-08-05 10:43:18 PDT
Devin, could you please clarify if this happens consistently on startup or this was a one time thing?

Many people (including me) are running local builds of WebKit on recent builds of Mojave, without issue.
Comment 7 Devin Rousso 2018-08-05 12:21:29 PDT
(In reply to Chris Dumez from comment #6)
> Devin, could you please clarify if this happens consistently on startup or
> this was a one time thing?
I had multiple crash reports from the exact same time that all had the same error.  I only uploaded one since they were all the same.  When the page crashed, it would attempt to reload, only to crash again, and then repeat the cycle.
Comment 8 Chris Dumez 2018-08-06 15:30:11 PDT
Please update to the latest macOS 12.14 beta, this should have been fixed already.
Comment 9 Chris Dumez 2018-08-06 15:33:53 PDT
(In reply to Chris Dumez from comment #8)
> Please update to the latest macOS 12.14 beta, this should have been fixed
> already.

You're using the 4th developer seed and the latest one if the 6th. The 6th should definitely have the fix.