Actually, comment #14 is accurate.Calling SmcCloseConnection from
~nsNativeAppSupportUnix should always be safe, as all shutdown phases
will have completed by this point (in the current code)
I managed to understand the shutdown sequence a little better by
attaching gdb and sprinkling some breakpoints around then doing a normal
quit. I couldn't get much direct insight into quit-on-logout as just
attaching a debugger seemed to slow things down enough that firefox
would always SIGHUP, but from my newly-aqcquired understanding, the code
paths *are* the same.
Breakpoint 7, nsObserverService::NotifyObservers (this=0x7f029b4d0330,
aSubject=0x0, aTopic=0x7f02b12745a1 "profile-before-change",
aSomeData=0x7f02b1592000 <nsXREDirProvider::DoShutdown()::kShutdownPersist>
u"shutdown-persist") at
/usr/src/debug/firefox-37.0.1/mozilla-release/xpcom/ds/nsObserverService.cpp:319
319 {
[Current thread is 1 (Thread 0x7f02b3d5f780 (LWP 8791))]
#0 nsObserverService::NotifyObservers (this=0x7f029b4d0330, aSubject=0x0,
aTopic=0x7f02b12745a1 "profile-before-change", aSomeData=0x7f02b1592000
<nsXREDirProvider::DoShutdown()::kShutdownPersist> u"shutdown-persist") at
/usr/src/debug/firefox-37.0.1/mozilla-release/xpcom/ds/nsObserverService.cpp:319
#1 0x00007f02b0ab1fe0 in nsXREDirProvider::DoShutdown (this=0x7fffeed02f88) at
/usr/src/debug/firefox-37.0.1/mozilla-release/toolkit/xre/nsXREDirProvider.cpp:905
#2 0x00007f02b0aaa102 in ScopedXPCOMStartup::~ScopedXPCOMStartup
(this=0x7f02b29ac7c0, __in_chrg=<optimized out>) at
/usr/src/debug/firefox-37.0.1/mozilla-release/toolkit/xre/nsAppRunner.cpp:1324
#3 0x00007f02b0aafc63 in XREMain::XRE_main (this=0x7fffeed02f48,
argc=<optimized out>, argv=<optimized out>, aAppData=<optimized out>) at
/usr/src/debug/firefox-37.0.1/mozilla-release/toolkit/xre/nsAppRunner.cpp:4312
#4 0x00007f02b0aafeac in XRE_main (argc=1, argv=0x7fffeed04468,
aAppData=0x7fffeed03158, aFlags=<optimized out>) at
/usr/src/debug/firefox-37.0.1/mozilla-release/toolkit/xre/nsAppRunner.cpp:4505
#5 0x00000000004040fd in do_main (argc=argc@entry=1,
argv=argv@entry=0x7fffeed04468, xreDirectory=0x7f02b2949780) at
/usr/src/debug/firefox-37.0.1/mozilla-release/browser/app/nsBrowserApp.cpp:292
#6 0x000000000040389f in main (argc=1, argv=0x7fffeed04468) at
/usr/src/debug/firefox-37.0.1/mozilla-release/browser/app/nsBrowserApp.cpp:661
i.e. profile-before-change (and web-workers-shutdown which happens just
after) happens when toolkit/xre/nsAppRunner.cpp:XREMain::XRE_main
destroys the ScopedXPCOMStartup object, just after exiting the event
loop.
Breakpoint 3, nsNativeAppSupportUnix::~nsNativeAppSupportUnix
(this=0x7f02b29e5460, __in_chrg=<optimized out>) at
/usr/src/debug/firefox-37.0.1/mozilla-release/toolkit/xre/nsNativeAppSupportUnix.cpp:126
126 class nsNativeAppSupportUnix : public nsNativeAppSupportBase
[Current thread is 1 (Thread 0x7f02b3d5f780 (LWP 8791))]
#0 nsNativeAppSupportUnix::~nsNativeAppSupportUnix (this=0x7f02b29e5460,
__in_chrg=<optimized out>) at
/usr/src/debug/firefox-37.0.1/mozilla-release/toolkit/xre/nsNativeAppSupportUnix.cpp:126
#1 0x00007f02b0ab0e3e in nsNativeAppSupportBase::Release (this=0x7f02b29e5460)
at
/usr/src/debug/firefox-37.0.1/mozilla-release/toolkit/xre/nsNativeAppSupportBase.cpp:16
#2 0x00007f02b0aafebd in XRE_main (argc=1, argv=0x7fffeed04468,
aAppData=0x7fffeed03158, aFlags=<optimized out>) at
/usr/src/debug/firefox-37.0.1/mozilla-release/toolkit/xre/nsAppRunner.cpp:4507
#3 0x00000000004040fd in do_main (argc=argc@entry=1,
argv=argv@entry=0x7fffeed04468, xreDirectory=0x7f02b2949780) at
/usr/src/debug/firefox-37.0.1/mozilla-release/browser/app/nsBrowserApp.cpp:292
#4 0x000000000040389f in main (argc=1, argv=0x7fffeed04468) at
/usr/src/debug/firefox-37.0.1/mozilla-release/browser/app/nsBrowserApp.cpp:661
...whereas ~nsNativeAppSupportUnix is called when it goes out of scope
when XRE_main returns,so is necessarily later.
As for the appService->Quit() called from die_cb (DieCB in the patch),
it does indeed deliberately queue the work of exiting for after it
returns:
// Quit the application. We will asynchronously call the appshell's
// Exit() method via nsAppExitEvent to allow one last pass
// through any events in the queue. This guarantees a tidy cleanup.
So attachment 608321 (with minor tweaks) should indeed fix bug #557601. I'm not
sure whether it can be fixed in the current code.
--
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to thunderbird in Ubuntu.
https://bugs.launchpad.net/bugs/867424
Title:
Oneric: On boot up Firefox always displays the “Well, This Is
Embarrassing” screen.
Status in Mozilla Firefox:
Fix Released
Status in firefox package in Ubuntu:
Triaged
Status in thunderbird package in Ubuntu:
Triaged
Status in firefox source package in Precise:
Triaged
Status in thunderbird source package in Precise:
Triaged
Bug description:
This happens on every restart or boot. Firefox fails to load previous
tabs.
ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: firefox 7.0.1+build1+nobinonly-0ubuntu1
ProcVersionSignature: Ubuntu 3.0.0-12.19-generic 3.0.4
Uname: Linux 3.0.0-12-generic x86_64
NonfreeKernelModules: nvidia
AddonCompatCheckDisabled: False
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
AplayDevices: aplay: device_list:240: no soundcards found...
ApportVersion: 1.23-0ubuntu2
Architecture: amd64
ArecordDevices: arecord: device_list:240: no soundcards found...
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/by-path',
'/dev/snd/controlC0', '/dev/snd/hwC0D0', '/dev/snd/pcmC0D0c',
'/dev/snd/pcmC0D0p', '/dev/snd/pcmC0D1p', '/dev/snd/pcmC0D2c', '/dev/snd/seq',
'/dev/snd/timer'] failed with exit code 1:
BuildID: 20110929022028
CRDA: Error: [Errno 2] No such file or directory
Channel: release
Date: Tue Oct 4 13:15:01 2011
ForcedLayersAccel: False
IfupdownConfig:
auto lo
iface lo inet loopback
IncompatibleExtensions: NoScript - ID={73a6fe31-595d-460b-a920-fcc0f8843232},
Version=2.1.4rc2, minVersion=1.9a2, maxVersion=1.9.6, Location=app-profile,
Type=extension, Active=Yes
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Beta amd64 (20110910)
IpRoute:
default via 192.168.1.1 dev eth0 proto static
169.254.0.0/16 dev eth0 scope link metric 1000
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.4 metric 1
IwConfig:
lo no wireless extensions.
eth0 no wireless extensions.
ProcEnviron:
LANGUAGE=en_GB:en
LANG=en_GB.UTF-8
SHELL=/bin/bash
Profiles: Profile0 (Default) - LastVersion=7.0.1/20110929022028 (Running)
RfKill:
RunningIncompatibleAddons: True
SourcePackage: firefox
UpgradeStatus: No upgrade log present (probably fresh install)
UserJS: general.useragent.vendor - Firefox
dmi.bios.date: 01/23/2008
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 0304
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: M3A78-EH
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: Rev 1.xx
dmi.chassis.asset.tag: Asset-1234567890
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.version: Chassis Version
dmi.modalias:
dmi:bvnAmericanMegatrendsInc.:bvr0304:bd01/23/2008:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKComputerINC.:rnM3A78-EH:rvrRev1.xx:cvnChassisManufacture:ct3:cvrChassisVersion:
dmi.product.name: System Product Name
dmi.product.version: System Version
dmi.sys.vendor: System manufacturer
To manage notifications about this bug go to:
https://bugs.launchpad.net/firefox/+bug/867424/+subscriptions
--
Mailing list: https://launchpad.net/~desktop-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help : https://help.launchpad.net/ListHelp