Closed
Bug 469972
Opened 16 years ago
Closed 16 years ago
leaking the places database connection in strange situations
Categories
(Toolkit :: Places, defect, P2)
Toolkit
Places
Tracking
()
RESOLVED
FIXED
mozilla1.9.2a1
People
(Reporter: mak, Assigned: sdwilsh)
References
Details
(Keywords: fixed1.9.1, memory-leak, testcase)
Attachments
(3 files)
i don't know if this should be a storage bug since to activate it i have to use nsPlacesDBFlush, so i suppose that's involved in the leak.
This test activates the leak, changing the param assignment to bintInt64Param deactivate the leak.
Reporter | ||
Comment 1•16 years ago
|
||
ps: final reset() should be finalize(), hwv that does not change results.
Reporter | ||
Comment 2•16 years ago
|
||
Updated•16 years ago
|
Assignee | ||
Updated•16 years ago
|
Component: Places → Storage
QA Contact: places → storage
Updated•16 years ago
|
Flags: blocking1.9.1? → blocking1.9.1+
Priority: -- → P2
Target Milestone: --- → mozilla1.9.1
Assignee | ||
Comment 3•16 years ago
|
||
Where did you place this test case to run it?
Reporter | ||
Comment 4•16 years ago
|
||
toolkit/places/tests/unit
Reporter | ||
Comment 5•16 years ago
|
||
ops i lost a /components/
Assignee | ||
Comment 6•16 years ago
|
||
Found it with bent's help. Totally a places bug...
Component: Storage → Places
QA Contact: storage → places
Assignee | ||
Comment 7•16 years ago
|
||
Assignee | ||
Updated•16 years ago
|
Whiteboard: [has patch][needs review dietrich]
Assignee | ||
Updated•16 years ago
|
Summary: strange leak setting a param to a mozStorageStatement → leaking the places database connection in strange situations
Comment 8•16 years ago
|
||
Comment on attachment 353890 [details] [diff] [review]
v1.0
[Checkin: Comment 10 & 17]
talked over irc, r=me
Attachment #353890 -
Flags: review?(dietrich) → review+
Assignee | ||
Comment 9•16 years ago
|
||
OK - here's what was happening:
Since we had the getter defined on the prototype, the database would be held onto as long as xpconnect was alive (assuming it was accessed at least once). The problem showed up when we used the mozStorageStatementJSHelper, which ends up making mozStorageService hold not XPConnect until it goes away. This ended up creating a cycle though:
XPConnect held a reference to the places database connection
The places database connection held a reference to mozStorageService
mozStorageService held a reference to XPConnect
Fun times...
Assignee | ||
Updated•16 years ago
|
Whiteboard: [has patch][needs review dietrich] → [has patch][has review][can land]
Comment 10•16 years ago
|
||
Comment on attachment 353890 [details] [diff] [review]
v1.0
[Checkin: Comment 10 & 17]
http://hg.mozilla.org/mozilla-central/rev/62902ec9424a
Attachment #353890 -
Attachment description: v1.0 → v1.0
[Checkin: Comment 10]
Updated•16 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Whiteboard: [has patch][has review][can land] → [c-n: baking for 1.9.1]
Assignee | ||
Updated•16 years ago
|
Flags: in-testsuite-
Flags: in-litmus-
Target Milestone: mozilla1.9.1 → mozilla1.9.2a1
Comment 11•16 years ago
|
||
(In reply to comment #10)
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.2a1pre) Gecko/20081220 Minefield/3.2a1pre] (home, optim default) (W2Ksp4)
(http://hg.mozilla.org/mozilla-central/rev/e45938aee309)
Iirc, Shawn said this patch fixed the testcase, but not the actual tests:
*Bug 470455 has a patch to fix its code... :-)
*Bug 469062 has been worked around for the time being. :-|
*Bug is still there ! :-(
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 12•16 years ago
|
||
(In reply to comment #11)
> Iirc, Shawn said this patch fixed the testcase, but not the actual tests:
So, I'm going to keep this bug closed, since we've fixed this leak (the one that the testcase exposed). Ideally, we'll get a new bug with another reduced test case, but I just verified that the testcase attached to this bug has been fixed (I had previously reduced it further, and hadn't verified that the original test case didn't leak).
This bug is closed as it stands, and I guess we'll try to tackle the other ones one at a time.
*sigh*
Status: REOPENED → RESOLVED
Closed: 16 years ago → 16 years ago
Resolution: --- → FIXED
Comment 13•16 years ago
|
||
(In reply to comment #11)
> *Bug is still there ! :-(
Bug 465952 !
(In reply to comment #12)
Agreed...
Did this fix either of the following bugs ?
*Bug 469062 without its workaround.
*Bug 452899 with its currently attached patch.
Reporter | ||
Comment 14•16 years ago
|
||
(In reply to comment #13)
> Did this fix either of the following bugs ?
> *Bug 469062 without its workaround.
yes
> *Bug 452899 with its currently attached patch.
yes
Reporter | ||
Comment 15•16 years ago
|
||
(In reply to comment #14)
> > *Bug 452899 with its currently attached patch.
>
> yes
ops sorry. i thought this was the embed bug, nevermind me.
Reporter | ||
Comment 16•16 years ago
|
||
however embed test is good to check this worked, because the actual patch in bug 470455 would not be enough to fix it completely without this.
Comment 17•16 years ago
|
||
Keywords: checkin-needed → fixed1.9.1
Whiteboard: [c-n: baking for 1.9.1]
Updated•16 years ago
|
Attachment #353890 -
Attachment description: v1.0
[Checkin: Comment 10] → v1.0
[Checkin: Comment 10 & 17]
You need to log in
before you can comment on or make changes to this bug.
Description
•