Closed Bug 1032492 Opened 10 years ago Closed 10 years ago

GMP plugin leaks i420 frames to be encoded in the child process

Categories

(Core :: Audio/Video, defect)

All
Linux
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: jesup, Assigned: ehugg)

References

Details

We slowly leak Shmem blocks and fd's when using OpenH264. STR: Load the testcase Start watch /proc/XXXXXX/fd increase in number until you run out. By adding debugs to log ptrs, I saw that the 2nd GMPVideoi420FrameImpl created in RecvEncode() never gets to its destructor. Other frames do as well, occasionally.
It looks like they are being leaked here: https://github.com/cisco/openh264/blob/master/module/gmp-openh264.cpp#L400 This return can hit for a few different reasons and not all are errors. The frame is leaked when this returns. I cannot do a frame->Destroy() right where this line is, but I'll have to call syncrunonmainthread to do it.
The fix for this is up for review here: https://rbcommons.com/s/OpenH264/r/576/
With pull req #1049 https://github.com/cisco/openh264/pull/1049 landed we still have some small memory leaks, but my debugging shows these frames are all now being deleted. Ran for about 2hrs on OSX without hanging/crashing.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Assignee: nobody → ethanhugg
You need to log in before you can comment on or make changes to this bug.