Bug 1603684 Comment 8 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Tom Tung [:tt, :ttung] from comment #7)
> Hmm, I thought it's this [line](https://searchfox.org/mozilla-central/rev/c61720a7d0c094d772059f9d6a7844eb7619f107/dom/serviceworkers/ServiceWorkerRegistrar.cpp#1217-1218) because the crash reason on the reports is "Failed to get async shutdown service: NS_ERROR_FILE_NOT_FOUND"
Yes, that seems to be the point of failure.

> Checking the code for getting the async shutdown service, the other component use`nsCOMPtr<nsIAsyncShutdownService> svc = services::GetAsyncShutdown();` rather than `nsCOMPtr<nsIAsyncShutdownService> svc =
>       do_GetService("@mozilla.org/async-shutdown-service;1", &rv);`, maybe that block of code in the `ServiceWorkerRegistrar.cpp` needs to be changed? However, I have no idea whether this is the cause, TBH.
`mozilla::services::GetAsyncShutdown()` calls an internal function that seems to do essentially the same but adds caching of the result. [see 1](https://searchfox.org/mozilla-central/source/__GENERATED__/__linux64__/xpcom/build/Services.cpp#262). So I would not expect this change to help, though it surely better to use the given  functions and to not rely on the string identifiers copied into the code.

I see a [thread working](https://crash-stats.mozilla.org/report/index/791b56f2-3db8-4c28-99e3-9d8670191208#allthreads) while this happens, `Thread 24, Name: Cookie`, it is deleting the cookie database ? Might be totally unrelated, but could this indicate, that something else did not yet initialize when we expect it to be ready? After all, it is async and we do not wait here... I did not yet check other traces, if this is a pattern, however.
(In reply to Tom Tung [:tt, :ttung] from comment #7)
> Hmm, I thought it's this [line](https://searchfox.org/mozilla-central/rev/c61720a7d0c094d772059f9d6a7844eb7619f107/dom/serviceworkers/ServiceWorkerRegistrar.cpp#1217-1218) because the crash reason on the reports is "Failed to get async shutdown service: NS_ERROR_FILE_NOT_FOUND"

Yes, that seems to be the point of failure.

> Checking the code for getting the async shutdown service, the other component use`nsCOMPtr<nsIAsyncShutdownService> svc = services::GetAsyncShutdown();` rather than `nsCOMPtr<nsIAsyncShutdownService> svc =
>       do_GetService("@mozilla.org/async-shutdown-service;1", &rv);`, maybe that block of code in the `ServiceWorkerRegistrar.cpp` needs to be changed? However, I have no idea whether this is the cause, TBH.

`mozilla::services::GetAsyncShutdown()` calls an internal function that seems to do essentially the same but adds caching of the result. [see 1](https://searchfox.org/mozilla-central/source/__GENERATED__/__linux64__/xpcom/build/Services.cpp#262). So I would not expect this change to help, though it surely better to use the given  functions and to not rely on the string identifiers copied into the code.

I see a [thread working](https://crash-stats.mozilla.org/report/index/791b56f2-3db8-4c28-99e3-9d8670191208#allthreads) while this happens, `Thread 24, Name: Cookie`, it is deleting the cookie database ? Might be totally unrelated, but could this indicate, that something else did not yet initialize when we expect it to be ready? After all, it is async and we do not wait here... I did not yet check other traces, if this is a pattern, however.
(In reply to Tom Tung [:tt, :ttung] from comment #7)
> Hmm, I thought it's this [line](https://searchfox.org/mozilla-central/rev/c61720a7d0c094d772059f9d6a7844eb7619f107/dom/serviceworkers/ServiceWorkerRegistrar.cpp#1217-1218) because the crash reason on the reports is "Failed to get async shutdown service: NS_ERROR_FILE_NOT_FOUND"

Yes, that seems to be the point of failure.

> Checking the code for getting the async shutdown service, the other component use`nsCOMPtr<nsIAsyncShutdownService> svc = services::GetAsyncShutdown();` rather than `nsCOMPtr<nsIAsyncShutdownService> svc =
>       do_GetService("@mozilla.org/async-shutdown-service;1", &rv);`, maybe that block of code in the `ServiceWorkerRegistrar.cpp` needs to be changed? However, I have no idea whether this is the cause, TBH.

`mozilla::services::GetAsyncShutdown()` calls an internal function that seems to do essentially the same but adds caching of the result. [see 1](https://searchfox.org/mozilla-central/source/__GENERATED__/__linux64__/xpcom/build/Services.cpp#262). So I would not expect this change to help, though it is surely better to use the given  functions and to not rely on the string identifiers copied into the code.

I see a [thread working](https://crash-stats.mozilla.org/report/index/791b56f2-3db8-4c28-99e3-9d8670191208#allthreads) while this happens, `Thread 24, Name: Cookie`, it is deleting the cookie database ? Might be totally unrelated, but could this indicate, that something else did not yet initialize when we expect it to be ready? After all, it is async and we do not wait here... I did not yet check other traces, if this is a pattern, however.

Back to Bug 1603684 Comment 8