| Summary: | [ Monterey Debug arm64 ] ASSERTION FAILED: result == &worker ./workers/service/server/SWServer.cpp(837) : void WebCore::SWServer::workerContextTerminated(WebCore::SWServerWorker &) | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Robert Jenner <jenner> | ||||||
| Component: | WebKit API | Assignee: | Chris Dumez <cdumez> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | achristensen, cdumez, darin, webkit-bot-watchers-bugzilla, webkit-bug-importer, youennf | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | Other | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
Robert Jenner
2021-11-16 15:38:34 PST
It appears to have started very shortly after we released Monterey, and started testing it on OpenSource. I was able to reproduce the assertion on my Apple Silicon Mac at Monterey Debug ToT using the following test: run-api-tests --root /Volumes/Data/Builds/StarBravo/Debug/debugbuild282629 TestWebKitAPI.ServiceWorkers.RestoreFromDiskNonDefaultStore --iterations 100 (In reply to Robert Jenner from comment #3) > I was able to reproduce the assertion on my Apple Silicon Mac at Monterey > Debug ToT using the following test: > > run-api-tests --root /Volumes/Data/Builds/StarBravo/Debug/debugbuild282629 > TestWebKitAPI.ServiceWorkers.RestoreFromDiskNonDefaultStore --iterations 100 Those repro steps also worked on my Intel machine. Investigating. SWServer::workerContextTerminated() gets called twice for the same worker. As a result, the second time around, we get a null worker from the HashMap. (In reply to Chris Dumez from comment #5) > SWServer::workerContextTerminated() gets called twice for the same worker. > As a result, the second time around, we get a null worker from the HashMap. The first call is from SWServer::markAllWorkersForRegistrableDomainAsTerminated(), the second from SWServerWorker::contextTerminated(). Created attachment 448427 [details]
Patch
Comment on attachment 448427 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=448427&action=review > Source/WebCore/ChangeLog:13 > + we would retrieve a null worker from the HashMap and it the assertion. I updated the call to ignore "hit the assertion" Created attachment 448435 [details]
Patch
Committed r287667 (245764@main): <https://commits.webkit.org/245764@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 448435 [details]. |