Possible memory leak when playing video in DRM #573
Replies: 17 comments
-
Please test WPEWebKit 2.40 and WPEBackend-FDO 1.14.2. To investigate mem usage I'd advise trying with Valgrind's massif, or heaptrack... |
Beta Was this translation helpful? Give feedback.
-
Thank you for the suggestions. I will first try the new versions. Do you plan to release updates in meta-webkit for these versions? I'm trying to bump up the versions myself but I get compile errors. |
Beta Was this translation helpful? Give feedback.
-
We were able to update the Yocto files (some new dependencies was needed) and use the suggested version (inc Cog 0.17.1) but it unfortunately did not help and we still see the memory usage slowly but steady going up. |
Beta Was this translation helpful? Give feedback.
-
Then I'm afraid the next step would be to try with Massif... Perhaps with the WebInspector you can also find JS leaks. It's very easy to leak in JS... Is this also happening on desktop builds? If you can share the HTML/JS code maybe I can try here |
Beta Was this translation helpful? Give feedback.
-
very_short_video_with_player.zip Attached is the short html video player example with the clips we play to see the error. |
Beta Was this translation helpful? Give feedback.
-
Here are two heaptrack logs. They are both for WPEWebProcess. I used the attach option in heaptrack. heaptrack.WPEWebProcess.1649.gz heaptrack.WPEWebProcess.2770.gz To me it looks like gstreamer related, within gstreamer or the interface for gstreamer from webkit. But I know too little about this to understand where the error might me. Do you have any suggestions? |
Beta Was this translation helpful? Give feedback.
-
Interesting! Would it be possible for you to rebuild WPE with debug symbols? Then heaptrack would provide more details about the leak. |
Beta Was this translation helpful? Give feedback.
-
Can you also try this? http://sprunge.us/Ef9O96 |
Beta Was this translation helpful? Give feedback.
-
I have built with debug symbols but I can not get it to work with heaptrack for some some reason. It does not complain over missing symbol files anymore but still only list them as unresolved functions in the gui. (The symbol files are under /urs/lib/.debug/ and looks ok to me.) I tested with you patch, unfortunately I can not see any major change. Here are new heaptrack file: https://qmatic-my.sharepoint.com/:u:/p/gustav_evertsson/Edr9CXwmgyJCqr2ZXIRIc0QBUTtkOHfBYpuxa8TDP8UnmQ?e=fUtlnT This run was for 5h. |
Beta Was this translation helpful? Give feedback.
-
BTW I can't reproduce this issue in a GTK desktop build of WebKit If you really need this issue fixed ASAP, perhaps you'd like to contract our consulting services ;) |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Can you expand all the way the configureAudioBin branch? |
Beta Was this translation helpful? Give feedback.
-
I'm pretty sure I disabled webaudio and rebuilt everything but I can still hear the sound from the video playing. What does webaudio do and what is the expected effect of disabling it? How can I verify that it is disabled in the binary? From configure log |
Beta Was this translation helpful? Give feedback.
-
webaudio is not used by your code, but if you open the code of MediaPlayerPrivateGStreamer you will see that configureAudioBin is wrapped by a
Check the spec: https://www.w3.org/TR/webaudio/ |
Beta Was this translation helpful? Give feedback.
-
Try this? WebKit/WebKit#13965 |
Beta Was this translation helpful? Give feedback.
-
That sounds great that you have fixed a leak. We have disabled webaudio as suggested and it seems to work for us. We, at least for now, does not need it so it is okay. We will test the new version, but unfortunately does not have time for that right now. |
Beta Was this translation helpful? Give feedback.
-
We use Cog on Intel hardware and DRM as platform.
We see that the memory slowly but steady goes up over time with 1-2mb per minute. We play a list of short full screen video files in a loop.
The trouble shooting we have done so far
We enabled WEBKIT_SAMPLE_MEMORY and sampled over a few hours. We could see that “Resident Set Bytes” and “Total Committed Memory” goes up and “Available Bytes” down but no specific details of what is causing it.
We used the Inspector and Time Interval tool to record memory usage. There we could see that “Page” goes up. What is included in this? Is it possible to get more details on this?
We tried to use different plugins for gstreamer for video playback but found no difference. (Both the new an dold VA-API and software renderer)
The versions we use are:
Cog 0.16.1
WPE WebKit 2.38.5
Built with Yocto Kirkstone
Are there other tools/features we can enable to understand what is eating the memory? Any known issues/patches we could try?
Beta Was this translation helpful? Give feedback.
All reactions