Closed Bug 1381265 Opened 9 years ago Closed 9 years ago

Firefox hangs for ~1 min whenever laptop is opened

Categories

(Core :: Widget: Cocoa, defect)

54 Branch
Unspecified
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: bytesized, Unassigned)

Details

Attachments

(1 file)

Attached file about:support page —
Every time I open my laptop, consistently, Firefox refuses to respond for about a full minute. After it comes back, all of the actions that I performed since it hung (since I opened the laptop) seem to take effect (ex tab changes, scrolling). It makes no difference whether I am on battery power or plugged in. I have discovered that selecting "Firefox->About Firefox" from the menu seems to "break" the hang and cause things to start working again immediately. Release channel (54.0.1, 64-bit) MacOS Sierra Version 10.12.5 MacBook Air (13-inch, Early 2014) I am using a clean profile.
I should probably mention that no other application hangs; just Firefox. I recorded two profiles with the profiler extension. Both times I started the profiler before shutting the computer. When I recorded this one, I waited out the time for the hang to stop, attempting to scroll until something happened: https://perfht.ml/2ult8ci When I recorded this one, I clicked "Firefox->About Firefox" from the menu to "break" the hang: https://perfht.ml/2t2fLtz Oddly, however, when capturing this one I discovered that even after "breaking" the hang, the profiler extension seems to not work for about the same duration that the hang would have lasted. Its panel opens fine, but clicking "Discard and Stop" or "Capture Profile" doesn't work until the normal hang duration has passed (even though the rest of Firefox seemed to be responding properly). Because of that, I made this profile a bit longer. In order to try to make sure I captured the whole event, this is what I did: started the profiler, closed and reopened the laptop, clicked "Firefox->About Firefox" from the menu, scrolled around to make sure Firefox was responding, counted to 60, clicked "Capture Profile".
Ehsan, do these profiles make any sense to you? Its like nsRefreshDriver is just not running for up to 1 minute. If Kirk triggers a chrome script popup it seems to force painting to start again.
Flags: needinfo?(ehsan)
Hmm. Last night my OS updated and since then I cannot reproduce this problem. We can keep this open if someone can find a bug from the profiles, but I am not sure I can be of further help.
I don't understand these profiles. Seems like we're just idle all the time. Markus, what do you think?
Flags: needinfo?(ehsan) → needinfo?(mstange)
I remember seeing this issue about five years ago, on a different machine. But the unresponsive time after sleep was more like 10 seconds, not a whole minute. What's happening here is that we don't process Gecko events, because the native event loop simply doesn't call our entry point to the Gecko event loop. We only process native events. I don't know why this happens. The entry point to our gecko event loop is our nsAppShell::mCFRunLoopSource, which we install using ::CFRunLoopAddSource(mCFRunLoop, mCFRunLoopSource, kCFRunLoopCommonModes); Maybe we're in a run loop mode that's not matched by kCFRunLoopCommonModes during the time when this "hang" happens? I don't know.
Flags: needinfo?(mstange)
Component: General → Widget: Cocoa
This does not appear to be actionable at the moment. If someone can reproduce, please reopen.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: