Closed
Bug 1457409
Opened 7 years ago
Closed 5 years ago
Crash: maildir code doesn't do enough error checking
Categories
(MailNews Core :: Database, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 63.0
People
(Reporter: BenB, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: crash, Whiteboard: [fixed by bug 1275948])
The maildir code doesn't do enough error checking. For this case it looks like the code alerts you and crashes anyway: mailnews/local/src/nsMsgMaildirStore.cpp https://dxr.mozilla.org/comm-central/source/mailnews/local/src/nsMsgMaildirStore.cpp#794 Starting with line 794: nsCOMPtr<nsIMsgDBHdr> newHdr; if (destMailDB) rv = destMailDB->CopyHdrFromExistingHdr(nsMsgKey_None, aHdr, true, getter_AddRefs(newHdr)); if (NS_SUCCEEDED(rv) && !newHdr) rv = NS_ERROR_UNEXPECTED; if (NS_FAILED(rv)) { aDestFolder->ThrowAlertMsg("filterFolderHdrAddFailed", nullptr); return rv; } There's a similar case where we crashed on a developer machine; it just logs a debug warning and crashes: mailnews/local/src/nsMsgMaildirStore.cpp https://dxr.mozilla.org/comm-central/source/mailnews/local/src/nsMsgMaildirStore.cpp#589 Starting with line 589 nsCOMPtr<nsIMsgDatabase> db; aFolder->GetMsgDatabase(getter_AddRefs(db)); if (!db) NS_ERROR("no db");
Reporter | ||
Updated•7 years ago
|
Blocks: maildirblockers
Reporter | ||
Updated•7 years ago
|
Component: Backend → Database
Reporter | ||
Comment 1•7 years ago
|
||
Stack: Frame Module Signature [Expand] Source 0 xul.dll nsMsgMaildirStore::MoveNewlyDownloadedMessage nsMsgMaildirStore.cpp:835 1 xul.dll nsParseNewMailState::ApplyFilterHit nsParseMailbox.cpp:2255 2 xul.dll nsMsgFilterList::ApplyFiltersToHdr nsMsgFilterList.cpp:326 3 xul.dll nsParseNewMailState::ApplyFilters nsParseMailbox.cpp:2135 4 xul.dll nsParseNewMailState::PublishMsgHeader nsParseMailbox.cpp:2060 5 xul.dll nsPop3Sink::IncorporateComplete nsPop3Sink.cpp:906 6 xul.dll nsPop3Protocol::HandleLine nsPop3Protocol.cpp:3570 7 xul.dll nsPop3Protocol::RetrResponse nsPop3Protocol.cpp:3355 8 xul.dll nsPop3Protocol::ProcessProtocolState nsPop3Protocol.cpp:3986 9 xul.dll nsMsgProtocol::OnDataAvailable nsMsgProtocol.cpp:298 10 xul.dll nsInputStreamPump::OnStateTransfer nsInputStreamPump.cpp:600 11 xul.dll nsInputStreamPump::OnInputStreamReady nsInputStreamPump.cpp:429 12 xul.dll nsInputStreamReadyEvent::Run nsStreamUtils.cpp:95
Comment 2•7 years ago
|
||
Interesting find. So your crash was with 52.7.0?
Reporter | ||
Comment 3•7 years ago
|
||
No, with code based on Thunderbird 52.0.
Flags: needinfo?(ben.bucksch)
Reporter | ||
Comment 4•7 years ago
|
||
So far, we know of only a single user who has this crash. It might be a corrupted maildir, or something like that. If we get more user reports, I'll update.
Reporter | ||
Updated•7 years ago
|
Severity: critical → normal
Comment 5•7 years ago
|
||
Well, bug 1264673 landed in 52.6.0 which fixed such a crash. And the code you cited in comment 0 is 52.6.0, not 52.0
Severity: normal → critical
Comment 6•7 years ago
|
||
Hmm, how can it still crash? https://hg.mozilla.org/comm-central/rev/f9c68d3f6054#l1.12
Comment 7•6 years ago
|
||
(In reply to Jorg K (GMT+2) from comment #6) > Hmm, how can it still crash? > https://hg.mozilla.org/comm-central/rev/f9c68d3f6054#l1.12 Ben, am I mistaken about comment 5?
Flags: needinfo?(ben.bucksch)
Comment 8•5 years ago
|
||
(In reply to Jorg K (GMT+2) from comment #6)
Hmm, how can it still crash?
https://hg.mozilla.org/comm-central/rev/f9c68d3f6054#l1.12
Jorgk, do you still want to keep this bug ?
Flags: needinfo?(ben.bucksch) → needinfo?(jorgk)
Comment 9•5 years ago
|
||
Hmm, the first code snippet from comment #0 can't crash and the second one was fixed here:
https://hg.mozilla.org/comm-central/rev/64f649a0558a
Fixed by bug 1275948.
Status: NEW → RESOLVED
Closed: 5 years ago
Flags: needinfo?(jorgk)
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 63.0
Updated•5 years ago
|
Whiteboard: [fixed by bug 1275948]
You need to log in
before you can comment on or make changes to this bug.
Description
•