AnsweredAssumed Answered

gst-launch-1.0 crash on second camera, first works

Question asked by Pat Sandt on May 24, 2017
Latest reply on Jun 1, 2017 by Pat Sandt

I am running on an i.MX6 quad core with kernel = 4.1.18-i.MX6-PD15.3.1. For test purposes, I am kicking off my gst-launch-1.0 script in a slow loop. I've turned debugging on in gst-launch, so I now have additional information:

---- snip ----- This is the tail end of the last loop that worked...

Got EOS from element "pipeline0".

Execution ended after 0:00:01.116792667

Setting pipeline to PAUSED ...

Setting pipeline to READY ...

Setting pipeline to NULL ...

Freeing pipeline ...

i2c close

[ 3564.206865] cam0jpg.sh (11978): drop_caches: 3

             total         used         free       shared      buffers

Mem:       2058504       208148      1850356        16816          856

-/+ buffers:             207292      1851212

Swap:            0            0            0

Setting pipeline to PAUSED ...

i2c open /dev/v4l-subdev7

Pipeline is live and does not need PREROLL ...

Setting pipeline to PLAYING ...

New clock: GstSystemClock

Got EOS from element "pipeline0".

Execution ended after 0:00:00.975751333

Setting pipeline to PAUSED ...

Setting pipeline to READY ...

Setting pipeline to NULL ...

Freeing pipeline ...

i2c close

[ 3568.047934] cam1jpg.sh (11998): drop_caches: 3

------------------------------------- Completed loop 290 ---- Note that free memory is stable at 1.85 GB up to here

Finished

                total              used           free                shared        buffers

Mem:       2058504       208036      1850468        16816          584

-/+ buffers:             207452      1851052

Swap:            0            0            0

Setting pipeline to PAUSED ...

i2c open /dev/v4l-subdev3

Pipeline is live and does not need PREROLL ...

Setting pipeline to PLAYING ...

New clock: GstSystemClock

Got EOS from element "pipeline0".

Execution ended after 0:00:01.142167334

Setting pipeline to PAUSED ...

Setting pipeline to READY ...

Setting pipeline to NULL ...

Freeing pipeline ...

i2c close

[ 3576.338335] cam0jpg.sh (12018): drop_caches: 3

                total              used           free               shared         buffers

Mem:       2058504       207540      1850964        16816          700

-/+ buffers:             206840      1851664

Swap:            0            0            0

Setting pipeline to PAUSED ...

i2c open /dev/v4l-subdev7

Pipeline is live and does not need PREROLL ...

Setting pipeline to PLAYING ...

New clock: GstSystemClock

Caught SIGSEGV                                   --------------- ooops, what happened here? ------------------ see trace:

#0  0x76c726f0 in poll () at ../sysdeps/unix/syscall-template.S:81

#1  0x76d4c7d4 in g_main_context_iterate (priority=<optimized out>, n_fds=2, fds=0x14baae0, timeout=-1, context=0x14a00d0)

#2  0x76d4c7d4 in g_main_context_iterate (context=0x14a00d0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)

#3  0x76d4cb8c in g_main_loop_run (loop=0x14b7fd0)

#4  0x76ea969c in gst_bus_poll (bus=bus@entry=0x1495c28 [GstBus], events=events@entry=GST_MESSAGE_ANY, timeout=<optimized out>)

#5  0x0000bd98 in event_loop (pipeline=0x14b60a0 [GstPipeline], blocking=blocking@entry=1, do_progress=2127591764,

#6  0x0000ad00 in main (argc=1993405448, argv=0x46d)

Spinning.  Please run 'gdb gst-launch-1.0 12051' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.

------------------------------------- Completed loop 291 ---------------------- Free memory has dropped. first camera still works.

Finished

             total         used         free       shared      buffers

Mem:       2058504       266308      1792196        16820         3244

-/+ buffers:             263064      1795440

Swap:            0            0            0

Setting pipeline to PAUSED ...

i2c open /dev/v4l-subdev3

Pipeline is live and does not need PREROLL ...

Setting pipeline to PLAYING ...

New clock: GstSystemClock

Got EOS from element "pipeline0".

Execution ended after 0:00:01.110108667

Setting pipeline to PAUSED ...

Setting pipeline to READY ...

Setting pipeline to NULL ...

Freeing pipeline ...

------------------ Next try on second camera fails with "v4l2src0: failed to allocate required memory. this continues forever.

Outcomes