Nvvideocontext ERROR: egl error: eglInitialize returned 3002

Hi,

I am trying to build my docker image based on nvcr.io/nvidia/l4t-base:r32.5.0.
I met some egl issue while running my QT app which used some nvidia gstreamer pipeline.
My app could run normally on host machine.
But when I run it under docker space, I met the egl error and the video window could not pop up.
Could you please be so kind to help me what should I check next?
Thanks a lot!

My app log is as follow:
2021-07-27 07:24:47.014387 271-292 alsa WARN : alsalib error: open ‘/dev/snd/pcmC0D0c’ failed (-2): No such file or directory
2021-07-27 07:24:47.014509 271-292 alsa WARN : error: Could not open audio device for recording.
2021-07-27 07:24:47.014551 271-292 alsa WARN : error: Recording open error on device ‘default’: No such file or directory
2021-07-27 07:24:47.014795 271-292 GST_ERROR_SYSTEM INFO : posting message: Could not open audio device for recording.
2021-07-27 07:24:47.014869 271-292 audiobasesrc INFO : subclass posted error
2021-07-27 07:24:47.014923 271-292 GST_ERROR_SYSTEM INFO : posted error message: Could not open audio device for recording.
2021-07-27 07:24:47.018071 271-292 alsa WARN : alsalib error: open ‘/dev/snd/pcmC0D0c’ failed (-2): No such file or directory
2021-07-27 07:24:47.018231 271-292 alsa WARN : error: Could not open audio device for recording.
2021-07-27 07:24:47.018270 271-292 alsa WARN : error: Recording open error on device ‘default’: No such file or directory
2021-07-27 07:24:47.018322 271-292 GST_ERROR_SYSTEM INFO : posting message: Could not open audio device for recording.
2021-07-27 07:24:47.018362 271-292 audiobasesrc INFO : subclass posted error
2021-07-27 07:24:47.018546 271-292 GST_ERROR_SYSTEM INFO : posted error message: Could not open audio device for recording.
2021-07-27 07:24:47.058757 271-294 nvvideocontext ERROR: egl error: eglInitialize returned 3002
2021-07-27 07:24:47.129478 271-293 v4l2 WARN : Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Unknown error -1
2021-07-27 07:24:47.210943 271-294 nvvideocontext ERROR: egl error: eglCreateWindowSurface returned 3001

Hi,
It looks like certain nodes are not included in docker. Please refer to this and include the nodes:
How to mount host-files-for-container.d in your custom ubuntu images - #3 by AastaLLL

Thanks for your quick response.
But I did run docker image with --runtime nvidia .
It seems the EGL error was printed by libgstnvvidonsinks.so and a segment fault error was caught in same file.

My docker command is as follow:
docker run --runtime nvidia --rm --privileged -ti -e DISPLAY=$DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix/ -v /dev/:/dev/ eswin-registry.tencentcloudcr.com/test/edk-demo:0.8.3-3

Any idea what to check next?
I have to say the post you shared cannot solve this issue.
Thanks.

Hi,
Please run

/usr/lib/aarch64-linux-gnu/gstreamer-1.0$ ldd libgstnvvideosinks.so

and check what libs are missing. You may add missing libs to l4t.csv for a try.

I executed the ldd command but no missing libs issue found.

Any idea what to check next on this EGL error?

Hi,
Please share which plugins you use in the QT app. Does it work if you use the plugins in gst-launch-1.0 command? Would like to clarify if the failure is related to QT.

Hi I used nvv4l2camerasrc, nvvidconv and nv3dsink.
I also tried using gst-launch as you suggested.
But same EGL issue seen while no issue on host machine.
Log as follow:

root@0658ac76a2a8:/home# GST_DEBUG=4 gst-launch-1.0 -vv nvv4l2camerasrc ! ‘video/x-raw(memory:NVMM), format=UYVY, width=1920, height=1080, framerate=30/1’ ! nvvidconv ! ‘video/x-raw(memory:NVMM), format=NV12’ ! nv3dsink
0:00:00.000238785 68 0x55c6790a00 INFO GST_INIT gst.c:586:init_pre: Initializing GStreamer Core Library version 1.14.5
0:00:00.000337666 68 0x55c6790a00 INFO GST_INIT gst.c:587:init_pre: Using library installed in /usr/lib/aarch64-linux-gnu
0:00:00.000382466 68 0x55c6790a00 INFO GST_INIT gst.c:607:init_pre: Linux 0658ac76a2a8 4.9.201-tegra #1 SMP PREEMPT Tue Jul 20 17:11:44 CST 2021 aarch64
0:00:00.001064230 68 0x55c6790a00 INFO GST_INIT gstmessage.c:127:_priv_gst_message_initialize: init messages
0:00:00.002590254 68 0x55c6790a00 INFO GST_INIT gstcontext.c:84:_priv_gst_context_initialize: init contexts
0:00:00.003161777 68 0x55c6790a00 INFO GST_PLUGIN_LOADING gstplugin.c:317:_priv_gst_plugin_initialize: registering 0 static plugins
0:00:00.003478387 68 0x55c6790a00 INFO GST_PLUGIN_LOADING gstplugin.c:225:gst_plugin_register_static: registered static plugin “staticelements”
0:00:00.003512147 68 0x55c6790a00 INFO GST_PLUGIN_LOADING gstplugin.c:227:gst_plugin_register_static: added static plugin “staticelements”, result: 1
0:00:00.003574355 68 0x55c6790a00 INFO GST_REGISTRY gstregistry.c:1727:ensure_current_registry: reading registry cache: /root/.cache/gstreamer-1.0/registry.aarch64.bin
0:00:00.050330383 68 0x55c6790a00 INFO GST_REGISTRY gstregistrybinary.c:621:priv_gst_registry_binary_read_cache: loaded /root/.cache/gstreamer-1.0/registry.aarch64.bin in 0.046688 seconds
0:00:00.050546960 68 0x55c6790a00 INFO GST_REGISTRY gstregistry.c:1583:scan_and_update_registry: Validating plugins from registry cache: /root/.cache/gstreamer-1.0/registry.aarch64.bin
0:00:00.054163395 68 0x55c6790a00 INFO GST_REGISTRY gstregistry.c:1685:scan_and_update_registry: Registry cache has not changed
0:00:00.054212356 68 0x55c6790a00 INFO GST_REGISTRY gstregistry.c:1762:ensure_current_registry: registry reading and updating done, result = 1
0:00:00.054247300 68 0x55c6790a00 INFO GST_INIT gst.c:807:init_post: GLib runtime version: 2.56.4
0:00:00.054281412 68 0x55c6790a00 INFO GST_INIT gst.c:809:init_post: GLib headers version: 2.56.4
0:00:00.054307524 68 0x55c6790a00 INFO GST_INIT gst.c:810:init_post: initialized GStreamer successfully
0:00:00.054451205 68 0x55c6790a00 INFO GST_PIPELINE gstparse.c:337:gst_parse_launch_full: parsing pipeline description 'nvv4l2camerasrc ! video/x-raw(memory:NVMM),\ format=UYVY,\ width=1920,\ height=1080,\ framerate=30/1 ! nvvidconv ! video/x-raw(memory:NVMM),\ format=NV12 ! nv3dsink ’
nvbuf_utils: Could not get EGL display connection
0:00:00.077286656 68 0x55c6790a00 INFO GST_PLUGIN_LOADING gstplugin.c:901:_priv_gst_plugin_load_file_for_registry: plugin “/usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvv4l2camerasrc.so” loaded
0:00:00.077357952 68 0x55c6790a00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “nvv4l2camerasrc”
0:00:00.077853411 68 0x55c6790a00 INFO GST_ELEMENT_PADS gstelement.c:670:gst_element_add_pad:GstBaseSrc@0x55c6a02240 adding pad ‘src’
0:00:00.078605511 68 0x55c6790a00 INFO GST_PLUGIN_LOADING gstplugin.c:901:_priv_gst_plugin_load_file_for_registry: plugin “/usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvvidconv.so” loaded
0:00:00.078643623 68 0x55c6790a00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “nvvidconv”
0:00:00.079023689 68 0x55c6790a00 INFO GST_ELEMENT_PADS gstelement.c:670:gst_element_add_pad:GstBaseTransform@0x55c68ea4d0 adding pad ‘sink’
0:00:00.079098474 68 0x55c6790a00 INFO GST_ELEMENT_PADS gstelement.c:670:gst_element_add_pad:GstBaseTransform@0x55c68ea4d0 adding pad ‘src’
0:00:00.082530652 68 0x55c6790a00 INFO GST_PLUGIN_LOADING gstplugin.c:901:_priv_gst_plugin_load_file_for_registry: plugin “/usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvvideosinks.so” loaded
0:00:00.082587388 68 0x55c6790a00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “nv3dsink”
0:00:00.082955070 68 0x55c6790a00 INFO GST_ELEMENT_PADS gstelement.c:670:gst_element_add_pad:GstBaseSink@0x55c6a0f780 adding pad ‘sink’
0:00:00.083030271 68 0x55c6790a00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “pipeline”
0:00:00.083286592 68 0x55c6790a00 INFO GST_PIPELINE grammar.y:652:gst_parse_perform_link: linking some pad of GstNvV4l2CameraSrc named nvv4l2camerasrc0 to some pad of Gstnvvconv named nvvconv0 (0/0) with caps “video/x-raw(memory:NVMM), format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)30/1”
0:00:00.084240165 68 0x55c6790a00 INFO GST_PLUGIN_LOADING gstplugin.c:901:_priv_gst_plugin_load_file_for_registry: plugin “/usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstcoreelements.so” loaded
0:00:00.084276773 68 0x55c6790a00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “capsfilter”
0:00:00.084490503 68 0x55c6790a00 INFO GST_ELEMENT_PADS gstelement.c:670:gst_element_add_pad:GstBaseTransform@0x55c6a160f0 adding pad ‘sink’
0:00:00.084537127 68 0x55c6790a00 INFO GST_ELEMENT_PADS gstelement.c:670:gst_element_add_pad:GstBaseTransform@0x55c6a160f0 adding pad ‘src’
0:00:00.084596807 68 0x55c6790a00 INFO GST_STATES gstbin.c:2089:gst_bin_get_state_func: getting state
0:00:00.084702376 68 0x55c6790a00 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to NULL
0:00:00.084744008 68 0x55c6790a00 INFO GST_EVENT gstevent.c:1517:gst_event_new_reconfigure: creating reconfigure event
0:00:00.084786088 68 0x55c6790a00 INFO GST_ELEMENT_PADS gstutils.c:1774:gst_element_link_pads_full: trying to link element nvv4l2camerasrc0:(any) to element capsfilter0:sink
0:00:00.084810984 68 0x55c6790a00 INFO GST_ELEMENT_PADS gstelement.c:920:gst_element_get_static_pad: found pad capsfilter0:sink
0:00:00.084848905 68 0x55c6790a00 INFO GST_PADS gstutils.c:1588:prepare_link_maybe_ghosting: nvv4l2camerasrc0 and capsfilter0 in same bin, no need for ghost pads
0:00:00.084895849 68 0x55c6790a00 INFO GST_PADS gstpad.c:2378:gst_pad_link_prepare: trying to link nvv4l2camerasrc0:src and capsfilter0:sink
0:00:00.084972553 68 0x55c6790a00 INFO GST_PADS gstpad.c:4232:gst_pad_peer_query:capsfilter0:src pad has no peer
0:00:00.085034634 68 0x55c6790a00 INFO GST_PADS gstpad.c:2586:gst_pad_link_full: linked nvv4l2camerasrc0:src and capsfilter0:sink, successful
0:00:00.085082314 68 0x55c6790a00 INFO GST_EVENT gstevent.c:1517:gst_event_new_reconfigure: creating reconfigure event
0:00:00.085110730 68 0x55c6790a00 INFO GST_EVENT gstpad.c:5808:gst_pad_send_event_unchecked:nvv4l2camerasrc0:src Received event on flushing pad. Discarding
0:00:00.085153674 68 0x55c6790a00 INFO GST_ELEMENT_PADS gstutils.c:1774:gst_element_link_pads_full: trying to link element capsfilter0:src to element nvvconv0:(any)
0:00:00.085181610 68 0x55c6790a00 INFO GST_ELEMENT_PADS gstelement.c:920:gst_element_get_static_pad: found pad capsfilter0:src
0:00:00.085208202 68 0x55c6790a00 INFO GST_PADS gstutils.c:1035:gst_pad_check_link: trying to link capsfilter0:src and nvvconv0:sink
0:00:00.085270571 68 0x55c6790a00 INFO GST_PADS gstpad.c:4232:gst_pad_peer_query:nvvconv0:src pad has no peer
0:00:00.085463468 68 0x55c6790a00 INFO GST_PADS gstutils.c:1588:prepare_link_maybe_ghosting: capsfilter0 and nvvconv0 in same bin, no need for ghost pads
0:00:00.085503596 68 0x55c6790a00 INFO GST_PADS gstpad.c:2378:gst_pad_link_prepare: trying to link capsfilter0:src and nvvconv0:sink
0:00:00.085555180 68 0x55c6790a00 INFO GST_PADS gstpad.c:4232:gst_pad_peer_query:nvvconv0:src pad has no peer
0:00:00.085701773 68 0x55c6790a00 INFO GST_PADS gstpad.c:2586:gst_pad_link_full: linked capsfilter0:src and nvvconv0:sink, successful
0:00:00.085744845 68 0x55c6790a00 INFO GST_EVENT gstevent.c:1517:gst_event_new_reconfigure: creating reconfigure event
0:00:00.085766157 68 0x55c6790a00 INFO GST_EVENT gstpad.c:5808:gst_pad_send_event_unchecked:capsfilter0:src Received event on flushing pad. Discarding
0:00:00.085855790 68 0x55c6790a00 INFO GST_PIPELINE grammar.y:652:gst_parse_perform_link: linking some pad of Gstnvvconv named nvvconv0 to some pad of GstNv3dSink named nv3dsink0 (0/0) with caps “video/x-raw(memory:NVMM), format=(string)NV12”
0:00:00.085883310 68 0x55c6790a00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “capsfilter”
0:00:00.085946478 68 0x55c6790a00 INFO GST_ELEMENT_PADS gstelement.c:670:gst_element_add_pad:GstBaseTransform@0x55c6a16430 adding pad ‘sink’
0:00:00.086008783 68 0x55c6790a00 INFO GST_ELEMENT_PADS gstelement.c:670:gst_element_add_pad:GstBaseTransform@0x55c6a16430 adding pad ‘src’
0:00:00.086047471 68 0x55c6790a00 INFO GST_STATES gstbin.c:2089:gst_bin_get_state_func: getting state
0:00:00.086101743 68 0x55c6790a00 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to NULL
0:00:00.086128495 68 0x55c6790a00 INFO GST_EVENT gstevent.c:1517:gst_event_new_reconfigure: creating reconfigure event
0:00:00.086162032 68 0x55c6790a00 INFO GST_ELEMENT_PADS gstutils.c:1774:gst_element_link_pads_full: trying to link element nvvconv0:(any) to element capsfilter1:sink
0:00:00.086182576 68 0x55c6790a00 INFO GST_ELEMENT_PADS gstelement.c:920:gst_element_get_static_pad: found pad capsfilter1:sink
0:00:00.086203888 68 0x55c6790a00 INFO GST_PADS gstutils.c:1588:prepare_link_maybe_ghosting: nvvconv0 and capsfilter1 in same bin, no need for ghost pads
0:00:00.086235792 68 0x55c6790a00 INFO GST_PADS gstpad.c:2378:gst_pad_link_prepare: trying to link nvvconv0:src and capsfilter1:sink
0:00:00.086422705 68 0x55c6790a00 INFO GST_PADS gstpad.c:4232:gst_pad_peer_query:capsfilter1:src pad has no peer
0:00:00.086476305 68 0x55c6790a00 INFO GST_PADS gstpad.c:2586:gst_pad_link_full: linked nvvconv0:src and capsfilter1:sink, successful
0:00:00.086502545 68 0x55c6790a00 INFO GST_EVENT gstevent.c:1517:gst_event_new_reconfigure: creating reconfigure event
0:00:00.086533106 68 0x55c6790a00 INFO GST_EVENT gstpad.c:5808:gst_pad_send_event_unchecked:nvvconv0:src Received event on flushing pad. Discarding
0:00:00.086595698 68 0x55c6790a00 INFO GST_ELEMENT_PADS gstutils.c:1774:gst_element_link_pads_full: trying to link element capsfilter1:src to element nv3dsink0:(any)
0:00:00.087697976 68 0x55c6790a00 INFO GST_ELEMENT_PADS gstelement.c:920:gst_element_get_static_pad: found pad capsfilter1:src
0:00:00.087732952 68 0x55c6790a00 INFO GST_PADS gstutils.c:1035:gst_pad_check_link: trying to link capsfilter1:src and nv3dsink0:sink
0:00:00.088051290 68 0x55c6790a00 INFO GST_PADS gstutils.c:1588:prepare_link_maybe_ghosting: capsfilter1 and nv3dsink0 in same bin, no need for ghost pads
0:00:00.088108506 68 0x55c6790a00 INFO GST_PADS gstpad.c:2378:gst_pad_link_prepare: trying to link capsfilter1:src and nv3dsink0:sink
0:00:00.088305659 68 0x55c6790a00 INFO GST_PADS gstpad.c:2586:gst_pad_link_full: linked capsfilter1:src and nv3dsink0:sink, successful
0:00:00.088324923 68 0x55c6790a00 INFO GST_EVENT gstevent.c:1517:gst_event_new_reconfigure: creating reconfigure event
0:00:00.088354267 68 0x55c6790a00 INFO GST_EVENT gstpad.c:5808:gst_pad_send_event_unchecked:capsfilter1:src Received event on flushing pad. Discarding
Setting pipeline to PAUSED …
0:00:00.088516252 68 0x55c6790a00 INFO GST_STATES gstbin.c:2506:gst_bin_element_set_state: current NULL pending VOID_PENDING, desired next READY
0:00:00.096657640 68 0x55c6a094f0 ERROR nvvideocontext context_egl.c:48:log_egl_error: egl error: eglInitialize returned 3002
0:00:00.101292609 68 0x55c6790a00 INFO nvvideocontext context.c:457:gst_nv_video_context_create_render_thread: render thread created
0:00:00.101460194 68 0x55c6790a00 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to READY
0:00:00.101536802 68 0x55c6790a00 INFO GST_STATES gstelement.c:2579:_priv_gst_element_state_changed: notifying about state-changed NULL to READY (VOID_PENDING pending)
0:00:00.101644291 68 0x55c6790a00 INFO GST_STATES gstbin.c:2954:gst_bin_change_state_func: child ‘nv3dsink0’ changed state to 2(READY) successfully
0:00:00.101706051 68 0x55c6790a00 INFO GST_STATES gstbin.c:2506:gst_bin_element_set_state: current NULL pending VOID_PENDING, desired next READY
0:00:00.101731651 68 0x55c6790a00 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to READY
0:00:00.101781572 68 0x55c6790a00 INFO GST_STATES gstelement.c:2579:_priv_gst_element_state_changed: notifying about state-changed NULL to READY (VOID_PENDING pending)
0:00:00.101843524 68 0x55c6790a00 INFO GST_STATES gstbin.c:2954:gst_bin_change_state_func: child ‘capsfilter1’ changed state to 2(READY) successfully
0:00:00.101879620 68 0x55c6790a00 INFO GST_STATES gstbin.c:2506:gst_bin_element_set_state: current NULL pending VOID_PENDING, desired next READY
0:00:00.101905796 68 0x55c6790a00 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to READY
0:00:00.101929252 68 0x55c6790a00 INFO GST_STATES gstelement.c:2579:_priv_gst_element_state_changed: notifying about state-changed NULL to READY (VOID_PENDING pending)
0:00:00.101969413 68 0x55c6790a00 INFO GST_STATES gstbin.c:2954:gst_bin_change_state_func: child ‘nvvconv0’ changed state to 2(READY) successfully
0:00:00.102057573 68 0x55c6790a00 INFO GST_STATES gstbin.c:2506:gst_bin_element_set_state: current NULL pending VOID_PENDING, desired next READY
0:00:00.102083237 68 0x55c6790a00 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to READY
0:00:00.102131654 68 0x55c6790a00 INFO GST_STATES gstelement.c:2579:_priv_gst_element_state_changed: notifying about state-changed NULL to READY (VOID_PENDING pending)
0:00:00.102165478 68 0x55c6790a00 INFO GST_STATES gstbin.c:2954:gst_bin_change_state_func: child ‘capsfilter0’ changed state to 2(READY) successfully
0:00:00.102197830 68 0x55c6790a00 INFO GST_STATES gstbin.c:2506:gst_bin_element_set_state: current NULL pending VOID_PENDING, desired next READY
0:00:00.102221958 68 0x55c6790a00 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to READY
0:00:00.102245254 68 0x55c6790a00 INFO GST_STATES gstelement.c:2579:_priv_gst_element_state_changed: notifying about state-changed NULL to READY (VOID_PENDING pending)
0:00:00.102276742 68 0x55c6790a00 INFO GST_STATES gstbin.c:2954:gst_bin_change_state_func: child ‘nvv4l2camerasrc0’ changed state to 2(READY) successfully
0:00:00.102313255 68 0x55c6790a00 INFO GST_STATES gstelement.c:2651:gst_element_continue_state: committing state from NULL to READY, pending PAUSED, next PAUSED
0:00:00.102338599 68 0x55c6790a00 INFO GST_STATES gstelement.c:2579:_priv_gst_element_state_changed: notifying about state-changed NULL to READY (PAUSED pending)
0:00:00.102548200 68 0x55c6790a00 INFO GST_STATES gstelement.c:2658:gst_element_continue_state: continue state change READY to PAUSED, final PAUSED
0:00:00.102635976 68 0x55c6790a00 INFO GST_STATES gstbin.c:2506:gst_bin_element_set_state: current READY pending VOID_PENDING, desired next PAUSED
0:00:00.102684361 68 0x55c6790a00 INFO GST_STATES gstbin.c:2960:gst_bin_change_state_func: child ‘nv3dsink0’ is changing state asynchronously to PAUSED
0:00:00.102716265 68 0x55c6790a00 INFO GST_STATES gstbin.c:2506:gst_bin_element_set_state: current READY pending VOID_PENDING, desired next PAUSED
0:00:00.102754601 68 0x55c6790a00 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to PAUSED
0:00:00.102778633 68 0x55c6790a00 INFO GST_STATES gstelement.c:2579:_priv_gst_element_state_changed: notifying about state-changed READY to PAUSED (VOID_PENDING pending)
0:00:00.102811753 68 0x55c6790a00 INFO GST_STATES gstbin.c:2954:gst_bin_change_state_func: child ‘capsfilter1’ changed state to 3(PAUSED) successfully
0:00:00.102849385 68 0x55c6790a00 INFO GST_STATES gstbin.c:2506:gst_bin_element_set_state: current READY pending VOID_PENDING, desired next PAUSED
0:00:00.103179435 68 0x55c6790a00 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to PAUSED
0:00:00.103214699 68 0x55c6790a00 INFO GST_STATES gstelement.c:2579:_priv_gst_element_state_changed: notifying about state-changed READY to PAUSED (VOID_PENDING pending)
0:00:00.103282604 68 0x55c6790a00 INFO GST_STATES gstbin.c:2954:gst_bin_change_state_func: child ‘nvvconv0’ changed state to 3(PAUSED) successfully
0:00:00.103343340 68 0x55c6790a00 INFO GST_STATES gstbin.c:2506:gst_bin_element_set_state: current READY pending VOID_PENDING, desired next PAUSED
0:00:00.103387564 68 0x55c6790a00 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to PAUSED
0:00:00.103413164 68 0x55c6790a00 INFO GST_STATES gstelement.c:2579:_priv_gst_element_state_changed: notifying about state-changed READY to PAUSED (VOID_PENDING pending)
0:00:00.103454029 68 0x55c6790a00 INFO GST_STATES gstbin.c:2954:gst_bin_change_state_func: child ‘capsfilter0’ changed state to 3(PAUSED) successfully
0:00:00.103509261 68 0x55c6790a00 INFO GST_STATES gstbin.c:2506:gst_bin_element_set_state: current READY pending VOID_PENDING, desired next PAUSED
0:00:00.108008645 68 0x55c6790a00 INFO basesrc gstbasesrc.c:1358:gst_base_src_do_seek: seeking: time segment start=0:00:00.000000000, offset=0:00:00.000000000, stop=99:99:99.999999999, rate=1.000000, applied_rate=1.000000, flags=0x00, time=0:00:00.000000000, base=0:00:00.000000000, position 0:00:00.000000000, duration 99:99:99.999999999
0:00:00.108119142 68 0x55c6790a00 INFO task gsttask.c:457:gst_task_set_lock: setting stream lock 0x55c6a04110 on task 0x55c6a3c050
0:00:00.108148486 68 0x55c6790a00 INFO GST_PADS gstpad.c:6154:gst_pad_start_task:nvv4l2camerasrc0:src created task 0x55c6a3c050
0:00:00.108434983 68 0x55c6790a00 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to PAUSED
0:00:00.108536040 68 0x55c6790a00 INFO GST_STATES gstelement.c:2579:_priv_gst_element_state_changed: notifying about state-changed READY to PAUSED (VOID_PENDING pending)
0:00:00.108590888 68 0x55c6790a00 INFO GST_STATES gstbin.c:2997:gst_bin_change_state_func: child ‘nvv4l2camerasrc0’ changed state to 3(PAUSED) successfully without preroll
0:00:00.108654825 68 0x55c6790a00 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to PAUSED
0:00:00.108645673 68 0x55c6a09720 INFO GST_ELEMENT_PADS gstelement.c:917:gst_element_get_static_pad: no such pad ‘sink’ in element “nvv4l2camerasrc0”
0:00:00.108748329 68 0x55c6790a00 INFO GST_STATES gstelement.c:2579:_priv_gst_element_state_changed: notifying about state-changed READY to PAUSED (VOID_PENDING pending)
0:00:00.108805513 68 0x55c6a09720 FIXME default gstutils.c:3981:gst_pad_create_stream_id_internal:nvv4l2camerasrc0:src Creating random stream-id, consider implementing a deterministic way of creating a stream-id
Pipeline is live and does not need PREROLL …
0:00:00.109554573 68 0x55c6a09720 WARN nvv4l2camerasrc gstnvv4l2camerasrc.cpp:734:gst_nv_v4l2_camera_fixate: Unable to fixate caps structure
Setting pipeline to PLAYING …
0:00:00.110447506 68 0x55c6790a00 INFO GST_EVENT gstevent.c:1388:gst_event_new_latency: creating latency event 0:00:00.000000000
0:00:00.110541107 68 0x55c6790a00 INFO bin gstbin.c:2783:gst_bin_do_latency_func: configured latency of 0:00:00.000000000
0:00:00.110622227 68 0x55c6790a00 INFO GST_STATES gstbin.c:2506:gst_bin_element_set_state: current READY pending PAUSED, desired next PLAYING
0:00:00.110653107 68 0x55c6790a00 INFO GST_STATES gstbin.c:2960:gst_bin_change_state_func: child ‘nv3dsink0’ is changing state asynchronously to PLAYING
0:00:00.110690612 68 0x55c6790a00 INFO GST_STATES gstbin.c:2506:gst_bin_element_set_state: current PAUSED pending VOID_PENDING, desired next PLAYING
0:00:00.110757332 68 0x55c6790a00 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to PLAYING
0:00:00.110783028 68 0x55c6790a00 INFO GST_STATES gstelement.c:2579:_priv_gst_element_state_changed: notifying about state-changed PAUSED to PLAYING (VOID_PENDING pending)
0:00:00.110815668 68 0x55c6790a00 INFO GST_STATES gstbin.c:2954:gst_bin_change_state_func: child ‘capsfilter1’ changed state to 4(PLAYING) successfully
0:00:00.110850132 68 0x55c6790a00 INFO GST_STATES gstbin.c:2506:gst_bin_element_set_state: current PAUSED pending VOID_PENDING, desired next PLAYING
0:00:00.110878197 68 0x55c6790a00 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to PLAYING
0:00:00.110902517 68 0x55c6790a00 INFO GST_STATES gstelement.c:2579:_priv_gst_element_state_changed: notifying about state-changed PAUSED to PLAYING (VOID_PENDING pending)
0:00:00.110937141 68 0x55c6790a00 INFO GST_STATES gstbin.c:2954:gst_bin_change_state_func: child ‘nvvconv0’ changed state to 4(PLAYING) successfully
0:00:00.110969077 68 0x55c6790a00 INFO GST_STATES gstbin.c:2506:gst_bin_element_set_state: current PAUSED pending VOID_PENDING, desired next PLAYING
0:00:00.111267351 68 0x55c6790a00 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to PLAYING
0:00:00.111334807 68 0x55c6790a00 INFO GST_STATES gstelement.c:2579:_priv_gst_element_state_changed: notifying about state-changed PAUSED to PLAYING (VOID_PENDING pending)
0:00:00.111382615 68 0x55c6790a00 INFO GST_STATES gstbin.c:2954:gst_bin_change_state_func: child ‘capsfilter0’ changed state to 4(PLAYING) successfully
0:00:00.111446232 68 0x55c6790a00 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to PLAYING
0:00:00.111473496 68 0x55c6790a00 INFO GST_STATES gstelement.c:2579:_priv_gst_element_state_changed: notifying about state-changed PAUSED to PLAYING (VOID_PENDING pending)
0:00:00.111529208 68 0x55c6790a00 INFO GST_STATES gstbin.c:2954:gst_bin_change_state_func: child ‘nvv4l2camerasrc0’ changed state to 4(PLAYING) successfully
New clock: GstSystemClock
0:00:00.121501390 68 0x55c6a09720 INFO GST_EVENT gstevent.c:814:gst_event_new_caps: creating caps event video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)UYVY, interlace-mode=(string)progressive, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstNvV4l2CameraSrc:nvv4l2camerasrc0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)UYVY, interlace-mode=(string)progressive, framerate=(fraction)30/1
0:00:00.121855216 68 0x55c6a09720 INFO basetransform gstbasetransform.c:1308:gst_base_transform_setcaps: reuse caps
0:00:00.121930416 68 0x55c6a09720 INFO GST_EVENT gstevent.c:814:gst_event_new_caps: creating caps event video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)UYVY, interlace-mode=(string)progressive, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)UYVY, interlace-mode=(string)progressive, framerate=(fraction)30/1
0:00:00.123043510 68 0x55c6a09720 INFO GST_EVENT gstevent.c:814:gst_event_new_caps: creating caps event video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)NV12
/GstPipeline:pipeline0/Gstnvvconv:nvvconv0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)NV12
0:00:00.123877627 68 0x55c6a09720 INFO basetransform gstbasetransform.c:1308:gst_base_transform_setcaps: reuse caps
0:00:00.123932059 68 0x55c6a09720 INFO GST_EVENT gstevent.c:814:gst_event_new_caps: creating caps event video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)NV12
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)NV12
/GstPipeline:pipeline0/GstNv3dSink:nv3dsink0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)NV12
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)NV12
/GstPipeline:pipeline0/Gstnvvconv:nvvconv0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)UYVY, interlace-mode=(string)progressive, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)UYVY, interlace-mode=(string)progressive, framerate=(fraction)30/1
0:00:00.173840103 68 0x55c6a09720 INFO GST_EVENT gstevent.c:895:gst_event_new_segment: creating segment event time segment start=0:00:00.000000000, offset=0:00:00.000000000, stop=99:99:99.999999999, rate=1.000000, applied_rate=1.000000, flags=0x00, time=0:00:00.000000000, base=0:00:00.000000000, position 0:00:00.000000000, duration 99:99:99.999999999
0:00:00.173966856 68 0x55c6a09720 INFO basesrc gstbasesrc.c:2945:gst_base_src_loop: marking pending DISCONT
0:00:00.183293530 68 0x55c6a09720 INFO GST_STATES gstbin.c:3433:bin_handle_async_done: setting state from PAUSED to PAUSED, pending PLAYING
0:00:00.183364827 68 0x55c6a09720 INFO GST_STATES gstbin.c:3453:bin_handle_async_done: continue state change, pending PLAYING
0:00:00.183312506 68 0x55c6a094f0 ERROR nvvideocontext context_egl.c:48:log_egl_error: egl error: eglCreateWindowSurface returned 3001
Caught SIGSEGV
0:00:00.184601889 68 0x55c6a09990 INFO GST_STATES gstbin.c:3250:gst_bin_continue_func: continue state change PAUSED to PLAYING, final PLAYING
0:00:00.185010115 68 0x55c6a09990 INFO GST_EVENT gstevent.c:1388:gst_event_new_latency: creating latency event 0:00:00.000000000
0:00:00.185144260 68 0x55c6a09990 INFO bin gstbin.c:2783:gst_bin_do_latency_func: configured latency of 0:00:00.000000000
0:00:00.185253029 68 0x55c6a09990 INFO GST_STATES gstbin.c:2506:gst_bin_element_set_state: current PAUSED pending VOID_PENDING, desired next PLAYING
0:00:00.185423846 68 0x55c6a09720 INFO basesrc gstbasesrc.c:2965:gst_base_src_loop: pausing after gst_pad_push() = flushing
0:00:00.185764552 68 0x55c6a09720 INFO task gsttask.c:316:gst_task_func:nvv4l2camerasrc0:src Task going to paused
0:00:00.185959113 68 0x55c6a09990 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to PLAYING
0:00:00.186123849 68 0x55c6a09990 INFO GST_STATES gstelement.c:2579:_priv_gst_element_state_changed: notifying about state-changed PAUSED to PLAYING (VOID_PENDING pending)
exec gdb failed: No such file or directory
0:00:00.186897486 68 0x55c6a09990 INFO GST_STATES gstbin.c:2954:gst_bin_change_state_func: child ‘nv3dsink0’ changed state to 4(PLAYING) successfully
0:00:00.187384112 68 0x55c6a09990 INFO GST_STATES gstbin.c:2506:gst_bin_element_set_state: current PLAYING pending VOID_PENDING, desired next PLAYING
0:00:00.187433073 68 0x55c6a09990 INFO GST_STATES gstbin.c:2623:gst_bin_element_set_state: skipping transition from PLAYING to PLAYING
0:00:00.187655474 68 0x55c6a09990 INFO GST_STATES gstbin.c:2954:gst_bin_change_state_func: child ‘capsfilter1’ changed state to 4(PLAYING) successfully
0:00:00.187743698 68 0x55c6a09990 INFO GST_STATES gstbin.c:2506:gst_bin_element_set_state: current PLAYING pending VOID_PENDING, desired next PLAYING
0:00:00.187793458 68 0x55c6a09990 INFO GST_STATES gstbin.c:2623:gst_bin_element_set_state: skipping transition from PLAYING to PLAYING
0:00:00.187835027 68 0x55c6a09990 INFO GST_STATES gstbin.c:2954:gst_bin_change_state_func: child ‘nvvconv0’ changed state to 4(PLAYING) successfully
0:00:00.187897683 68 0x55c6a09990 INFO GST_STATES gstbin.c:2506:gst_bin_element_set_state: current PLAYING pending VOID_PENDING, desired next PLAYING
0:00:00.187949619 68 0x55c6a09990 INFO GST_STATES gstbin.c:2623:gst_bin_element_set_state: skipping transition from PLAYING to PLAYING
0:00:00.187987668 68 0x55c6a09990 INFO GST_STATES gstbin.c:2954:gst_bin_change_state_func: child ‘capsfilter0’ changed state to 4(PLAYING) successfully
0:00:00.188035668 68 0x55c6a09990 INFO GST_STATES gstbin.c:2506:gst_bin_element_set_state: current PLAYING pending VOID_PENDING, desired next PLAYING
0:00:00.188072212 68 0x55c6a09990 INFO GST_STATES gstbin.c:2623:gst_bin_element_set_state: skipping transition from PLAYING to PLAYING
0:00:00.188105652 68 0x55c6a09990 INFO GST_STATES gstbin.c:2954:gst_bin_change_state_func: child ‘nvv4l2camerasrc0’ changed state to 4(PLAYING) successfully
0:00:00.188145108 68 0x55c6a09990 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to PLAYING
0:00:00.188191253 68 0x55c6a09990 INFO GST_STATES gstelement.c:2579:_priv_gst_element_state_changed: notifying about state-changed PAUSED to PLAYING (VOID_PENDING pending)
Spinning. Please run ‘gdb gst-launch-1.0 68’ to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.

err.txt (32.9 KB)

Hi,

Do you run xhost + first?
If not, could you give it a try?

For example:

$ export DISPLAY=:0
$ xhost +
$ sudo docker run -it --rm --net=host --runtime nvidia  -e DISPLAY=$DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix nvcr.io/nvidia/l4t-base:r32.5.0

Thanks.

Yes. I did run my docker image with xhost + first.

I also tried your commands shown above with /dev/ mapped, then nvv4l2camerasrc reported error.

user@localhost:~$ export DISPLAY=:0
user@localhost:~$ xhost +
access control disabled, clients can connect from any host
user@localhost:~$ sudo docker run -it --rm --net=host --runtime nvidia -e DISPLAY=$DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix -v /dev/:/dev/ nvcr.io/nvidia/l4t-base:r32.5.0
root@localhost:/# GST_DEBUG=4 gst-launch-1.0 -vv nvv4l2camerasrc ! ‘video/x-raw(memory:NVMM), format=UYVY, width=1920, height=1080, framerate=30/1’ ! nvvidconv ! ‘video/x-raw(memory:NVMM), format=NV12’ ! nv3dsink

0:00:00.173143183 21 0x55849f3a00 ERROR nvv4l2camerasrc gstnvv4l2camerasrc.cpp:980:gst_nv_v4l2_camera_start: Opening /dev/video0 device
0:00:00.173175887 21 0x55849f3a00 WARN basesrc gstbasesrc.c:3452:gst_base_src_start: error: Failed to start
0:00:00.173234128 21 0x55849f3a00 INFO GST_ERROR_SYSTEM gstelement.c:2145:gst_element_message_full_with_details: posting message: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.
0:00:00.173354513 21 0x55849f3a00 INFO GST_ERROR_SYSTEM gstelement.c:2172:gst_element_message_full_with_details: posted error message: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.
0:00:00.173401490 21 0x55849f3a00 WARN basesrc gstbasesrc.c:3807:gst_base_src_activate_push: Failed to start in push mode
0:00:00.173433938 21 0x55849f3a00 INFO GST_PADS gstpad.c:1284:activate_mode_internal:nvv4l2camerasrc0:src failed to activate in push mode
0:00:00.173494067 21 0x55849f3a00 WARN GST_PADS gstpad.c:1149:gst_pad_set_active:nvv4l2camerasrc0:src Failed to activate pad

root@localhost:/# ls -l /dev/video*
crw-rw----+ 1 root video 81, 0 Jul 29 13:25 /dev/video0

Hi,
Does it work with videotestsrc plugin like:

root@localhost:/# GST_DEBUG=4 gst-launch-1.0 -vv videotestsrc is-live=1 ! video/x-raw, format=UYVY, width=1920, height=1080, framerate=30/1 ! nvvidconv ! 'video/x-raw(memory:NVMM), format=NV12' ! nv3dsink

It looks to be a different error. One is egl error and the other is the v4l2 source cannot be successfully initialized.

1 Like

Hi Dane,

I retried with videotestsrc and it could work properly.
I checked the given docker command and found that ‘–net=host’ was configured.
But if I remove this ‘–net=host’, then the egl error pop up again.

So here comes my next question, is there other way to solve the egl error without ‘–net=host’ configuration in docker command?
Thanks a lot!

Hi,

It’s required by the X11 server.
For more details, please check below:

Thanks.

Thanks Aasta.
Video issue is solved.
But audio issue still there.
I will restart a new thread.