Closed Bug 1289405 Opened 8 years ago Closed 4 years ago

Restarts to update and quits frequently spin for extended/indefinite time after all windows closed. [@ IPCError-browser | ShutDownKill ]

Categories

(Core :: General, defect)

50 Branch
x86_64
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: sheppy, Unassigned, NeedInfo)

References

(Blocks 1 open bug)

Details

Crash Data

When I restart to update Firefox, at least 50% to 75% of the time, it gets all the windows closed, then just sits there for a long time. It's not locked up (the Mac doesn't show it as such, anyway), but it simply doesn't do anything else. Sometimes this goes on for 15 minutes, sometimes it's an hour, sometimes longer. If I'm patient and wait it out, it does seem eventually to complete the process of quitting and restarting itself, but it can take a crazy long time.

The same issue also happens on a simple quit -- all windows close, then Firefox is still doing... something... for ages before it finally closes down.

This has been going on for many months; possibly a year or more. I have built new profiles to no effect.

I'm on OS X 10.11.6 but this has gone on through many releases.

The problem doesn't happen if I have no add-ons installed. If I have add-ons -- and it doesn't matter which or how many -- this problem seems to go away. So does my previously reported problem of tab switching and opening new tabs presenting a beachball for a while.

I'm told that e10s is supposed to kill the hung process automatically -- but it's not hung; it's just running for a long long time without doing anything user-visible.

I've included in the URL field a link to a crash report on this morning's kill during the attempt to restart stalling for about 10 minutes before I couldn't take it anymore.
FWIW, the bug I filed previously about tab switching beachballs (which also seems to be related to whether or not I have any add-ons at all), is bug 1163272.
Can you post some more of these crashreports?
Flags: needinfo?(eshepherd)
See Also: → 1286053
(In reply to :Gijs Kruitbosch (Gone July 28 - Aug 11) from comment #2)
> Can you post some more of these crashreports?

I think these are all this same scenario, but I can't be certain - a lot of the time, my crash reports get caught up in the pipes and don't send until much later, and since they're labeled with the submission date rather than the date/time at which the crash occurred, I can't easily figure out which are which.

https://crash-stats.mozilla.com/report/index/31a21d3d-799e-4319-b61b-141c72160726
https://crash-stats.mozilla.com/report/index/f605841c-3173-43fc-b4e1-300d52160627
https://crash-stats.mozilla.com/report/index/8341e20b-0153-477c-8589-734ab2160726
https://crash-stats.mozilla.com/report/index/9864fead-86bf-4691-abda-7e1ea2160726
https://crash-stats.mozilla.com/report/index/cea5e461-84a4-4cce-a58e-c544f2160726
https://crash-stats.mozilla.com/report/index/6928af0c-42e6-44f1-98bd-b6de12160726
https://crash-stats.mozilla.com/report/index/de89e3e6-aa8d-4abf-bc72-ce70c2160710

I have *tons* of these.
Flags: needinfo?(eshepherd)
Almost all of these are crashing while we're running JS in pagehide/unload handlers.

Sheppy, does the same thing happen if you try turning off e10s?

Mike, do you know if the shutdown sequence for non-e10s is materially different? Do we not fire unload/pagehide when the process goes away in that case?

Esp. pagehide doesn't seem like something we need to fire here.

(In reply to Eric Shepherd [:sheppy] from comment #0)
> The problem doesn't happen if I have no add-ons installed. If I have add-ons
> -- and it doesn't matter which or how many -- this problem seems to go away.
> So does my previously reported problem of tab switching and opening new tabs
> presenting a beachball for a while.

I'm assuming you mean, the problem *does* happen when you have add-ons installed. I somewhat expect that it *does* matter which add-ons you install, because I expect that in large portions it'll be the add-ons that add the pagehide/unload handlers... but I don't know off-hand which of them would be guilty there. :-\
Flags: needinfo?(mconley)
Flags: needinfo?(eshepherd)
I just took a look at the first bunch of crash reports, and here's my analysis:

1) These are all content process shutdown crashes
2) In the crashes I looked at, something is sending a sync message to the parent, and is just idling, waiting for the parent to respond. Some of these are CPOW messages (indicating an add-on is doing something) and some of these are sync messages sent by what might be our own code.

> The problem doesn't happen if I have no add-ons installed.

This, I think, is where we need to focus. We need to determine which add-on is injecting the code that is causing the hang. Would you be willing to try "bisecting" your add-ons to try to find out which one is causing the issue?
Flags: needinfo?(mconley)
Component: Untriaged → General
Product: Firefox → Core
(In reply to :Gijs Kruitbosch from comment #4)
> Almost all of these are crashing while we're running JS in pagehide/unload
> handlers.
> 
> Sheppy, does the same thing happen if you try turning off e10s?

Yes. At least, it used to. It was happening without e10s, then I started using e10s a couple of months back. Want me to switch it back off and see how things go, just in case?

> (In reply to Eric Shepherd [:sheppy] from comment #0)
> > The problem doesn't happen if I have no add-ons installed. If I have add-ons
> > -- and it doesn't matter which or how many -- this problem seems to go away.
> > So does my previously reported problem of tab switching and opening new tabs
> > presenting a beachball for a while.
> 
> I'm assuming you mean, the problem *does* happen when you have add-ons
> installed. I somewhat expect that it *does* matter which add-ons you
> install, because I expect that in large portions it'll be the add-ons that
> add the pagehide/unload handlers... but I don't know off-hand which of them
> would be guilty there. :-\

Yeah, I suppose that's the more accurate way to put it.
Flags: needinfo?(eshepherd)
(In reply to Mike Conley (:mconley) - (needinfo me!) from comment #5)

> > The problem doesn't happen if I have no add-ons installed.
> 
> This, I think, is where we need to focus. We need to determine which add-on
> is injecting the code that is causing the hang. Would you be willing to try
> "bisecting" your add-ons to try to find out which one is causing the issue?

I've spent some time doing that already, and it seems like if I have any one of my add-ons installed, it freezes this way if the browser's been running for a while. I can do more of this more formally if it would help, although I'll have to negotiate the time lost on my regular work. :)
Blocks: shutdownkill
Crash Signature: [@ IPCError-browser | ShutDownKill ]
OS: Unspecified → Mac OS X
Hardware: Unspecified → x86_64
Version: unspecified → 50 Branch
See Also: IPCError_ShutDownKill
Summary: Restarts to update and quits frequently spin for extended/indefinite time after all windows closed → Restarts to update and quits frequently spin for extended/indefinite time after all windows closed. [@ IPCError-browser | ShutDownKill ]
Eric, are you still experiencing this problem?

What versions of firefox do you experience this problem with?

Could you post some more recent crash report IDs?
Flags: needinfo?(eshepherd)

Closing because no crashes reported for 12 weeks.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.