Bug 67285 - [gst-vaapi-master]gstreamer memory leak
Summary: [gst-vaapi-master]gstreamer memory leak
Status: VERIFIED NOTOURBUG
Alias: None
Product: libva
Classification: Unclassified
Component: gst-vaapi (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Wind Yuan
QA Contact: Sean V Kelley
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-25 02:00 UTC by Yang Lianyue
Modified: 2013-08-12 01:58 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
gst_valgrind.log (342.08 KB, text/plain)
2013-07-25 02:01 UTC, Yang Lianyue
Details
gst-vagrind.log(libva Intel-driver at staging ) (429.92 KB, text/plain)
2013-07-30 01:54 UTC, Liu Tienan
Details
valgrind.log (latest libva-staging) (312.48 KB, text/plain)
2013-07-30 09:06 UTC, Liu Tienan
Details
valgrind_720p.mp4.log (367.15 KB, text/plain)
2013-08-06 07:56 UTC, Ouping Zhang
Details
libva/intel-driver staging branch (327.75 KB, text/plain)
2013-08-06 08:20 UTC, Ouping Zhang
Details

Description Yang Lianyue 2013-07-25 02:00:16 UTC
Environment:
--------------------------
Platform: HSW
Libva:            (master)b927627beb3a3fbc8d2aa238ee47d8d0727a4a33
Intel-driver:     (master)8bf807539c1790d6eee531373131672d38c82b31
Gstreamer:        (1.0)   80431b497d2b1530b9f4d2988956ba5669ee2eac
gst-plugins-base: (1.0)   d11092d478aa9118d0b6aebcfebeedd06e7bc12e
gst-plugins-bad:  (1.0)   3a5fa02e27e25c729dc3f5120e2f06348674b563
gst-plugins-good: (1.0)   118876702467d6063e9c9745b7d093682ad16472
gst-plugins-ugly: (1.0)   b31e84d5f7c4c6eddcf1b955d131d223fa1929c0
Gst-vaapi:        (master)ad7ac2fb8e167078555b19fbff03a537873dbc94


Test Steps:
--------------------------
gstreamer_cmd: valgrind -v --tool=memcheck --leak-check=yes --log-file=valgrind.log gst-launch-1.0 filesrc location=mm.ts ! tsdemux ! vaapidecode ! vaapisink sync=false 


Comments:
--------------------------
gst_update_registry (gstregistry.c:1675)
init_post (gst.c:765)
gst_vaapi_surface_put_image (gstvaapisurface.c:469)
gst_vaapi_uploader_get_caps (gstvaapiuploader.c:152)
gst_vaapisink_get_caps (gstvaapisink.c:712)
gst_base_sink_query_caps (gstbasesink.c:559)
_gst_vaapi_image_map (gstvaapiimage.c:573)
gst_vaapi_uploader_get_caps (gstvaapiuploader.c:96)
gst_base_sink_default_query (gstbasesink.c:4625)
gst_pad_query (gstpad.c:3419)
gst_pad_query_caps (gstutils.c:2751)
gst_element_get_compatible_pad (gstutils.c:1057)
gst_element_link_pads_full (gstutils.c:1644)
gst_vaapi_display_new (gstvaapidisplay.c:622)
gst_vaapi_ensure_display (gstvaapipluginutil.c:123)
gst_vaapidecode_query (gstvaapidecode.c:511)
Comment 1 Yang Lianyue 2013-07-25 02:01:33 UTC
Created attachment 82972 [details]
gst_valgrind.log
Comment 2 Liu Tienan 2013-07-30 01:54:29 UTC
Created attachment 83248 [details]
gst-vagrind.log(libva Intel-driver at staging )

Environment:
--------------------------
Platform: HSW
Libva:            (staging)e9e685fe752b9865ba9e28cb63e18ce3f8aed2a0
Intel-driver:     (staging)6e7e29e637ed89da38f493239dbceb059c9b3106
Gstreamer:        (1.0)   7392c42263bd1a03c81fcb6049734cbffe200aaa
gst-plugins-base: (1.0)   6a79969b4bf209d2252bcf87d3fa8b96a1291254
gst-plugins-bad:  (1.0)   977410bb8952bf62e20362aff41b861e745492e4
gst-plugins-good: (1.0)   41d2cf716d522b40a1a1233b43200d5f72df0f8f
gst-plugins-ugly: (1.0)   b31e84d5f7c4c6eddcf1b955d131d223fa1929c0
Gst-vaapi:        (master)ad7ac2fb8e167078555b19fbff03a537873dbc94
Comment 3 haihao 2013-07-30 08:46:05 UTC
> Platform: HSW
> Libva:            (staging)e9e685fe752b9865ba9e28cb63e18ce3f8aed2a0

Could you test against the latest libva-staging ?

> Intel-driver:     (staging)6e7e29e637ed89da38f493239dbceb059c9b3106

I can't find this commit
Comment 4 Liu Tienan 2013-07-30 09:06:47 UTC
Created attachment 83282 [details]
valgrind.log (latest libva-staging)

gst-vagrind.log(libva Intel-driver at staging )

Environment:
--------------------------
Platform: HSW
Libva:            (staging)d4988142a3f2256e38c5c5cdcdfc1b4f5f3c1ea9
Intel-driver:     (staging)2b773b5ada3ce123e9b7d0aa6c99276d33d00465
Gstreamer:        (1.0)   7392c42263bd1a03c81fcb6049734cbffe200aaa
gst-plugins-base: (1.0)   6a79969b4bf209d2252bcf87d3fa8b96a1291254
gst-plugins-bad:  (1.0)   977410bb8952bf62e20362aff41b861e745492e4
gst-plugins-good: (1.0)   41d2cf716d522b40a1a1233b43200d5f72df0f8f
gst-plugins-ugly: (1.0)   b31e84d5f7c4c6eddcf1b955d131d223fa1929c0
Gst-vaapi:        (master)ad7ac2fb8e167078555b19fbff03a537873dbc94
Comment 5 Ouping Zhang 2013-08-06 07:53:42 UTC
gst-vaapi: (master) commit ad7ac2fb8e167078555b19fbff03a537873dbc94

bug can be reproduced.
Comment 6 Ouping Zhang 2013-08-06 07:56:22 UTC
Created attachment 83698 [details]
valgrind_720p.mp4.log

gst-vaapi: (master) commit ad7ac2fb8e167078555b19fbff03a537873dbc94

bug can be reproduced.
cmd: valgrind -v --tool=memcheck --leak-check=yes --log-file=valgrind.log gst-launch-1.0 filesrc location=/home/720p.mp4 ! qtdemux ! vaapidecode ! vaapisink
Comment 7 Ouping Zhang 2013-08-06 08:20:51 UTC
Created attachment 83700 [details]
libva/intel-driver staging branch

libva: (staging) bc49c42bcbfb24286c06b3e7cdb171b2a01c6f80
intel-driver: (staging) b3afeef8092dc4eb7cb73fce672ddf7a55205f34
gst-vaapi 1.0: (master) ad7ac2fb8e167078555b19fbff03a537873dbc94

valgrind -v --tool=memcheck --leak-check=yes --log-file=valgrind.log gst-launch-1.0 filesrc location=/home/720p.mp4 ! qtdemux ! vaapidecode ! vaapisink
Comment 8 haihao 2013-08-07 02:50:52 UTC
According to the last log,  the lost didn't occur in libva/driver.
Comment 9 Wind Yuan 2013-08-07 04:20:04 UTC
it's a gstreamer leak in
                           g_get_user_cache_dir (gutils.c:916)
==11249==    by 0x4EAC364: gst_update_registry (gstregistry.c:1675)
==11249==    by 0x4E589CD: init_post (gst.c:765)
==11249==    by 0x53C7F6F: g_option_context_parse (goption.c:1995)
==11249==    by 0x4030E4: main (gst-launch.c:970).
This is not gst-vaapi related. since it's only malloc a small buffer for a dir path and only called once, I don't think it's very necessary to fix.
Mark as NotOurBug.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.