Bug: Thunderbird Crash in [@ shutdownhang | NtCreateFile]
Status: NEW
Priority: --
Created: 2022-01-09 04:06:55+00:00
Resolved: 2024-10-15 23:54:32+00:00

For better tracking, this is Thunderbird equivalent of Bug 1182927 - crash at  [@ shutdownhang | NtCreateFile ]

I estimate the signature rank to be around #150 for 91.3.0.  

Below are four unique stacks.  I see at least two of each, there may be more that are more common.

* imap on stack Crash report: https://crash-stats.mozilla.org/report/index/14f4fa86-1719-413e-8625-d1c120211108
MOZ_CRASH Reason: ```Shutdown hanging at step quit-application. Something is blocking the main-thread.```
Top 10 frames of crashing thread:
```
0 ntdll.dll NtCreateFile 
1 KERNELBASE.dll CreateFileInternal 
2 KERNELBASE.dll CreateFileW 
3 xul.dll OpenFile xpcom/io/nsLocalFileWin.cpp:549
4 xul.dll nsLocalFile::OpenNSPRFileDesc xpcom/io/nsLocalFileWin.cpp:1195
5 xul.dll nsFileStreamBase::DoOpen netwerk/base/nsFileStreams.cpp:324
6 xul.dll nsFileInputStream::Open netwerk/base/nsFileStreams.cpp:429
7 xul.dll nsFileInputStream::Init netwerk/base/nsFileStreams.cpp:447
8 xul.dll NS_NewLocalFileInputStream netwerk/base/nsNetUtil.cpp:132
9 xul.dll nsMsgBrkMBoxStore::GetMsgInputStream comm/mailnews/local/src/nsMsgBrkMBoxStore.cpp:684
10 xul.dll	nsMsgDBFolder::GetMsgInputStream	comm/mailnews/base/src/nsMsgDBFolder.cpp:842
11 xul.dll	nsMsgDBFolder::GetOfflineFileStream comm/mailnews/base/src/nsMsgDBFolder.cpp:686
12 xul.dll	nsImapMailFolder::GetOfflineFileStream comm/mailnews/imap/src/nsImapMailFolder.cpp:8863
13 xul.dll	nsImapMockChannel::ReadFromLocalCache() comm/mailnews/imap/src/nsImapProtocol.cpp:9562
14 xul.dll	nsImapMockChannel::AsyncOpen  comm/mailnews/imap/src/nsImapProtocol.cpp:9629
15 xul.dll	nsImapService::GetMessageFromUrl  comm/mailnews/imap/src/nsImapService.cpp:1053
16 xul.dll	nsImapService::StreamMessage  comm/mailnews/imap/src/nsImapService.cpp:1147
17 xul.dll	nsOfflineStoreCompactState::CopyNextMessage comm/mailnews/base/src/nsMsgFolderCompactor.cpp:950 
```

* pop on stack
Crash report: https://crash-stats.mozilla.org/report/index/a4f571bf-6bf8-4887-aefb-8dd2d0211108
Top 10 frames of crashing thread:
```
0 ntdll.dll NtCreateFile 
1 KERNELBASE.dll CreateFileInternal 
2 KERNELBASE.dll CreateFileW 
3 xul.dll OpenFile xpcom/io/nsLocalFileWin.cpp:549
4 xul.dll nsLocalFile::OpenNSPRFileDesc xpcom/io/nsLocalFileWin.cpp:1195
5 xul.dll nsMsgFileStream::InitWithFile comm/mailnews/base/src/nsMsgFileStream.cpp:60
6 xul.dll MsgGetFileStream comm/mailnews/base/src/nsMsgUtils.cpp:1273
7 xul.dll nsMsgBrkMBoxStore::GetNewMsgOutputStream comm/mailnews/local/src/nsMsgBrkMBoxStore.cpp:590
8 xul.dll nsPop3Sink::IncorporateBegin comm/mailnews/local/src/nsPop3Sink.cpp:430
9 xul.dll nsPop3Protocol::RetrResponse comm/mailnews/local/src/nsPop3Protocol.cpp:3148
```

* compose and import on stack
Crash report: https://crash-stats.mozilla.org/report/index/77a5da42-8011-4d5c-b321-7bbd50211108
Top 10 frames of crashing thread:
```
0 ntdll.dll NtCreateFile 
1 AppvIsvSubsystems64.dll static long vfs_hooks::hooked_NtCreateFile 
2 KERNELBASE.dll CreateFileInternal 
3 KERNELBASE.dll CreateFileW 
4 xul.dll OpenFile xpcom/io/nsLocalFileWin.cpp:549
5 xul.dll nsLocalFile::OpenNSPRFileDesc xpcom/io/nsLocalFileWin.cpp:1195
6 xul.dll nsFileStreamBase::DoOpen netwerk/base/nsFileStreams.cpp:324
7 xul.dll NS_NewLocalFileInputStream netwerk/base/nsNetUtil.cpp:132
8 xul.dll CCompositionFile::CCompositionFile comm/mailnews/import/src/nsOutlookCompose.cpp:511
9 xul.dll nsOutlookCompose::CopyComposedMessage comm/mailnews/import/src/nsOutlookCompose.cpp:349
10 xul.dll nsOutlookCompose::ProcessMessage comm/mailnews/import/src/nsOutlookCompose.cpp:422
11 xul.dll ImportMailboxRunnable::Run()	comm/mailnews/import/src/nsOutlookMail.cpp:407 
```

* perhaps more common
Crash report: https://crash-stats.mozilla.org/report/index/f8450242-1e58-4e84-8ed9-3f8b90211108
Top 10 frames of crashing thread:
```
0 ntdll.dll NtCreateFile 
1 KERNELBASE.dll CreateFileInternal 
2 KERNELBASE.dll CreateFileW 
3 xul.dll OpenFile xpcom/io/nsLocalFileWin.cpp:549
4 xul.dll nsLocalFile::OpenNSPRFileDesc xpcom/io/nsLocalFileWin.cpp:1195
5 xul.dll mozilla::net::CacheIndex::WriteLogToDisk netwerk/cache2/CacheIndex.cpp:2017
6 xul.dll static mozilla::net::CacheIndex::Shutdown netwerk/cache2/CacheIndex.cpp:431
7 xul.dll static mozilla::net::CacheFileIOManager::Shutdown netwerk/cache2/CacheFileIOManager.cpp:1176
8 xul.dll mozilla::net::CacheObserver::Observe netwerk/cache2/CacheObserver.cpp:228
9 xul.dll nsObserverList::NotifyObservers xpcom/ds/nsObserverList.cpp:70
```