New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Service Worker related crashes #5634
Comments
I seem to have solved my qutebrowser crashes by putting this (and only this) line in my config.py: config.source('C:\\Users\\username\\Sync\\qb\\config2.py') I wrote about this in https://www.ii.com/qutebrowser-tips-fragments/#_compartmentalizing_config_py. Here's an excerpt:
Maybe this data point will help figure out what's causing these crashes. |
@nancym Hm, I don't see how that would make any difference. Did you by any chance also clean your qutebrowser data directory (or the service worker directory contained in it?) when doing that? Could you maybe reverse that change and see if you see those crashes again? I'd be quite surprised! |
Yes, I quit using my qutebrowser default config and data directories and now use only my above-mentioned Sync directory. I spent literally tens (maybe hundreds!) of hours dealing with this, including downloading debugging tools from Microsoft. I agree that this is a weird solution, but it worked for me. Maybe ask others, e.g. the person in that Reddit thread, to try this. If I were a member of Reddit, I would post there… My data directory used to contain only my userscripts. Now I call all my userscripts with a full (not relative) path to my Sync directory - maybe this is the secret?! |
Then the thing fixing this issue was deleting the data directory, not the config change. The problem is that something in there (the service worker cache) gets corrupted and causes those crashes (as soon as a website uses a service worker) until the corrupted data gets removed. Then it works again until it mysteriously gets corrupted again. |
Aha, so a workaround that may work for others is to do whatever is needed to put stuff that normally goes in the data directory elsewhere. For me, that was to specify all my userscripts with a full (not relatative) path pointing at my Sync directory. I just looked at my qutebrowser default data directory and it has a lot in it so maybe only |
No, the problem is in the The problem (and what's making this so hard to track down) is that the corruption seems to happen very rarely. Once it has happened, reproducing the crashes is easy (as they are somewhat common), but the crucial question is why that corruption is happening. |
Hm, I also wonder how much this is related to a second corruption nobody has been able to explain so far, #5606 (and the issues linked there). @nancym, do you happen to remember if you ever saw an "Errors occurred while reading state" message (screenshot) before this started happening? |
Looks like this still sometimes happen (though rarely) on Linux: https://termbin.com/f9l1 |
With 7d8fd50 I've now introduced a new I'm not really happy with that workaround (and I'd still hope someone gets a reliable reproducer for this some day, so that I can report this properly to Qt upstream) - but I guess for affected people it's a better escape hatch than having to write a wrapper script around qutebrowser. |
Moving 'Service Workers' directory fixed my issue, thank you. Off-topic: Only today I've realized what a great job you're doing when my qutebrowser died and I had to use others... what a pain in the neck it was. |
In this Reddit thread, u/Cognhuepan says they're on Fedora 34 and:
|
Another possible lead from this reddit thread:
and then shutting down with |
I have the same issue, about 2 or three times per day, and usually have a gmail or twitter tab when the issue happens. I'm on linux (ubuntu 20.04), so it also happens there. I'm trying the fix |
So it looks like We should probably look into changing the crash dialog for qutebrowser so that it proposes this as a solution for segfaults rather than offering to submit a crash report - almost nobody seems to add information to those anyways... |
Had the same issues and moving that directory fixed it. I probably sent 50+ bug reports, these can likely be reduced to this single issue.
I agree, that would probably help users who don't try to investigate into this issue a lot further. Because qutebrowser with |
Summary if you've been linked to this issue due to crashes
Due to a yet-unknown issue (possibly unclean shutdowns of qutebrowser?), the "Service Worker" storage used by the underlying QtWebEngine/Chromium gets corrupted. When qutebrowser is used with such a corrupt Service Worker storage, crashes will occur on pages which use the corrupted data, such as GMail. We've unfortunately never been able to figure out what causes the corruption (happening in the qutebrowser run before the crashes start!), help tracking this down would be much appreciated.
As a one-time fix, remove the
webengine/Service Workers
directory in qutebrowser's data directory (e.g.~/.local/share/qutebrowser/webengine/Service Worker
on Linux, see `:version for the exact location of the data directory). It's unclear whether websites are storing any data supposed to be persistent in there, but no such case is known so far, so it should be safe to delete.As a permanent workaround, run
:set qt.workarounds.remove_service_workers true
. This make qutebrowser automatically remove the data (corrupted or not) on every start. Be aware that this will negatively impact the startup time (especially on a HDD) and could in theory delete data supposed to be persistent (see above). Please also consider first only removing the directory manually, in order to help track down what exactly causes the problem to appear again.Original issue
Apparently QtWebEngine 5.15 still has some kind of issue with service workers. This is mostly a continuation of #4853 and #5279, i.e. a bug (or several) which has been following us in one way or another for over a year now 😢
The reproducer from #5279 with the Epic Games Store doesn't seem to reproduce the issue this time around, and the
--disable-shared-workers
workaround which is active for Qt 5.14 doesn't seem to help, according to a Reddit post.Analyzing the crash with DebugDiag yields an unusable stacktrace (full log):
However, kiburtse of the Qt Company did some crazy work at hand-decoding it:
At this point I'm not 100% sure it's Windows specific (I think I've heard of people on Linux who have crashes which are solved by moving the Service Worker directory away), but it definitely seems to mostly happen on Windows.
To clarify: This isn't a bug in qutebrowser, I'm just opening this to have a place to track anything new we find out. Right now it'd still really help to have a reliable reproducer.
The text was updated successfully, but these errors were encountered: