Created attachment 8626516
bug336193.patch

Summary:

 * nsProfileLock is already rigged for handling signals and is already 
terminating (fatally) so it is only a small change to make it clean, this is 
preferable to a GTK-specific implementation.
 * A clean quit should be performed for SIGINT and SIGTERM, but not SIGQUIT as 
it is not intended to be clean.
 * nsAppStartup::Quit calls nsIAppShell::Exit asynchronously which does most of 
the work so it doesn't block the signal handler.
 * raise() needs to be called at some point after calling Quit().
 * To avoid SessionStore attempting to restore a crashed session, SessionFile 
needs to be closed properly, complete a final write, notify CrashMonitor with 
"sessionstore-final-state-write-complete" which then needs to write a 
checkpoint to a file asynchronously. This appears to happen before the observer 
notification "profile-change-teardown", even if it takes a long time, however 
documentation suggests the later notification "profile-before-change" is more 
appropriate.

This patch avoids SessionStore problems with SIGINT/SIGTERM by calling
Quit(eForceQuit) in the nsProfileLock signal handler and observing
"profile-before-change" for later raising the signal. As usual, if
termination takes too long a second SIGINT/SIGTERM can be sent which
causes immediate termination via the default handler and most systems
have a timeout that will also eventually kill the process.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to firefox in Ubuntu.
https://bugs.launchpad.net/bugs/73536

Title:
  MASTER Firefox crashes on instant X server shutdown

Status in Mozilla Firefox:
  In Progress
Status in firefox package in Ubuntu:
  Won't Fix
Status in firefox-3.0 package in Ubuntu:
  Triaged

Bug description:
  Firefox crashes when X server is forcefully torn down (e.g. by
  pressing ctrl-alt-backspace) and a crash report gets generated on next
  login.

  (Original Report:
  I've reproduced it once on my machine with the following steps. With, oh, 
about 5 tabs open, I just pressed ctrl-alt-backspace, logged back in when the X 
server restarted, and FF crashed with a bug report when Gnome tried to restore 
the session.

  It's not terribly important, I don't think anyone does this very often, but 
maybe it'll be helpful.
  )

To manage notifications about this bug go to:
https://bugs.launchpad.net/firefox/+bug/73536/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to