Open Bug 1367999 Opened 7 years ago Updated 2 years ago

Got leak messages when close firefox

Categories

(Core :: General, defect, P3)

defect

Tracking

()

People

(Reporter: JamesCheng, Unassigned)

Details

(Keywords: stale-bug, Whiteboard: [MemShrink:P3])

Attachments

(1 obsolete file)

When ./mach run firefox 

Open a youtube link then close the firefox.

I will get leak message as below.(100% reproducing under e10s)

Notice:
If you have more than one tab(one is playing youtube), closing the tab will "not" get the leak message.



Leaked URLs:
  https://s.youtube.com/api/stats/watchtime?ns=yt&el=detailpage&cpn=7_ujQ21n80-Ke3AR&docid=qoPupXWVhAw&ver=2&referrer=https%3A%2F%2Fwww.youtube.com%2F&cmt=4.102&plid=AAVQaYo0O91_Flkq&ei=L-4nWYedNsqf4AKAxKqoBw&fmt=243&fs=0&rt=5.196&of=L_PUY4Nf_LYjMBZyfTtRvg&euri&lact=5753&cl=156902750&state=paused&vm=CAEQABgE&c=WEB&cver=1.20170523&cplayer=UNIPLAYER&cbr=Firefox&cbrver=55.0&cos=X11&final=1&hl=en_US&cr=TW&len=425.761&feature=g-high-trv&afmt=251&idpj=-9&ldpj=-34&st=2.11&et=4.102
  https://s.youtube.com/api/stats/watchtime?ns=yt&el=detailpage&cpn=7_ujQ21n80-Ke3AR&docid=qoPupXWVhAw&ver=2&referrer=https%3A%2F%2Fwww.youtube.com%2F&cmt=4.102&plid=AAVQaYo0O91_Flkq&ei=L-4nWYedNsqf4AKAxKqoBw&fmt=243&fs=0&rt=5.196&of=L_PUY4Nf_LYjMBZyfTtRvg&euri&lact=5753&cl=156902750&state=paused&vm=CAEQABgE&c=WEB&cver=1.20170523&cplayer=UNIPLAYER&cbr=Firefox&cbrver=55.0&cos=X11&final=1&hl=en_US&cr=TW&len=425.761&feature=g-high-trv&afmt=251&idpj=-9&ldpj=-34&st=2.11&et=4.102
  https://www.youtube.com/watch?v=qoPupXWVhAw
  https://www.youtube.com/
  https://www.youtube.com/
  https://www.youtube.com/
  https://www.youtube.com/
  https://s.youtube.com/api/stats/qoe?event=streamingstats&fmt=243&afmt=251&cpn=7_ujQ21n80-Ke3AR&ei=L-4nWYedNsqf4AKAxKqoBw&el=detailpage&docid=qoPupXWVhAw&ns=yt&fexp=9406012%2C9419452%2C9422596%2C9431012%2C9434046%2C9434289%2C9434800%2C9441147%2C9444902%2C9446054%2C9446364%2C9449243%2C9453897%2C9456640%2C9457020%2C9457141%2C9463594%2C9463721%2C9463965%2C9464489%2C9465373%2C9465813%2C9465919%2C9466777%2C9466777%2C9466793%2C9466795%2C9466797%2C9467217%2C9468797%2C9468800%2C9468805%2C9469224%2C9475511%2C9475533%2C9475565%2C9475806%2C9475832%2C9476328%2C9476412%2C9476507%2C9476917%2C9477080%2C9477370%2C9477390%2C9477644%2C9477681&cl=156902750&seq=2&c=WEB&cver=1.20170523&cplayer=UNIPLAYER&cbr=Firefox&cbrver=55.0&cos=X11&cmt=0.077:0.000,0.947:0.000,5.198:4.102&vps=0.077:B,0.947:PL,5.198:N&aft=1496&bwm=5.198:1487255:1.159&bwe=5.198:4018357&bh=5.198:16.164&vis=5.198:3
  https://s.youtube.com/api/stats/qoe?event=streamingstats&fmt=243&afmt=251&cpn=7_ujQ21n80-Ke3AR&ei=L-4nWYedNsqf4AKAxKqoBw&el=detailpage&docid=qoPupXWVhAw&ns=yt&fexp=9406012%2C9419452%2C9422596%2C9431012%2C9434046%2C9434289%2C9434800%2C9441147%2C9444902%2C9446054%2C9446364%2C9449243%2C9453897%2C9456640%2C9457020%2C9457141%2C9463594%2C9463721%2C9463965%2C9464489%2C9465373%2C9465813%2C9465919%2C9466777%2C9466777%2C9466793%2C9466795%2C9466797%2C9467217%2C9468797%2C9468800%2C9468805%2C9469224%2C9475511%2C9475533%2C9475565%2C9475806%2C9475832%2C9476328%2C9476412%2C9476507%2C9476917%2C9477080%2C9477370%2C9477390%2C9477644%2C9477681&cl=156902750&seq=2&c=WEB&cver=1.20170523&cplayer=UNIPLAYER&cbr=Firefox&cbrver=55.0&cos=X11&cmt=0.077:0.000,0.947:0.000,5.198:4.102&vps=0.077:B,0.947:PL,5.198:N&aft=1496&bwm=5.198:1487255:1.159&bwe=5.198:4018357&bh=5.198:16.164&vis=5.198:3
  https://www.youtube.com/watch?v=qoPupXWVhAw
  https://www.youtube.com/
  https://www.youtube.com/
  https://www.youtube.com/
  https://www.youtube.com/
nsStringStats
 => mAllocCount:         168991
 => mReallocCount:         8698
 => mFreeCount:          168929  --  LEAKED 62 !!!
 => mShareCount:         133552
 => mAdoptCount:           7488
 => mAdoptFreeCount:       7485  --  LEAKED 3 !!!
 => Process ID: 1098, Thread ID: 139888771217216
I just want to confirm the leak is caused by media side so I do some experiments...
==== under e10s ====
1. I open "about:config" and modified any of preferences then close the firefox.

I got bunches of "leaked url" msg.

2. I open www.google.com and search for any of keywords then close the firefox,

I got bunches of "leaked url" msg either.

As a result,

This bug is not for media playback.

Please consider to lower down the priority.
Hi Blake,
According to the comment 1,

This leak msg is not related to media.

Would you please kindly help to find the right person to see if it is really a bug or false alarm leak message?

Thank you.
Flags: needinfo?(bwu)
TingYu,
Per discussion, please help have a look.
Thanks!
Flags: needinfo?(bwu) → needinfo?(janus926)
I can't reproduce with debug build on Linux for the latest m-c a418121d4625.
Flags: needinfo?(janus926) → needinfo?(jacheng)
Sorry, I just tried some more times and can reproduce.
Flags: needinfo?(jacheng)
Whiteboard: [MemShrink]
Assignee: nobody → janus926
Component: Audio/Video: Playback → General
Summary: Got leak message when closing the firefox while playback with only one tab → Got leak messages when close firefox that has only one tab
Summary: Got leak messages when close firefox that has only one tab → Got leak messages when close firefox
The leak is in child process, but with following command I got only CC/GC log from parent:

  XPCOM_MEM_LEAK_LOG=1 MOZ_CC_LOG_PROCESS="all" MOZ_CC_LOG_SHUTDOWN=1 MOZ_CC_ALL_TRACES="shutdown" MOZ_CC_LOG_DIRECTORY="~/w/fx/mc/cclog" MOZ_DISABLE_CONTENT_SANDBOX=1 ./mach run
Attachment #8885088 - Attachment is obsolete: true
(In reply to Ting-Yu Chou [:ting] from comment #7)
> The leak is in child process, but with following command I got only CC/GC
> log from parent:

That's because MOZ_CCL_LOG_DIRECTORY is a relative path (~/...), and getting home directory [1] is prohibited [2] during shutdown. Using an absolute path would work.

[1] http://searchfox.org/mozilla-central/rev/cbd628b085ac809bf5a536109e6288aa91cbdff0/xpcom/io/nsLocalFileUnix.cpp#298-299
[2] http://searchfox.org/mozilla-central/rev/cbd628b085ac809bf5a536109e6288aa91cbdff0/xpcom/components/nsComponentManager.cpp#1379-1388
Yeah, I've noticed similar issues for a long time, where if you close the browser while a tab is open, you leak pages. I'm not sure how much of an issue it really will be (as long as we clean things up when you close the tab, it should be okay), but I've also never looked into it.
Whiteboard: [MemShrink] → [MemShrink:P3]
This is an assigned P1 bug without activity in two weeks. 

If you intend to continue working on this bug for the current release/iteration/sprint, remove the 'stale-bug' keyword.

Otherwise we'll reset the priority of the bug back to '--' on Monday, August 28th.
Keywords: stale-bug
Assignee: janus926 → nobody
By using Mozregression,

I run it three times and it indicates the leak is caused by 

Bug 1360198 - don't set artifact expiry in generic-worker tasks if equal to task expiry,r=dustin

I would like to try if I could do some validation to ensure it is right patch.
The patch is not related to this issue.

Should do more investigation.
Moving to p3 because no activity for at least 24 weeks.
Priority: P1 → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: