| Summary: | [iOS] Crash when running WebKit legacy layout tests on device | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Per Arne Vollan <pvollan> | ||||
| Component: | WebKit Misc. | Assignee: | Per Arne Vollan <pvollan> | ||||
| Status: | NEW --- | ||||||
| Severity: | Normal | CC: | ap, bfulgham, sabouhallawa, simon.fraser, thorton | ||||
| Priority: | P2 | ||||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Per Arne Vollan
2020-01-07 14:38:40 PST
Created attachment 387036 [details]
Patch
Comment on attachment 387036 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=387036&action=review r=me > Source/WebKitLegacy/mac/WebView/WebViewData.h:127 > +class LayerFlushController : public ThreadSafeRefCounted<LayerFlushController> { Whoops! Comment on attachment 387036 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=387036&action=review > Source/WebKitLegacy/mac/ChangeLog:9 > + and another thread. Is that expected? Should all flushing happen on main thread? Comment on attachment 387036 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=387036&action=review >> Source/WebKitLegacy/mac/ChangeLog:9 >> + and another thread. > > Is that expected? Should all flushing happen on main thread? You might check with Tim or Simon to make sure this is expected. (In reply to Brent Fulgham from comment #4) > Comment on attachment 387036 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=387036&action=review > > >> Source/WebKitLegacy/mac/ChangeLog:9 > >> + and another thread. > > > > Is that expected? Should all flushing happen on main thread? > > You might check with Tim or Simon to make sure this is expected. Tim, Simon, Said, is this the correct way to fix this issue? What's the "other" thread? Is it the WebThread? There are plenty of ref-counted things that are touched from the main thread and the web thread, but WebThreadLock should protect them. Why is LayerFlushScheduler different? (In reply to Simon Fraser (smfr) from comment #7) > There are plenty of ref-counted things that are touched from the main thread > and the web thread, but WebThreadLock should protect them. Why is > LayerFlushScheduler different? Ah, so this might not be a real problem if the WebThreadLock is protecting LayerFlushScheduler? At the moment, I am not sure what other thread is accessing the LayerFlushScheduler. It would still be good to fix the assert, though. isMainThread includes the Web Thread and the main thread, so this means some third thread is doing reffing or dereffing LayerFlushScheduler, which suggests you're papering over the problem. Actually, suggests it was *created* on a third thread, since the crash is in deref (In reply to Tim Horton from comment #9) > isMainThread includes the Web Thread and the main thread, so this means some > third thread is doing reffing or dereffing LayerFlushScheduler, which > suggests you're papering over the problem. That makes sense, I will try to find the third thread. Thanks for reviewing, all! Comment on attachment 387036 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=387036&action=review > Source/WebKitLegacy/mac/WebView/WebViewData.h:129 > static Ref<LayerFlushController> create(WebView* webView) Could you add an RELEASE_ASSERT(isMainThread()) here to find the bad guy? (In reply to Brent Fulgham from comment #12) > Comment on attachment 387036 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=387036&action=review > > > Source/WebKitLegacy/mac/WebView/WebViewData.h:129 > > static Ref<LayerFlushController> create(WebView* webView) > > Could you add an RELEASE_ASSERT(isMainThread()) here to find the bad guy? Good point! I will try that. |