GNOME Bugzilla – Bug 346423
Session recovery creates duplicate windows
Last modified: 2011-08-19 23:30:45 UTC
Please describe the problem: Mostly though not always, the session recovery duplicates the windows, so that there are two exactly identical sets of windows and tabs. I have no idea what causes that, maybe it's because I have quite a lot of items in the session_creashed.xml file. Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
Can confirm this on Ubuntu Dapper. It happens with relatively lots of windows and tabs in the (crashed) session. Can't remember if it occured with a properly saved shutdown session. I vote for increasing the severity of the bug since it is *really* annoying and when it hits, you can run out of resources rather quickly.
Could you please try to reproduce the problem with Epiphany 2.16?
Could reproduce in 2.14 with a window containing 15 tabs and one window with a single tab. If the CPU load is 100% during restore (regular saved session), the problem is exhibited. The same procedure with 2.16 from jhbuild worked fine.
*** Bug 358453 has been marked as a duplicate of this bug. ***
Ubuntu https://launchpad.net/products/epiphany-browser/+bug/66962 might be the same issue: "When Epiphany crashes just before leaving your session, the crash recovery procedure will, on the next session, load twice the number of browser instances that had crashed in the first place. That is, for example, if two browser instances crashed during logout, two additional duplicate instances will be loaded on the next session, making the total number of browser instances four. This is especially annoying when recovering several windows with several tabs open, since it takes a considerable amount of time. This behaviour, however, does not seem to happen when epiphany crashes in the middle of a session and then the recovery is initiated. ... > Thanks for your bug. What version of Ubuntu do you use? How do you make it crash "just before leaving your session"? What do you call "just before"? 1 second? 10 seconds? 1min? Do you save your session automatically on logout? Is epiphany listed by ~/.gnome2/session then? ... > What version of Ubuntu do you use? * I'm using Edgy. > How do you make it crash "just before leaving your session"? What do you call "just before"? 1 second? 10 seconds? 1min? * I do not make it crash deliberately. I notice that epihany has crashed in either of the two following ways: a) when starting a new session and the desktop has been loaded, the crash recovery dialog appears, asking me if I want to recover the previous browser windows. So I assume that epiphany crashed on the previous session (I might be wrong here). b) when the session is ending (i.e. after having presed the Quit>Shutdown button all windows closing, etc.), I see a dialog : "the application epiphany has crashed unexpectedly", which appears very briefly just before showing the logout usplash. This does not happen always, but I've noticed that it happens more frequently when I've got many application windows open in several workspaces before logging out. > Do you save your session automatically on logout? * Yes. > Is epiphany listed by ~/.gnome2/session then? These are the current contents of my ~/.gnome2/session file regarding epiphany (I had a couple of epiphany instances running when leaving my last session IIRC, but they did not crash): 6,Program=epiphany 6,CurrentDirectory=/home/dpm 6,DiscardCommand=rm -f /home/dpm/.gnome2/epiphany/session_gnome-16tOrV.xml 6,CloneCommand=epiphany --sm-config-prefix /epiphany-ws1GYJ/ 6,RestartCommand=epiphany --sm-config-prefix /epiphany-ws1GYJ/ --sm-client-id 117f000001000116101674400000051310004 --screen 0 7,id=117f000001000116129290800000051340041 ..."
I confirm this on Dapper & Edgy (both Ubuntu).
There will be no more 2.18.x releases; moving bugs off of that target milestone.
This is still happening in epiphany 2.19.91, ubuntu gutsy pre-release.
And still happening in 2.20.1 in gutsy..
The problem here is that we're both trying to load a session file from the session manager, and have the session_crashed.xml file present in the profile. Not sure which should take precedence...
Also makes me wonder if the session_crashed.xml should actually be there after a successful logout. In the last couple of days I get this daily with Ubuntu Hardy. I always log out gracefully, but sometimes I'm prompted by the restore-from-session_crashed dialog on the next login or the windows are just duplicated again.
Reality check.
Haven't seen this bug happening in quite a while.
I'm getting this a lot now that the new gnome-session is saving application session on log out and restoring it on log in, i.e. in GNOME 2.26. What I beleive is happening after logging in, after non-clean logout (e.g. xorg crash), is that that gnome-session is asking epiphany to restart with the last saved session (saved from the last clean logout) but epy is finding that session_crashed.xml also exists and so it is loading both. This is supported from the differences in the window content loaded that I'm seeing, and given intel+xorg+jaunty is opretty crashy at the moment, I'm seeing it several times per day.
Created attachment 132593 [details] [review] patch to ensure at most one session file is ever loaded Attached is a minimal, possible controversial patch, that fixes the problem for me. Comments welcome. The patch adds a flag to ensure at most session file is ever loaded, which seems reasonable assuming it should only happen on application startup. Since ephy-main queues EPHY_SESSION_CMD_RESUME_SESSION before EPHY_SESSION_CMD_LOAD_SESSION the crash session will be loaded instead of the session in argv, which also seems reasonable: If there is both a saved session file and a crash session file, you know the latter is going to be more up-to-date since it would have been removed on clean exit(?). Relatedly, it seems odd that epy doesn't seem to delete session files. Surely they should be deleted after being successfully loaded? If this did happen, this problem might not exist anyway.
Suddenly, I'm affected by this bug again (now on 2.26.1). After I was closing the duplicated windows and then logged into my session again, the duplication happened as usual. Now I decided that I don't want to keep any of these windows open anyways and closed them all, starting out with a new, smaller session. After a new login now, I always get the "crashed session" dialog (as usual), but now the old set of windows comes back in addition to the one in the new session... Maybe this was always like that and I never noticed, or maybe it's a different bug even(?). Even more mysterious, when I chose to click "don't recover" in the session recovery dialog, I *still* get these old windows back! Again, that might have always been like this since I never used that button before. This bug is just too annoying these days. It makes the browser completely unusable for me. I have started migrating to Firefox and I'm not looking back so far...
Epiphany 2.26.x is no longer maintained. Could you try to reproduce the problem on 2.28 please? Also, this problem might be triggered by session saving (System > Preferences > Startup applications > Options). Could you check that please?
"Automatically remember running applications when logging out" is enabled.
Hi, does this still happen with 3.0?
I'm not using epiphany anymore, sorry (also because of this bug).
as per comment 20 Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for. Thanks!