Closed
Bug 820609
Opened 12 years ago
Closed 11 years ago
Firefox sometimes hangs with 100% CPU in spellchecker code
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: mcsmurf, Unassigned)
Details
(Keywords: hang)
Note: I'm filing this bug for another user/developer, so I'm telling here what I got from the user.
Sometimes Firefox hangs with 100% CPU when the focus is in a form field (four times since FF 17.0.1 release). According to a bit of debugging it loops in hunspell code. The problems occur on a rather old machine.
Stacktrace 1:
0012b668 01967ba9 xul!HashMgr::load_tables(char * tpath = 0x1e99f000 "h ???", char * key = 0x0012b6a0 "???")+0xfb [e:\builds\moz2_slave\rel-m-rel-w32-bld\build\extensions\spellcheck\hunspell\src\hashmgr.cpp @ 454]
0012b680 01973208 xul!HashMgr::HashMgr(char * tpath = 0x105fc300 "", char * apath = 0x0dd31158 "F:\SEB.NET\Daten\Anwendungsdaten\Firefox-Profile\Hauptprofil\extensions\en-US@dictionaries.addons.mozilla.org\dictionaries\en-US.aff", char * key = 0x0012b71c "???")+0x55 [e:\builds\moz2_slave\rel-m-rel-w32-bld\build\extensions\spellcheck\hunspell\src\hashmgr.cpp @ 89]
0012b6a0 01c0c95c xul!Hunspell::Hunspell(char * affpath = 0x0dd31158 "F:\SEB.NET\Daten\Anwendungsdaten\Firefox-Profile\Hauptprofil\extensions\en-US@dictionaries.addons.mozilla.org\dictionaries\en-US.aff", char * dpath = 0x115728a8 "F:\SEB.NET\Daten\Anwendungsdaten\Firefox-Profile\Hauptprofil\extensions\en-US@dictionaries.addons.mozilla.org\dictionaries\en-US.dic", char * key = 0x0012b71c "???")+0x40 [e:\builds\moz2_slave\rel-m-rel-w32-bld\build\extensions\spellcheck\hunspell\src\hunspell.cpp @ 79]
0012b78c 01c42d5d xul!mozHunspell::SetDictionary(wchar_t * aDictionary = 0x079b8e80 "en-US")+0x1d0 [e:\builds\moz2_slave\rel-m-rel-w32-bld\build\extensions\spellcheck\hunspell\src\mozhunspell.cpp @ 216]
0012b7cc 01b916a5 xul!mozSpellChecker::SetCurrentDictionary(class nsAString_internal * aDictionary = 0x0012bb68)+0xa1 [e:\builds\moz2_slave\rel-m-rel-w32-bld\build\extensions\spellcheck\src\mozspellchecker.cpp @ 356]
0012b894 015e2935 xul!nsEditorSpellCheck::SetCurrentDictionary(class nsAString_internal * aDictionary = 0x0012bb68)+0xec [e:\builds\moz2_slave\rel-m-rel-w32-bld\build\editor\composer\src\nseditorspellcheck.cpp @ 538]
0012b8a8 0141796a xul!NS_InvokeByIndex_P(class nsISupports * that = 0x1937f680, unsigned int methodIndex = 0x11, unsigned int paramCount = 1, struct nsXPTCVariant * params = 0x0012b978)+0x27 [e:\builds\moz2_slave\rel-m-rel-w32-bld\build\xpcom\reflect\xptcall\src\md\win32\xptcinvoke.cpp @ 71]
0012badc 01414f6b xul!XPCWrappedNative::CallMethod(class XPCCallContext * ccx = 0x1e99f00a, XPCWrappedNative::CallMode mode = CALL_METHOD (0n0))+0x34a [e:\builds\moz2_slave\rel-m-rel-w32-bld\build\js\xpconnect\src\xpcwrappednative.cpp @ 2406]
0012bc74 100055b9 xul!XPC_WN_CallMethod(struct JSContext * cx = 0x0951b240, unsigned int argc = 1, class JS::Value * vp = 0x040a0128)+0xdb [e:\builds\moz2_slave\rel-m-rel-w32-bld\build\js\xpconnect\src\xpcwrappednativejsops.cpp @ 1478]
Stacktrace 2 (from a few seconds later, after resuming the program and breaking in WinDBG again):
0012b590 78abc0b9 MSVCR100!_read_nolock(int fh = 0n5, void * inputbuf = 0x02821368, unsigned int cnt = <Value unavailable error>)+0x260 [f:\dd\vctools\crt_bld\self_x86\crt\src\read.c @ 277]
0012b5d4 78abce99 MSVCR100!_read(int fh = 0n5, void * buf = 0x02821368, unsigned int cnt = 0x1000)+0xb7 [f:\dd\vctools\crt_bld\self_x86\crt\src\read.c @ 92]
0012b5ec 78b0357b MSVCR100!_filbuf(struct _iobuf * str = 0x78b52068)+0x72 [f:\dd\vctools\crt_bld\self_x86\crt\src\_filbuf.c @ 136]
0012b62c 017d595d MSVCR100!fgets(char * string = 0x1e99f008 "drue8", int count = 0n65530, struct _iobuf * str = 0x78b52068)+0xf8 [f:\dd\vctools\crt_bld\self_x86\crt\src\fgets.c @ 80]
0012b640 018bdcdc xul!FileMgr::getline(void)+0x21 [e:\builds\moz2_slave\rel-m-rel-w32-bld\build\extensions\spellcheck\hunspell\src\filemgr.cpp @ 72]
0012b668 01967ba9 xul!HashMgr::load_tables(char * tpath = 0x1e99f000 "h ???", char * key = 0x0012b6a0 "???")+0xe8 [e:\builds\moz2_slave\rel-m-rel-w32-bld\build\extensions\spellcheck\hunspell\src\hashmgr.cpp @ 453]
0012b680 01973208 xul!HashMgr::HashMgr(char * tpath = 0x105fc300 "", char * apath = 0x0bc7ebd8 "F:\SEB.NET\Daten\Anwendungsdaten\Firefox-Profile\Hauptprofil\extensions\fr-moderne@dictionaries.addons.mozilla.org\dictionaries\fr-xx-moderne.aff", char * key = 0x0012b71c "???")+0x55 [e:\builds\moz2_slave\rel-m-rel-w32-bld\build\extensions\spellcheck\hunspell\src\hashmgr.cpp @ 89]
0012b6a0 01c0c95c xul!Hunspell::Hunspell(char * affpath = 0x0bc7ebd8 "F:\SEB.NET\Daten\Anwendungsdaten\Firefox-Profile\Hauptprofil\extensions\fr-moderne@dictionaries.addons.mozilla.org\dictionaries\fr-xx-moderne.aff", char * dpath = 0x05426ed8 "F:\SEB.NET\Daten\Anwendungsdaten\Firefox-Profile\Hauptprofil\extensions\fr-moderne@dictionaries.addons.mozilla.org\dictionaries\fr-xx-moderne.dic", char * key = 0x0012b71c "???")+0x40 [e:\builds\moz2_slave\rel-m-rel-w32-bld\build\extensions\spellcheck\hunspell\src\hunspell.cpp @ 79]
Notice how in both cases the memory address of dpath/tpath changes in the call from Hunspell::Hunspell to HashMgr::HashMgr. That way the path to the .dic file disappears(?). I'm not sure what's happening there.
Comment 1•12 years ago
|
||
Is this from an optimized build? Is it reproducible? If yes, any chance you can profile this? <https://developer.mozilla.org/en/Performance/Profiling_with_the_Built-in_Profiler>
Reporter | ||
Comment 2•12 years ago
|
||
Archaeopteryx: Can you add the requested information from Comment 1? You also said something about the Dictionary Switcher addon iirc?
![]() |
||
Comment 3•12 years ago
|
||
This is with the official Windows 17.0.1 release build. I was able to experience this issue three times on Wikipedia forms with very long texts (once even when clicking in a disable form after scrolling it). I disabled the Lazarus extension ( https://addons.mozilla.org/firefox/addon/lazarus-form-recovery/ ) when trying to reproduce because that add-on caused the form to lag. If the problem returns, I will comment here, but I won't be able to profile it because the process doesn't respond anymore.
Comment 4•12 years ago
|
||
(In reply to comment #3)
> This is with the official Windows 17.0.1 release build. I was able to
> experience this issue three times on Wikipedia forms with very long texts (once
> even when clicking in a disable form after scrolling it). I disabled the
> Lazarus extension (
> https://addons.mozilla.org/firefox/addon/lazarus-form-recovery/ ) when trying
> to reproduce because that add-on caused the form to lag. If the problem
> returns, I will comment here, but I won't be able to profile it because the
> process doesn't respond anymore.
Thanks. I suggest letting the author of that extension know about this as well.
![]() |
||
Comment 5•12 years ago
|
||
Got it again, so it's not Lazarus. Process Explorer gave me the following stacks for the busy thread (firefox.exe):
ntoskrnl.exe!KiDispatchInterrupt+0x7f
ntoskrnl.exe!KeUpdateSystemTime+0x13e
hal.dll!PMTimerFreq
mozjs.dll!JS_NewObject+0xa6
mozjs.dll!js::GCThingIsMarkedGray+0x24be2
ntoskrnl.exe!KiUnlockDispatcherDatabase+0x77
ntoskrnl.exe!KeInsertQueueDpc+0xd9
hal.dll!HalEndSystemInterrupt+0x54
mozjs.dll!js::GCThingIsMarkedGray+0x240b0
mozjs.dll!JS_LookupPropertyWithFlags+0xd86
mozjs.dll!js::GCThingIsMarkedGray+0x1e070
mozjs.dll!js::NewProxyObject+0x1075e
ntoskrnl.exe!KiUnlockDispatcherDatabase+0x77
ntoskrnl.exe!KeSetEvent+0x74
MSVCR100.dll!memcmp+0x472
xul.dll!NS_CycleCollectorForget2_P+0x1a5c5
ntoskrnl.exe!KiUnlockDispatcherDatabase+0x77
ntoskrnl.exe!KeSetEvent+0x74
ntoskrnl.exe!PspGetSetContextSpecialApc+0x4e
xul.dll!mozilla::scache::PathifyURI+0x1dd3
xul.dll!NS_CycleCollectorSuspect2_P+0x21f78
xul.dll!NS_CycleCollectorSuspect2_P+0x2b907
xul.dll!NS_CycleCollectorSuspect2_P+0x27ffd
mozjs.dll!js::GCThingIsMarkedGray+0x24c20
mozjs.dll!js::NewProxyObject+0x1075e
ntoskrnl.exe!KiSwapContext+0x2e
ntoskrnl.exe!KiSwapThread+0x68
ntoskrnl.exe!KeWaitForSingleObject+0x1c2
ntoskrnl.exe!KiSuspendThread+0x18
ntoskrnl.exe!KiDeliverApc+0x124
ntoskrnl.exe!KeInsertQueueDpc+0xd9
ntoskrnl.exe!KiInterruptDispatch+0x4d
xul.dll!std::_Init_locks::operator=+0x380a
ntoskrnl.exe!KiUnlockDispatcherDatabase+0x77
ntoskrnl.exe!KeSetEvent+0x74
ntoskrnl.exe!PspGetSetContextSpecialApc+0x4e
ntoskrnl.exe!KiDeliverApc+0xb3
hal.dll!HalpApcInterrupt+0xc5
xul.dll!JSD_GetScriptFunctionId+0x339ff
ntoskrnl.exe!KiUnlockDispatcherDatabase+0x77
ntoskrnl.exe!KeSetEvent+0x74
ntoskrnl.exe!PspGetSetContextSpecialApc+0x4e
ntoskrnl.exe!KiDeliverApc+0xb3
hal.dll!HalpApcInterrupt+0xc5
xul.dll!mozilla::scache::NewObjectOutputWrappedStorageStream+0x34375
xul.dll!XRE_InitParentProcess+0x207654
Updated•12 years ago
|
Assignee: nobody → general
Component: Spelling checker → JavaScript Engine
Hello,
yesterday I had a problem, of which I think, it is related:
I had the problem, that when I edited text in a textbox and pressed a key fast and repeatedly, FF 19.0 would freeze. So I had to kill it via the taskmanager. After I deactivated the mentioned dictionary switcher, the problem was not reproducible anymore. So it is probably a bug in the dictionary switcher addon? Anyhow I just tried to reproduce now and it would only on this site:
http://forum.silenthardware.de/index.php?s=80b5c1ba5a50b459bcba326852d72d3e&showforum=150
Comment 7•12 years ago
|
||
(In reply to comment #6)
> Hello,
>
> yesterday I had a problem, of which I think, it is related:
>
> I had the problem, that when I edited text in a textbox and pressed a key fast
> and repeatedly, FF 19.0 would freeze. So I had to kill it via the taskmanager.
> After I deactivated the mentioned dictionary switcher, the problem was not
> reproducible anymore. So it is probably a bug in the dictionary switcher addon?
> Anyhow I just tried to reproduce now and it would only on this site:
> http://forum.silenthardware.de/index.php?s=80b5c1ba5a50b459bcba326852d72d3e&showforum=150
Yes, this could be a bug in this extension.
Comment 8•11 years ago
|
||
so INVALID?
![]() |
||
Comment 9•11 years ago
|
||
I haven't experienced the issue again, and according to the comments here I didn't find the culprit. Closing as WORKSFORME. Feel free to reopen the bug if you can reproduce the issue on a supported branch.
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Flags: needinfo?(archaeopteryx)
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•