test_ext_native_messaging xpcshell test leaks GC things at shutdown
Categories
(WebExtensions :: General, defect)
Tracking
(firefox70 fixed)
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: jonco, Assigned: rpl)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(2 files)
The following xpconnect test leaks JS GC things at shutdown:
toolkit/components/extensions/test/xpcshell/test_ext_native_messaging.js
Logfile attached.
Reporter | ||
Comment 1•5 years ago
|
||
If I comment out the test_connect_native_from_content_script test added in bug 1518843 the leak goes away.
Updated•5 years ago
|
Reporter | ||
Comment 2•5 years ago
|
||
I don't know what any of this does, but it seems it's a BrowserChildMessageManager that's being leaked.
Comment 3•5 years ago
|
||
Maybe the test needs removeListener calls to balance the addListener calls?
Comment 4•5 years ago
|
||
I'm not sure how to read the log, what's the problem here? How do I run this locally?
Reporter | ||
Comment 5•5 years ago
|
||
(In reply to :Agi | ⏰ PST | he/him from comment #4)
You can run the test with:
mach xpcshell-test toolkit/components/extensions/test/xpcshell/test_ext_native_messaging.js
The problem is the leaks reported in the output like this:
0:04.87 pid:2199 ERROR: GC found live Cell 0x3091043eb040 of kind FUNCTION at shutdown
0:04.87 pid:2199 ERROR: GC found live Cell 0x3091043eb080 of kind FUNCTION at shutdown
0:04.87 pid:2199 ERROR: GC found live Cell 0x3091043eb0c0 of kind FUNCTION at shutdown
0:04.87 pid:2199 ERROR: GC found live Cell 0x3091043eb100 of kind FUNCTION at shutdown
0:04.87 pid:2199 ERROR: GC found live Cell 0x3091043eb140 of kind FUNCTION at shutdown
Reporter | ||
Comment 6•5 years ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #3)
Maybe the test needs removeListener calls to balance the addListener calls?
OK, tried that but it didn't fix the leak.
Assignee | ||
Comment 7•5 years ago
|
||
Assignee | ||
Comment 8•5 years ago
|
||
(In reply to Jon Coppeard (:jonco) from comment #6)
(In reply to Andrew McCreight [:mccr8] from comment #3)
Maybe the test needs removeListener calls to balance the addListener calls?
OK, tried that but it didn't fix the leak.
The shutdown leak detected should be fixed by explicitly closing the test content page created in the test_connect_native_from_content_script
test case.
:jonco, would you mind to confirm me that the patch I've just attached fixes the issue for you too?
(I've quickly tried it locally, on a linux64 artifact debug build, and the shutdown leaks were not reported anymore).
Comment 9•5 years ago
|
||
Thanks for fixing this Luca!
Comment 10•5 years ago
|
||
Comment 11•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Reporter | ||
Updated•5 years ago
|
Comment 12•5 years ago
|
||
Hello,
Will this fix require manual validation? If yes, please provide some steps to reproduce in order to correctly test it and also, please set the "qe-verify+" flag. Otherwise, could the "qe-verify-" flag be added? Thanks!
Assignee | ||
Updated•5 years ago
|
Updated•3 years ago
|
Description
•