If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Fix some leaks/failures in test_filter.js

RESOLVED FIXED in Thunderbird 3.0b3

Status

MailNews Core
Networking: NNTP
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: standard8, Assigned: Bienvenu)

Tracking

Trunk
Thunderbird 3.0b3
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

8 years ago
Created attachment 381756 [details] [diff] [review]
The fix

With the patch applied from bug 438922, test_filter.js crashes due to bad access in the mork code.

I think this is basically because the backend is trying to tidy up whilst we're still holding onto things in the test e.g. keeping folders and databases open.

The attached patch fixes it.
Attachment #381756 - Flags: review?(bienvenu)
(Assignee)

Comment 1

8 years ago
I'm curious if we can fix this w/o using forceDBClosed. I'd like to investigate this a bit before r+'ing it, because I'd like to understand what's going on a little bit more...it looks to me like we're holding onto both a header enumerator and a bunch of headers so nulling those out when done with them and doing a gc at the end should be sufficient. I'm talking in particular about testAction and testAttrib. Or maybe using let to declare those vars and doing a gc would be equivalent...
(Assignee)

Comment 2

8 years ago
It's actually the msg thread object that seems to be causing the issue for me, so the patch to cleanup the header enumerators won't be sufficient.

mork!morkRowObject::CloseRowObject+0x0000000000000068 (c:\mozilla-build\msys\tbirdhq\mozilla\db\mork\src\morkrowobject.cpp, line 606)
mork!morkRowObject::CloseMorkNode+0x000000000000002A (c:\mozilla-build\msys\tbirdhq\mozilla\db\mork\src\morkrowobject.cpp, line 86)
mork!morkRowObject::~morkRowObject+0x0000000000000033 (c:\mozilla-build\msys\tbirdhq\mozilla\db\mork\src\morkrowobject.cpp, line 94)
mork!morkRowObject::`scalar deleting destructor'+0x000000000000000F
mork!morkObject::Release+0x00000000000000D8 (c:\mozilla-build\msys\tbirdhq\mozilla\db\mork\src\morkobject.cpp, line 67)
mork!morkRowObject::Release+0x000000000000000D (c:\mozilla-build\msys\tbirdhq\mozilla\db\mork\src\morkrowobject.cpp, line 120)
msgdb!nsMsgThread::~nsMsgThread+0x000000000000007F (c:\mozilla-build\msys\tbirdhq\mailnews\db\msgdb\src\nsmsgthread.cpp, line 94)
msgdb!nsMsgThread::`scalar deleting destructor'+0x000000000000000F
msgdb!nsMsgThread::Release+0x00000000000000D3 (c:\mozilla-build\msys\tbirdhq\mailnews\db\msgdb\src\nsmsgthread.cpp, line 45)
xpc3250!XPCJSRuntime::GCCallback+0x000000000000054B (c:\mozilla-build\msys\tbirdhq\mozilla\js\src\xpconnect\src\xpcjsruntime.cpp, line
(Assignee)

Comment 3

8 years ago
folder.msgDatabase = null; 

would also fix this problem (or at least kick the can down the road) - the thread issue is the nsMsgDatabase caches the last nsgMsgThread object it returns, so that it can avoid creating the same nsMsgThread object over and over again. But nsMsgThread owns a reference to the db, so we have a cycle. nsMsgDBFolder:::SetMsgDatabase calls ClearCachedHdrs() on the db, which tells the db to clear its header cache and the thread cache, among other things. ForceDBClosed also does this, but it's a little more brute force.
(Assignee)

Comment 4

8 years ago
Created attachment 381983 [details] [diff] [review]
alternate fix

Standard8, this fixes the problem for me - does it for you as well?
Attachment #381983 - Flags: review?(bugzilla)
(Reporter)

Comment 5

8 years ago
Comment on attachment 381983 [details] [diff] [review]
alternate fix

Yep, much nicer. r=Standard8
Attachment #381983 - Flags: review?(bugzilla) → review+
(Reporter)

Updated

8 years ago
Attachment #381756 - Attachment is obsolete: true
Attachment #381756 - Flags: review?(bienvenu)
(Reporter)

Updated

8 years ago
Assignee: bugzilla → bienvenu
(Assignee)

Comment 6

8 years ago
fix checked in.
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
(Reporter)

Updated

8 years ago
Flags: in-testsuite+
Duplicate of this bug: 496346
You need to log in before you can comment on or make changes to this bug.