Comment on attachment 8626516
bug336193.patch

Unfortunately, the last paragraph of comment 23 is still relevant.

(In reply to Kestrel from comment #39)
>  * nsAppStartup::Quit calls nsIAppShell::Exit asynchronously which does most
> of the work so it doesn't block the signal handler.

It is more complicated than just not blocking the signal handler.
See man 7 signal:
  "Async-signal-safe functions
       A signal handler function must be very careful, since processing
       elsewhere may be interrupted at some arbitrary point in the execution
       of the program.  POSIX has the concept of "safe function".  If a
       signal interrupts the execution of an unsafe function, and handler
       calls an unsafe function, then the behavior of the program is
       undefined."

One of the most likely problems is taking a lock, if the process is
interrupted with the lock already held.  For example,
nsComponentManagerImpl::GetService() uses locks, and memory allocations
are also likely to use locks.

Also, unless the signal mask of every thread is carefully managed, the
signals may be received on any thread.  Therefore any methods called
that have state would need to be thread-safe, but locks can't be used
for the reason described above.

"A process-directed signal may be delivered to any one of the threads that
 does not currently have the signal blocked.  If more than one of the threads
 has the signal unblocked, then the kernel chooses an arbitrary thread to
 which to deliver the signal."

-- 
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