GNOME Bugzilla – Bug 721589
Epiphany crashes when launched from URL in external program twice in quick succession
Last modified: 2014-06-02 02:21:58 UTC
* With Epiphany closed, click on a URL in some program, maybe an email in Evolution or a page link in an About Dialog. * Hope it doesn't crash, because it does roughly half the time. * Stack trace available downstream [1] [2] [1] https://bugzilla.redhat.com/show_bug.cgi?id=1030727 [2] https://retrace.fedoraproject.org/faf/reports/215055/
Looks like a race condition? Somewhere the database is being accessed simultaneously: msg = 0x7f7d140133d0 "Could not detect table existence: database is locked" msg_alloc = 0x7f7d140133d0 "Could not detect table existence: database is locked"
Michael, are you sure ephy is really closed? It might be already running as the shell search provider.
+ Trace 233006
Thread 1 (Thread 0x7f7d65913700 (LWP 6758))
(In reply to comment #2) > Michael, are you sure ephy is really closed? It might be already running as the > shell search provider. It probably is running actually; I only meant "there are no windows open." I don't THINK this ever occurs if Epiphany already has an open window. (Could be wrong about that, though.)
(In reply to comment #0) > * Hope it doesn't crash, because it does roughly half the time. That was an overestimate; I can't seem to reproduce this at all right now....
(In reply to comment #4) > > It probably is running actually; I only meant "there are no windows open." I > don't THINK this ever occurs if Epiphany already has an open window. (Could be > wrong about that, though.) It can crash when there is an Epiphany window open. Sorry about that....
Mike Gratton found a reproducer in Bug #722766: "when Ephy is the default browser, from an external program such as an email client, clicking two links in simultaneously results in one being successfully loaded, and one instance of the spawned Ephy binary crashing. Sounds like a sqlite locking issue to me."
*** Bug 722766 has been marked as a duplicate of this bug. ***
Yeah, to clarify - this occurs when there is an existing instance of Ephy running, and _more than one_ additional instances of Ephy are launched with URL arguments to be loaded at the same time. I'm not sure if I recall seeing the primary instance ever crash - it always seems to be one of the additional ones with URL args.
So I guess in ephy-sqlite-connection.c:132, sqlite3_prepare_v2() returns SQLITE_BUSY (or perhaps SQLITE_LOCKED -- this is just a guess; I have not reproduced in gdb), but we were only expecting SQLITE_OK, so we then intentionally crash by calling g_error() in ephy_sqlite_connection_table_exists(). We should loop on the sqlite3 calls until they return real failure codes. I think 'while (sqlite3_whatever() != SQLITE_BUSY)' is typical? Hopefully this class is never used from the UI thread?
More to the point - why are such processes starting a history service when all it needs to do is notify the existing Ephy process and then exit?
Is this also happening in the master branch?
(In reply to comment #10) > We should loop on the sqlite3 calls until they return real failure codes. I > think 'while (sqlite3_whatever() != SQLITE_BUSY)' is typical? Hopefully this > class is never used from the UI thread? No, it is not meant to be used from the main thread. The history service runs all sqlite3 calls in a dedicated thread.
(In reply to comment #12) > Is this also happening in the master branch? In master, Epiphany does not crash anymore, but it doesn't work either: clicking on two links in close succession results in only one of them being opened.
(In reply to comment #14) > (In reply to comment #12) > > Is this also happening in the master branch? > > In master, Epiphany does not crash anymore, In that case I'm not very keen in spending time trying to fix this in gnome-3-10, as clicking twice in quick doesn't strike me as a common action… > but it doesn't work either: > clicking on two links in close succession results in only one of them being > opened. That would be a different bug then, and a low priority one for similar reasons.
> > (In reply to comment #12) > > > Is this also happening in the master branch? > > > > In master, Epiphany does not crash anymore, > > In that case I'm not very keen in spending time trying to fix this in > gnome-3-10, as clicking twice in quick doesn't strike me as a common action… OK, but to be clear, you don't have to click twice on the same link (which would indeed be quite uncommon): more likely, you have a list of links in your email and want to load them all.
(In reply to comment #16) > (In reply to comment #15) > > In that case I'm not very keen in spending time trying to fix this in > > gnome-3-10, as clicking twice in quick doesn't strike me as a common action… > > OK, but to be clear, you don't have to click twice on the same link (which > would indeed be quite uncommon): more likely, you have a list of links in your > email and want to load them all. Yep, exactly. This happens to me every day, it's quite frustrating having only a fraction of the links I clicked on actually loading. That master doesn't crash and now rather silently fails will make it more annoying, since at least when the Ubuntu crash handler pops up saying "The application Epiphany has crashed..." it reminds me to go back, undelete the email, find which links I was interested in, compare them to those that actually loaded, and then click - wait - click - wait - etc.
I have the following situation: * Epiphany and Evolution both open on one workspace * No other Epiphany windows open Every time I click a link in Evolution, a new instance of Epiphany is spawned and crashes with this stacktrace. It's not possible to open any link, even when opening only one at a time: Epiphany has somehow gotten itself into a state where it is guaranteed to crash. After a few minutes, opening links started working fine again. I don't know how to reproduce this. The last time this happened to me was over a week ago. I didn't realize until now it was the same crash.
How many epiphany processes were actually running at the time? What did "ps -ef | grep epip" or similar show?
I'll try that if it happens again.
This is fixed in 3.12.