Multi-second hang during CollectNewLoadedModules

RESOLVED FIXED in Firefox 20

Status

()

Core
Widget: Win32
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: vladan, Assigned: Ehsan)

Tracking

(Blocks: 1 bug)

Trunk
mozilla21
x86_64
Windows 7
Points:
---

Firefox Tracking Flags

(firefox20 fixed)

Details

(Whiteboard: [Snappy:P2])

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
I noticed a 5 second main-thread hang with the following stack:

NtWaitForSingleObject (in wntdll.pdb)
RtlpDeCommitFreeBlock (in wntdll.pdb)
LdrQueryModuleInfoLocalLoaderLock (in wntdll.pdb)
RtlQueryProcessModuleInformation (in wntdll.pdb)
RtlQueryProcessDebugInformation (in wntdll.pdb)
ThpCreateRawSnap (in wkernel32.pdb)
CreateToolhelp32Snapshot (in wkernel32.pdb)
CollectNewLoadedModules (in xul.pdb)
nsAppShell::ProcessNextNativeEvent(bool) (in xul.pdb)
nsBaseAppShell::OnProcessNextEvent(nsIThreadInternal *,bool,unsigned int) (in xul.pdb)
nsThread::ProcessNextEvent(bool,bool *) (in xul.pdb)
mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate *) (in xul.pdb)
MessageLoop::RunHandler() (in xul.pdb)
MessageLoop::Run() (in xul.pdb)
nsBaseAppShell::Run() (in xul.pdb)
nsAppShell::Run() (in xul.pdb)
nsAppStartup::Run() (in xul.pdb)
XREMain::XRE_mainRun() (in xul.pdb)
XREMain::XRE_main(int,char * * const,nsXREAppData const *) (in xul.pdb)
XRE_main (in xul.pdb)
do_main (in firefox.pdb)
wmain (in firefox.pdb)
__tmainCRTStartup (in firefox.pdb)
BaseThreadInitThunk (in wkernel32.pdb)
__RtlUserThreadStart (in wntdll.pdb)
_RtlUserThreadStart (in wntdll.pdb)

This stack is also a frequent chrome-hang. Can we make the CreateToolhelp32Snapshot call off the main thread?
Blocks: 524944
Created attachment 702393 [details] [diff] [review]
Remove the unneeded code
Assignee: nobody → ehsan
Status: NEW → ASSIGNED
Attachment #702393 - Flags: review?(benjamin)
Comment on attachment 702393 [details] [diff] [review]
Remove the unneeded code

Review of attachment 702393 [details] [diff] [review]:
-----------------------------------------------------------------

Yes! I don't believe we ever had use for this code. Definitely should go.
Attachment #702393 - Flags: review+
(Reporter)

Updated

4 years ago
Whiteboard: [Snappy:P2]
Attachment #702393 - Flags: review?(benjamin)
http://hg.mozilla.org/integration/mozilla-inbound/rev/97e4a7b942cd
https://hg.mozilla.org/mozilla-central/rev/97e4a7b942cd
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
Comment on attachment 702393 [details] [diff] [review]
Remove the unneeded code

[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 524944, sort of.  This was debugging code landed there and never taken out.
User impact if declined: This seems to be one of big chrome hang items that Vladan has been seeing.  As this is pretty much risk free, I think it would be nice to take it on branches.
Testing completed (on m-c, etc.): m-c
Risk to taking this patch (and alternatives if risky): this is just removing unused debugging code.  I'll say risk free.
String or UUID changes made by this patch: none.
Attachment #702393 - Flags: approval-mozilla-beta?
Attachment #702393 - Flags: approval-mozilla-aurora?
Comment on attachment 702393 [details] [diff] [review]
Remove the unneeded code

Let's go with uplifting this to Aurora but even though it may be low risk, I think it's too late to take this on Beta and we'll just have to wait for it.
Attachment #702393 - Flags: approval-mozilla-beta?
Attachment #702393 - Flags: approval-mozilla-beta-
Attachment #702393 - Flags: approval-mozilla-aurora?
Attachment #702393 - Flags: approval-mozilla-aurora+
https://hg.mozilla.org/releases/mozilla-aurora/rev/88daa2beccb3
status-firefox20: --- → fixed
You need to log in before you can comment on or make changes to this bug.