Board: Jetson Orin Nx
JetPack 6.0
I’m working on a project with a Jetson Orin board, and I’m having a memory leak problem,
I can reproduce the problem with the command line:
jetson@JetsonNX16:~/gstreamer_flux$ GST_DEBUG="GST_TRACER:7" GST_TRACERS="leaks" gst-launch-1.0 videotestsrc ! nvvidconv ! 'video/x-raw(memory:NVMM),format=RGBA' ! nv3dsink
0:00:00.023006296 599189 0xaaab05609d60 DEBUG GST_TRACER gsttracer.c:159:gst_tracer_register:<registry0> update existing feature 0xaaab054519c0 (latency)
0:00:00.023074650 599189 0xaaab05609d60 DEBUG GST_TRACER gsttracer.c:159:gst_tracer_register:<registry0> update existing feature 0xaaab05451a80 (log)
0:00:00.023092443 599189 0xaaab05609d60 DEBUG GST_TRACER gsttracer.c:159:gst_tracer_register:<registry0> update existing feature 0xaaab05451b40 (rusage)
0:00:00.023106683 599189 0xaaab05609d60 DEBUG GST_TRACER gsttracer.c:159:gst_tracer_register:<registry0> update existing feature 0xaaab05451c00 (stats)
0:00:00.023118715 599189 0xaaab05609d60 DEBUG GST_TRACER gsttracer.c:159:gst_tracer_register:<registry0> update existing feature 0xaaab05451cc0 (leaks)
0:00:00.023130012 599189 0xaaab05609d60 DEBUG GST_TRACER gsttracer.c:159:gst_tracer_register:<registry0> update existing feature 0xaaab05451d80 (factories)
0:00:00.023204478 599189 0xaaab05609d60 TRACE GST_TRACER gsttracerrecord.c:109:gst_tracer_record_build_format: object-alive.class, type-name=(structure)"value\,\ type\=\(type\)gchararray\;", address=(structure)"value\,\ type\=\(type\)gpointer\;", description=(structure)"value\,\ type\=\(type\)gchararray\;", ref-count=(structure)"value\,\ type\=\(type\)guint\;", trace=(structure)"value\,\ type\=\(type\)gchararray\;";
0:00:00.023228671 599189 0xaaab05609d60 DEBUG GST_TRACER gsttracerrecord.c:123:gst_tracer_record_build_format: new format string: object-alive, type-name=(string)%s, address=(gpointer)%p, description=(string)%s, ref-count=(uint)%u, trace=(string)%s;
0:00:00.023255808 599189 0xaaab05609d60 TRACE GST_TRACER gsttracerrecord.c:109:gst_tracer_record_build_format: object-refings.class, ts=(structure)"value\,\ type\=\(type\)guint64\;", type-name=(structure)"value\,\ type\=\(type\)gchararray\;", address=(structure)"value\,\ type\=\(type\)gpointer\;", description=(structure)"value\,\ type\=\(type\)gchararray\;", ref-count=(structure)"value\,\ type\=\(type\)guint\;", trace=(structure)"value\,\ type\=\(type\)gchararray\;";
0:00:00.023270272 599189 0xaaab05609d60 DEBUG GST_TRACER gsttracerrecord.c:123:gst_tracer_record_build_format: new format string: object-refings, ts=(guint64)%lu, type-name=(string)%s, address=(gpointer)%p, description=(string)%s, ref-count=(uint)%u, trace=(string)%s;
0:00:00.023287041 599189 0xaaab05609d60 TRACE GST_TRACER gsttracerrecord.c:109:gst_tracer_record_build_format: object-added.class, type-name=(structure)"value\,\ type\=\(type\)gchararray\;", address=(structure)"value\,\ type\=\(type\)gpointer\;";
0:00:00.023297025 599189 0xaaab05609d60 DEBUG GST_TRACER gsttracerrecord.c:123:gst_tracer_record_build_format: new format string: object-added, type-name=(string)%s, address=(gpointer)%p;
0:00:00.023318113 599189 0xaaab05609d60 TRACE GST_TRACER gsttracerrecord.c:109:gst_tracer_record_build_format: object-removed.class, type-name=(structure)"value\,\ type\=\(type\)gchararray\;", address=(structure)"value\,\ type\=\(type\)gpointer\;";
0:00:00.023329762 599189 0xaaab05609d60 DEBUG GST_TRACER gsttracerrecord.c:123:gst_tracer_record_build_format: new format string: object-removed, type-name=(string)%s, address=(gpointer)%p;
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
Redistribute latency...
New clock: GstSystemClock
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:02.164977411
Setting pipeline to NULL ...
Freeing pipeline ...
0:00:02.415787914 599189 0xaaab05609d60 TRACE GST_TRACER :0:: object-alive, type-name=(string)GstCaps, address=(gpointer)0xffff8c002450, description=(string)video/x-raw(memory:NVMM), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], multiview-mode=(string){ mono, left, right }, ref-count=(uint)1, trace=(string);
0:00:02.416309978 599189 0xaaab05609d60 TRACE GST_TRACER :0:: object-alive, type-name=(string)GstCaps, address=(gpointer)0xffff8c0025e0, description=(string)video/x-raw(memory:NVMM), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)30/1, multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)[ 1/2147483647, 2147483647/1 ], interlace-mode=(string)progressive, ref-count=(uint)1, trace=(string);
** (gst-launch-1.0:599189): WARNING **: 14:20:00.971: Leaks detected and logged under GST_DEBUG=GST_TRACER:7
jetson@JetsonNX16:~/gstreamer_flux$
If I validate the traces “GST_DEBUG=“8,GST_TRACER:7” GST_TRACERS=“leaks””
I see a memory allocation by the “nv3dsink” plugin which is never freed.
I don’t have the problem if I use the “autovideosink” plugin