Closed Bug 1638634 Opened 4 years ago Closed 4 years ago

startup Crash in [@ nsImapMailFolder::AddSubfolderWithPath]

Categories

(MailNews Core :: Networking: IMAP, defect)

x86
Windows 10
defect

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 78.0

People

(Reporter: wsmwk, Assigned: mkmelin)

Details

(Keywords: crash, topcrash-thunderbird)

Crash Data

Attachments

(1 file)

imap is a red herring?

#28 crash for version 68.8.0, so topcrash.
The crash basically doesn't exist in 60.* - so regression

99.7% Windows 10 - I randomly sampled ten crash reports

  • 50% have CrowdStrike installed - showing module ScriptControl32_11103.dll 5.29.11103.0
    ** the majority of these crash at 1-2 seconds uptime
  • the other 50% - no obvious correlations from modules list - for example bp-4aea5e9f-cb09-4821-a6e4-496ff0200517 does NOT have CrowdStrike

bp-e8cab2dd-a861-4867-9a05-334a30200517 below has CrowdStrike

0 xul.dll nsImapMailFolder::AddSubfolderWithPath comm/mailnews/imap/src/nsImapMailFolder.cpp:359
1 xul.dll nsImapMailFolder::CreateSubFolders comm/mailnews/imap/src/nsImapMailFolder.cpp:466
2 xul.dll nsImapMailFolder::GetSubFolders comm/mailnews/imap/src/nsImapMailFolder.cpp:505
3 xul.dll NS_InvokeByIndex
4 xul.dll XPCWrappedNative::CallMethod js/xpconnect/src/XPCWrappedNative.cpp:1158
5 xul.dll XPC_WN_GetterSetter js/xpconnect/src/XPCWrappedNativeJSOps.cpp:986
6 xul.dll js::InternalCallOrConstruct js/src/vm/Interpreter.cpp:535
7 xul.dll js::CallGetter js/src/vm/Interpreter.cpp:730
8 xul.dll js::NativeGetProperty(JSContext*, JS::Handle<js::NativeObject*>, JS::Handle<JS::Value>, JS::Handle<JS::PropertyKey>, JS::MutableHandle<JS::Value>) js/src/vm/NativeObject.cpp:2553
9 xul.dll js::GetProperty(JSContext*, JS::Handle<JS::Value>, JS::Handle<js::PropertyName*>, JS::MutableHandle<JS::Value>) js/src/vm/Interpreter.cpp:4489
10 xul.dll static bool Interpret(struct JSContext*, class js::RunState& const) js/src/vm/Interpreter.cpp:2769
11 xul.dll js::RunScript(JSContext*, js::RunState&) js/src/vm/Interpreter.cpp:423
12 xul.dll js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) js/src/vm/Interpreter.cpp:563
13 xul.dll static bool InternalCall(struct JSContext*, const class js::AnyInvokeArgs& const) js/src/vm/Interpreter.cpp:590
14 xul.dll js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>) js/src/vm/Interpreter.cpp:606
15 xul.dll JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) js/src/jsapi.cpp:2673
16 xul.dll mozilla::dom::EventHandlerNonNull::Call(JSContext*, JS::Handle<JS::Value>, mozilla::dom::Event&, JS::MutableHandle<JS::Value>, mozilla::ErrorResult&) dom/bindings/EventHandlerBinding.cpp:267
17 xul.dll mozilla::JSEventHandler::HandleEvent(mozilla::dom::Event*) dom/events/JSEventHandler.cpp:205
18 xul.dll mozilla::EventListenerManager::HandleEventSubType(mozilla::EventListenerManager::Listener*, mozilla::dom::Event*, mozilla::dom::EventTarget*) dom/events/EventListenerManager.cpp:1043
19 xul.dll mozilla::EventListenerManager::HandleEventInternal(nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event**, mozilla::dom::EventTarget*, nsEventStatus*, bool) dom/events/EventListenerManager.cpp:1238
20 xul.dll mozilla::EventTargetChainItem::HandleEvent(mozilla::EventChainPostVisitor&, mozilla::ELMCreationDetector&) dom/events/EventDispatcher.cpp:349
21 xul.dll mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArray<mozilla::EventTargetChainItem>&, mozilla::EventChainPostVisitor&, mozilla::EventDispatchingCallback*, mozilla::ELMCreationDetector&) dom/events/EventDispatcher.cpp:551
22 xul.dll mozilla::EventDispatcher::Dispatch(nsISupports*, nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event*, nsEventStatus*, mozilla::EventDispatchingCallback*, nsTArray<mozilla::dom::EventTarget*>) dom/events/EventDispatcher.cpp:1047
23 xul.dll nsDocumentViewer::LoadComplete(nsresult) layout/base/nsDocumentViewer.cpp:1096
24 xul.dll nsDocShell::EndPageLoad(nsIWebProgress
, nsIChannel*, nsresult) docshell/base/nsDocShell.cpp:6668
25 xul.dll nsDocShell::OnStateChange(nsIWebProgress*, nsIRequest*, unsigned int, nsresult) docshell/base/nsDocShell.cpp:6468
26 xul.dll nsDocLoader::DoFireOnStateChange(nsIWebProgress* const, nsIRequest* const, int&, nsresult) uriloader/base/nsDocLoader.cpp:1314
27 xul.dll nsDocLoader::doStopDocumentLoad(nsIRequest*, nsresult) uriloader/base/nsDocLoader.cpp:873
28 xul.dll nsDocLoader::DocLoaderIsEmpty(bool) uriloader/base/nsDocLoader.cpp:711
29 xul.dll nsDocLoader::OnStopRequest(nsIRequest*, nsresult) uriloader/base/nsDocLoader.cpp:599
30 xul.dll mozilla::net::nsLoadGroup::RemoveRequest(nsIRequest*, nsISupports*, nsresult) netwerk/base/nsLoadGroup.cpp:568
31 xul.dll imgRequestProxy::RemoveFromLoadGroup() image/imgRequestProxy.cpp:404
32 xul.dll imgRequestProxy::OnLoadComplete(bool) image/imgRequestProxy.cpp:1032
33 xul.dll void mozilla::image::ImageObserverNotifier<const mozilla::image::ObserverTable*>::operator()<`lambda at z:/task_1586276146/build/src/image/ProgressTracker.cpp:352:12'>(class mozilla::image::SyncNotifyInternal<const mozilla::image::ObserverTable*>::<unnamed-tag>) image/ProgressTracker.cpp:283
34 xul.dll void mozilla::image::SyncNotifyInternal<const mozilla::image::ObserverTable*>(const class mozilla::image::ObserverTable*& const, bool, unsigned int, const struct mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits>& const) image/ProgressTracker.cpp:352
35 xul.dll mozilla::image::ProgressTracker::SyncNotifyProgress(unsigned int, mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&) image/ProgressTracker.cpp:370
36 xul.dll mozilla::image::VectorImage::OnSVGDocumentLoaded() image/VectorImage.cpp:1423
37 xul.dll mozilla::image::SVGLoadEventListener::HandleEvent(mozilla::dom::Event*) image/VectorImage.cpp:211
38 xul.dll mozilla::EventListenerManager::HandleEventSubType(mozilla::EventListenerManager::Listener*, mozilla::dom::Event*, mozilla::dom::EventTarget*) dom/events/EventListenerManager.cpp:1043
39 xul.dll mozilla::EventListenerManager::HandleEventInternal(nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event**, mozilla::dom::EventTarget*, nsEventStatus*, bool) dom/events/EventListenerManager.cpp:1238
40 xul.dll mozilla::EventTargetChainItem::HandleEvent(mozilla::EventChainPostVisitor&, mozilla::ELMCreationDetector&) dom/events/EventDispatcher.cpp:349
41 xul.dll mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArray<mozilla::EventTargetChainItem>&, mozilla::EventChainPostVisitor&, mozilla::EventDispatchingCallback*, mozilla::ELMCreationDetector&) dom/events/EventDispatcher.cpp:551
42 xul.dll mozilla::EventDispatcher::Dispatch(nsISupports*, nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event*, nsEventStatus*, mozilla::EventDispatchingCallback*, nsTArray<mozilla::dom::EventTarget*>) dom/events/EventDispatcher.cpp:1047
43 xul.dll mozilla::EventDispatcher::DispatchDOMEvent(nsISupports
, mozilla::WidgetEvent*, mozilla::dom::Event*, nsPresContext*, nsEventStatus*) dom/events/EventDispatcher.cpp:0
44 xul.dll nsINode::DispatchEvent(mozilla::dom::Event&, mozilla::dom::CallerType, mozilla::ErrorResult&) dom/base/nsINode.cpp:1024
45 xul.dll mozilla::dom::EventTarget::DispatchEvent(mozilla::dom::Event&) dom/events/EventTarget.cpp:178
46 xul.dll mozilla::AsyncEventDispatcher::Run() dom/events/AsyncEventDispatcher.cpp:69

Flags: needinfo?(mkmelin+mozilla)

This would look to fix the cause. WHY we'd get into that state, I have no idea.

Assignee: nobody → mkmelin+mozilla
Status: NEW → ASSIGNED
Flags: needinfo?(mkmelin+mozilla)
Attachment #9149681 - Flags: review?(benc)

Looks like imapServer is null here: https://searchfox.org/comm-central/rev/41733433edd6a3a2d0369ce03eb4fab62bf38c3b/mailnews/imap/src/nsImapMailFolder.cpp#404

I see a suspicious amount of if (imapServer) after these GetImapIncomingServer calls...

Comment on attachment 9149681 [details] [diff] [review]
bug1638634_imap_imapserver_crash.patch

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

Patch looks fine. Although, like you said, it doesn't address the "why".
The core issue is the fuzziness around folder management - there are so many uncertainties about folder states and responsiblities - mainly due to accumulated little fixes and shifts in functionality over the years. It leads to loads of these kinds of bugs (and naming issues and settings disappearing and old msf files popping back up, and maildir bugs and so on and so on). Out of scope for here, but I do have some plans to attack this.
Attachment #9149681 - Flags: review?(benc) → review+

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/00e720d9c6a1
fix startup Crash in [@ nsImapMailFolder::AddSubfolderWithPath]. r=benc

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 78.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: