Got Connection refused after restarting app inside a docker container

If I try to restart my app inside a docker container I get

(Argus) Error FileOperationFailed: Connecting to nvargus-daemon failed: Connection refused (in src/rpc/socket/client/SocketClientDispatch.cpp, function openSocketConnection(), line 201)

I guess cap.release() and cv2.destroyAllWindows are not done well, because I get a segfault.

Is there a workaround to resume properly? BTW cannot find anything looking deeper with lsof

Hi,

  1. What command are you using to hit this error? If this is your app, are you able to share the source code?
  2. Why do you think this is due to cv2.destroyAllWindows? Your error log is from argus.

Hi WayneWWW, something is weird

If I run my code from an headless JN it works 98% reliable after refactoring the garbage cleaning process from a separate thread.

[INFO] Inspector thread will exit...
[INFO] cleaning up...
GST_ARGUS: Cleaning up

(python3:21947): GStreamer-CRITICAL **: 23:38:25.825: gst_mini_object_set_qdata: assertion 'object != NULL' failed

(python3:21947): GStreamer-CRITICAL **: 23:38:25.825: gst_mini_object_set_qdata: assertion 'object != NULL' failed
CONSUMER: Done Success
GST_ARGUS: Done Success

I have installed the latest os release # R32 (release), REVISION: 4.2, GCID: 20074772, BOARD: t210ref, EABI: aarch64, DATE: Thu Apr 9 01:22:12 UTC 2020
If I start X11 and start a docker container (nvcr.io/nvidia/l4t-base:r32.4.2) the mileage vary. Sometime after a systemctl restart nvargus-daemon it works sometime not. I had to recreate the container from the image to get it working.

Another strange situation is if I run the docker container WITHOUT X11 (headless mode) I get

libEGL warning: MESA-LOADER: failed to open swrast (search paths /usr/lib/aarch64-linux-gnu/dri:$${ORIGIN}/dri:/usr/lib/dri)
nvbuf_utils: Could not get EGL display connection
(Argus) Error FileOperationFailed:Connecting to
nvargus-daemon failed: Connection refused (in src/rpc/socket/client/SocketClientDispatch.cpp, function openSocketConnection(), line 201)

The same code runs headless native but not inside an headless docker container.

Keep in mind I am using the same GStreamer pipeline in both environment

    "nvarguscamerasrc sensor-id=%d ! " + \
    "video/x-raw(memory:NVMM), width=1280, height=720, format=NV12, framerate=%d/1 ! " + \
    "nvvidconv flip-method=%d ! " + \
    "video/x-raw, display_width=320, display_height=320, format=BGRx ! " + \
    "videoconvert ! video/x-raw, format=BGR ! " + \
    "appsink"

I double checked swrast_dri.so with ldd and everything is linked properly no missing libs.

No clue at the moment why I cant start the same code inside a docker container running on an headless JN.

BTW I tried Xvfb :1 & without success

Hi,

It seems there were similar issues before.

I think it is a little complicated to understand your current problem because docker is getting involved.

When you said “headless natvie”, you mean the pure jetpack image on device, right?

so

  1. Run gstreamer pipeline/ native headless -> working
  2. Run gstreamer pipeline/ native headless / with X11 -> working?
  3. Run gstreamer pipeline/ native headless / with no X11 -> EGL connection error

For case 3, could you check the log /var/log/Xorg.0.log? Also, show us the result of command “lsmod”.

Hi WayneWWW, thx for your support:

  1. Yes, the python code can run natively without docker. Lifecycle is handled without $DISPLAY correctly
  2. Yes, it runs inside a docker container in X11 mode. Apparently I need xhost + and $DISPLAY, need more test if this is stable or not. This slows the FPS rate down
  3. No, using docker and headless Nano does not work (See my output above)
    In this case I don’t have Xorg.0.log because DISPLAY is not set.
    Here my lsmod:

    lsmod

Module Size Used by
xt_conntrack 3609 2
ipt_MASQUERADE 2346 2
nf_nat_masquerade_ipv4 3111 1 ipt_MASQUERADE
nf_conntrack_netlink 28859 0
nfnetlink 7959 2 nf_conntrack_netlink
xt_addrtype 3670 2
iptable_nat 2882 1
nf_conntrack_ipv4 11992 3
nf_defrag_ipv4 1836 1 nf_conntrack_ipv4
nf_nat_ipv4 6712 1 iptable_nat
nf_nat 20406 2 nf_nat_masquerade_ipv4,nf_nat_ipv4
nf_conntrack 105820 6 nf_conntrack_ipv4,nf_conntrack_netlink,nf_nat_masquerade_ipv4,xt_conntrack,nf_nat_ipv4,nf_nat
br_netfilter 16250 0
xt_multiport 3269 4
iptable_filter 2481 1
ip6table_filter 2481 1
ip6_tables 19493 1 ip6table_filter
synaptics_usb 6563 0
zram 26166 4
overlay 48691 1
spidev 13282 0
nvgpu 1580098 17
bluedroid_pm 13912 0
ip_tables 19441 2 iptable_filter,iptable_nat
x_tables 28951 8 xt_multiport,ip_tables,iptable_filter,ipt_MASQUERADE,ip6table_filter,xt_addrtype,xt_conntrack,ip6_tables

Hi giminni,

EGL connection always needs a X11 init no matter what condition. When you run your usecase out of docker, we have gdm3 running in background so that X is still alive.

Hi WayneWWW,

What you said is true, but why can I run the python code from an headless nano (no X11 is started, no DISPLAY variable is set) but if I run THE SAME CODE in headless mode INSIDE docker it ask for EGL ?

Hi giminni,

I wonder how did you make sure you have no X11 started in headless nano case. Could you share the setup of headless nano?

Hi WayenWWW,

  1. Check if an X process is running: ps -e | grep X
    no result

  2. Check the current target: sudo systemctl get-default

     $ sudo systemctl get-default
     multi-user.target
    
  3. Started my python code with cuDNN support


GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
[INFO] video stream state is True

Hi giminni,

Are you still able to see any log in xorg.0.log in this status?

Here my more detailed ps result

 ps -ef | grep -E 'X|nv'

root 734 2 0 07:21 ? 00:00:04 [nvmap-bz]
root 1075 2 0 07:21 ? 00:00:00 [nvhdcp0]
root 1082 2 0 07:21 ? 00:00:00 [nvhdcp0]
root 1134 2 0 07:21 ? 00:00:00 [nvhdcp1]
root 1331 2 0 07:22 ? 00:00:00 [nvme]
root 1860 2 0 07:22 ? 00:00:00 [ext4-rsv-conver]
nx 4800 1 0 07:22 ? 00:00:13 /usr/NX/bin/nxserver.bin --daemon
root 5033 1 0 07:22 ? 00:00:00 /usr/sbin/nvs-service
root 5036 1 0 07:22 ? 00:00:02 /bin/bash /etc/systemd/nvmemwarning.sh
root 5119 2 0 07:22 ? 00:01:51 [nvgpu_channel_p]
root 5154 1 0 07:22 ? 00:00:00 /bin/bash /etc/systemd/nvgetty.sh
root 5187 1 3 07:22 ? 00:06:38 /usr/sbin/nvargus-daemon
root 5383 1 0 07:22 ? 00:00:00 /usr/sbin/nvphsd
root 5398 5383 0 07:22 ? 00:00:15 /usr/sbin/nvphsd
root 5685 2 0 07:22 ? 00:00:00 [ext4-rsv-conver]
nx 6309 4800 0 07:22 ? 00:00:00 /usr/NX/bin/nxd

Here my ls from /tmp

$ ls -las /tmp/.X11-unix/

total 16
4 drwxrwxrwt 2 root root 4096 May 8 07:22 .
12 drwxrwxrwt 12 root root 12288 May 8 10:40 …

Hi.

Please provide if you could still see xorg.0.log and what is the log inside when your headless mode is setup.

`$ cat Xorg.0.log
[ 6.984] (–) Log file renamed from “/var/log/Xorg.pid-5548.log” to “/var/log/Xorg.0.log”
[ 6.986]
X.Org X Server 1.19.6
Release Date: 2017-12-20
[ 6.986] X Protocol Version 11, Revision 0
[ 6.986] Build Operating System: Linux 4.4.0-168-generic aarch64 Ubuntu
[ 6.986] Current Operating System: Linux bms971svrp01 4.9.140-tegra #1 SMP PREEMPT Wed Apr 8 18:10:49 PDT 2020 aarch64
[ 6.986] Kernel command line: tegraid=21.1.2.0.0 ddr_die=4096M@2048M section=512M memtype=0 vpr_resize usb_port_owner_info=0 lane_owner_info=0 emc_max_dvfs=0 touch_id=0@63 video=tegrafb no_console_suspend=1 console=ttyS0,115200n8 debug_uartport=lsport,2 earlyprintk=uart8250-32bit,0x70006000 maxcpus=4 usbcore.old_scheme_first=1 lp0_vec=0x1000@0xff780000 core_edp_mv=1075 core_edp_ma=4000 root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 quiet
[ 6.987] Build Date: 14 November 2019 06:20:13PM
[ 6.987] xorg-server 2:1.19.6-1ubuntu4.4 (For technical support please see http://www.ubuntu.com/support)
[ 6.987] Current version of pixman: 0.34.0
[ 6.987] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 6.987] Markers: (–) probed, () from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 6.987] (==) Log file: “/var/log/Xorg.0.log”, Time: Wed May 6 10:42:59 2020
[ 6.988] (==) Using config file: “/etc/X11/xorg.conf”
[ 6.988] (==) Using system config directory “/usr/share/X11/xorg.conf.d”
[ 6.992] (==) No Layout section. Using the first Screen section.
[ 6.992] (==) No screen section available. Using defaults.
[ 6.992] (
) |–>Screen “Default Screen Section” (0)
[ 6.992] () | |–>Monitor “”
[ 6.993] (==) No device specified for screen “Default Screen Section”.
Using the first device section listed.
[ 6.993] (
) | |–>Device “Tegra0”
[ 6.993] (==) No monitor specified for screen “Default Screen Section”.
Using a default monitor configuration.
[ 6.993] (==) Automatically adding devices
[ 6.993] (==) Automatically enabling devices
[ 6.993] (==) Automatically adding GPU devices
[ 6.993] (==) Automatically binding GPU devices
[ 6.993] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 7.000] (WW) The directory “/usr/share/fonts/X11/cyrillic” does not exist.
[ 7.000] Entry deleted from font path.
[ 7.000] (WW) The directory “/usr/share/fonts/X11/100dpi/” does not exist.
[ 7.000] Entry deleted from font path.
[ 7.000] (WW) The directory “/usr/share/fonts/X11/75dpi/” does not exist.
[ 7.000] Entry deleted from font path.
[ 7.004] (WW) The directory “/usr/share/fonts/X11/100dpi” does not exist.
[ 7.004] Entry deleted from font path.
[ 7.004] (WW) The directory “/usr/share/fonts/X11/75dpi” does not exist.
[ 7.004] Entry deleted from font path.
[ 7.004] (==) FontPath set to:
/usr/share/fonts/X11/misc,
/usr/share/fonts/X11/Type1,
built-ins
[ 7.004] (==) ModulePath set to “/usr/lib/xorg/modules”
[ 7.004] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
[ 7.004] (II) Loader magic: 0x5588609010
[ 7.004] (II) Module ABI versions:
[ 7.004] X.Org ANSI C Emulation: 0.4
[ 7.004] X.Org Video Driver: 23.0
[ 7.004] X.Org XInput driver : 24.1
[ 7.004] X.Org Server Extension : 10.0
[ 7.006] (++) using VT number 1

[ 7.010] (II) systemd-logind: took control of session /org/freedesktop/login1/session/c1
[ 7.012] (II) no primary bus or device found
[ 7.012] (WW) “dri” will not be loaded unless you’ve specified it to be loaded elsewhere.
[ 7.012] (II) “glx” will be loaded by default.
[ 7.012] (II) LoadModule: “extmod”
[ 7.012] (II) Module “extmod” already built-in
[ 7.012] (II) LoadModule: “glx”
[ 7.013] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 7.047] (II) Module glx: vendor=“X.Org Foundation”
[ 7.047] compiled for 1.19.6, module version = 1.0.0
[ 7.047] ABI class: X.Org Server Extension, version 10.0
[ 7.047] (II) LoadModule: “nvidia”
[ 7.049] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
[ 7.076] (II) Module nvidia: vendor=“NVIDIA Corporation”
[ 7.076] compiled for 4.0.2, module version = 1.0.0
[ 7.076] Module class: X.Org Video Driver
[ 7.094] (II) NVIDIA dlloader X Driver 32.4.2 Release Build (integ_stage_rel) (buildbrain@mobile-u64-4164) Wed Apr 8 18:12:28 PDT 2020
[ 7.094] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[ 7.094] (WW) Falling back to old probe method for NVIDIA
[ 7.095] (II) Loading sub module “fb”
[ 7.095] (II) LoadModule: “fb”
[ 7.099] (II) Loading /usr/lib/xorg/modules/libfb.so
[ 7.102] (II) Module fb: vendor=“X.Org Foundation”
[ 7.102] compiled for 1.19.6, module version = 1.0.0
[ 7.102] ABI class: X.Org ANSI C Emulation, version 0.4
[ 7.102] (II) Loading sub module “wfb”
[ 7.102] (II) LoadModule: “wfb”
[ 7.103] (II) Loading /usr/lib/xorg/modules/libwfb.so
[ 7.105] (II) Module wfb: vendor=“X.Org Foundation”
[ 7.105] compiled for 1.19.6, module version = 1.0.0
[ 7.105] ABI class: X.Org ANSI C Emulation, version 0.4
[ 7.105] (II) Loading sub module “ramdac”
[ 7.105] (II) LoadModule: “ramdac”
[ 7.106] (II) Module “ramdac” already built-in
[ 7.107] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[ 7.107] (II) NVIDIA(0): Creating default Display subsection in Screen section
“Default Screen Section” for depth/fbbpp 24/32
[ 7.107] (==) NVIDIA(0): Depth 24, (==) framebuffer bpp 32
[ 7.107] (==) NVIDIA(0): RGB weight 888
[ 7.107] (==) NVIDIA(0): Default visual is TrueColor
[ 7.107] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[ 7.107] (DB) xf86MergeOutputClassOptions unsupported bus type 0
[ 7.107] () NVIDIA(0): Option “AllowEmptyInitialConfiguration” “true”
[ 7.107] (
) NVIDIA(0): Enabling 2D acceleration
[ 7.107] (II) Loading sub module “glxserver_nvidia”
[ 7.107] (II) LoadModule: “glxserver_nvidia”
[ 7.108] (II) Loading /usr/lib/xorg/modules/extensions/libglxserver_nvidia.so
[ 7.370] (II) Module glxserver_nvidia: vendor=“NVIDIA Corporation”
[ 7.370] compiled for 4.0.2, module version = 1.0.0
[ 7.370] Module class: X.Org Server Extension
[ 7.370] (II) NVIDIA GLX Module 32.4.2 Release Build (integ_stage_rel) (buildbrain@mobile-u64-4164) Wed Apr 8 18:10:45 PDT 2020
[ 7.471] (–) NVIDIA(0): Valid display device(s) on GPU-0 at SoC
[ 7.471] (–) NVIDIA(0): DFP-0
[ 7.471] (–) NVIDIA(0): DFP-1
[ 7.472] (II) NVIDIA(0): NVIDIA GPU NVIDIA Tegra X1 (nvgpu) (GM20B) at SoC (GPU-0)
[ 7.472] (–) NVIDIA(0): Memory: 4059412 kBytes
[ 7.472] (–) NVIDIA(0): VideoBIOS:
[ 7.472] (==) NVIDIA(0):
[ 7.472] (==) NVIDIA(0): No modes were requested; the default mode “nvidia-auto-select”
[ 7.472] (==) NVIDIA(0): will be used as the requested mode.
[ 7.472] (==) NVIDIA(0):
[ 7.472] (–) NVIDIA(0): No enabled display devices found; starting anyway because
[ 7.472] (–) NVIDIA(0): AllowEmptyInitialConfiguration is enabled
[ 7.472] (II) NVIDIA(0): Validated MetaModes:
[ 7.472] (II) NVIDIA(0): “NULL”
[ 7.472] (II) NVIDIA(0): Virtual screen size determined to be 640 x 480
[ 7.472] (WW) NVIDIA(0): Unable to get display device for DPI computation.
[ 7.472] (==) NVIDIA(0): DPI set to (75, 75); computed from built-in default
[ 7.472] (–) Depth 24 pixmap format is 32 bpp
[ 7.472] (II) NVIDIA: Reserving 6144.00 MB of virtual memory for indirect memory
[ 7.473] (II) NVIDIA: access.
[ 7.476] (EE) NVIDIA(0): Failed to allocate NVIDIA Error Handler
[ 7.476] (II) NVIDIA(0): ACPI: failed to connect to the ACPI event daemon; the daemon
[ 7.476] (II) NVIDIA(0): may not be running or the “AcpidSocketPath” X
[ 7.476] (II) NVIDIA(0): configuration option may not be set correctly. When the
[ 7.476] (II) NVIDIA(0): ACPI event daemon is available, the NVIDIA X driver will
[ 7.476] (II) NVIDIA(0): try to use it to receive ACPI event notifications. For
[ 7.476] (II) NVIDIA(0): details, please see the “ConnectToAcpid” and
[ 7.476] (II) NVIDIA(0): “AcpidSocketPath” X configuration options in Appendix B: X
[ 7.476] (II) NVIDIA(0): Config Options in the README.
[ 7.531] (II) NVIDIA(0): Setting mode “NULL”
[ 7.534] (==) NVIDIA(0): Disabling shared memory pixmaps
[ 7.534] (==) NVIDIA(0): Backing store enabled
[ 7.534] (==) NVIDIA(0): Silken mouse enabled
[ 7.535] (==) NVIDIA(0): DPMS enabled
[ 7.535] (II) Loading sub module “dri2”
[ 7.535] (II) LoadModule: “dri2”
[ 7.535] (II) Module “dri2” already built-in
[ 7.535] (II) NVIDIA(0): [DRI2] Setup complete
[ 7.535] (II) NVIDIA(0): [DRI2] VDPAU driver: nvidia
[ 7.535] (–) RandR disabled
[ 7.543] (II) SELinux: Disabled on system
[ 7.544] (II) Initializing extension GLX
[ 7.544] (II) Indirect GLX disabled.
[ 7.705] (II) config/udev: Adding input device tegra-hda HDMI/DP,pcm=3 (/dev/input/event0)
[ 7.705] (II) No input driver specified, ignoring this device.
[ 7.705] (II) This device may have been added with another device file.
[ 7.707] (II) config/udev: Adding input device Lite-On Tech IBM USB Keyboard with UltraNav (/dev/input/event2)
[ 7.707] () Lite-On Tech IBM USB Keyboard with UltraNav: Applying InputClass “libinput keyboard catchall”
[ 7.707] (II) LoadModule: “libinput”
[ 7.708] (II) Loading /usr/lib/xorg/modules/input/libinput_drv.so
[ 7.720] (II) Module libinput: vendor=“X.Org Foundation”
[ 7.720] compiled for 1.19.6, module version = 0.27.1
[ 7.720] Module class: X.Org XInput Driver
[ 7.720] ABI class: X.Org XInput driver, version 24.1
[ 7.720] (II) Using input driver ‘libinput’ for ‘Lite-On Tech IBM USB Keyboard with UltraNav’
[ 7.722] (II) systemd-logind: got fd for /dev/input/event2 13:66 fd 33 paused 0
[ 7.722] (
) Lite-On Tech IBM USB Keyboard with UltraNav: always reports core events
[ 7.722] () Option “Device” “/dev/input/event2”
[ 7.722] (
) Option “_source” “server/udev”
[ 7.724] (II) event2 - Lite-On Tech IBM USB Keyboard with UltraNav: is tagged by udev as: Keyboard
[ 7.724] (II) event2 - Lite-On Tech IBM USB Keyboard with UltraNav: device is a keyboard
[ 7.724] (II) event2 - Lite-On Tech IBM USB Keyboard with UltraNav: device removed
[ 7.724] () Option “config_info” “udev:/sys/devices/70090000.xusb/usb1/1-2/1-2.3/1-2.3.3/1-2.3.3:1.0/0003:04B3:3018.0001/input/input2/event2”
[ 7.724] (II) XINPUT: Adding extended input device “Lite-On Tech IBM USB Keyboard with UltraNav” (type: KEYBOARD, id 6)
[ 7.725] (
) Option “xkb_model” “pc105”
[ 7.725] () Option “xkb_layout” “de”
[ 7.768] (II) event2 - Lite-On Tech IBM USB Keyboard with UltraNav: is tagged by udev as: Keyboard
[ 7.768] (II) event2 - Lite-On Tech IBM USB Keyboard with UltraNav: device is a keyboard
[ 7.770] (II) config/udev: Adding input device Lite-On Tech IBM USB Keyboard with UltraNav (/dev/input/event3)
[ 7.770] (
) Lite-On Tech IBM USB Keyboard with UltraNav: Applying InputClass “libinput keyboard catchall”
[ 7.770] (II) Using input driver ‘libinput’ for ‘Lite-On Tech IBM USB Keyboard with UltraNav’
[ 7.772] (II) systemd-logind: got fd for /dev/input/event3 13:67 fd 36 paused 0
[ 7.772] () Lite-On Tech IBM USB Keyboard with UltraNav: always reports core events
[ 7.772] (
) Option “Device” “/dev/input/event3”
[ 7.772] () Option “_source” “server/udev”
[ 7.774] (II) event3 - Lite-On Tech IBM USB Keyboard with UltraNav: is tagged by udev as: Keyboard
[ 7.774] (II) event3 - Lite-On Tech IBM USB Keyboard with UltraNav: device is a keyboard
[ 7.774] (II) event3 - Lite-On Tech IBM USB Keyboard with UltraNav: device removed
[ 7.774] (
) Option “config_info” “udev:/sys/devices/70090000.xusb/usb1/1-2/1-2.3/1-2.3.3/1-2.3.3:1.1/0003:04B3:3018.0002/input/input3/event3”
[ 7.774] (II) XINPUT: Adding extended input device “Lite-On Tech IBM USB Keyboard with UltraNav” (type: KEYBOARD, id 7)
[ 7.774] () Option “xkb_model” “pc105”
[ 7.774] (
) Option “xkb_layout” “de”
[ 7.776] (II) event3 - Lite-On Tech IBM USB Keyboard with UltraNav: is tagged by udev as: Keyboard
[ 7.776] (II) event3 - Lite-On Tech IBM USB Keyboard with UltraNav: device is a keyboard
[ 7.777] (II) config/udev: Adding input device Synaptics Inc. Composite TouchPad / TrackPoint (/dev/input/event4)
[ 7.778] () Synaptics Inc. Composite TouchPad / TrackPoint: Applying InputClass “libinput touchpad catchall”
[ 7.778] (II) Using input driver ‘libinput’ for ‘Synaptics Inc. Composite TouchPad / TrackPoint’
[ 7.779] (II) systemd-logind: got fd for /dev/input/event4 13:68 fd 37 paused 0
[ 7.779] (
) Synaptics Inc. Composite TouchPad / TrackPoint: always reports core events
[ 7.779] () Option “Device” “/dev/input/event4”
[ 7.779] (
) Option “_source” “server/udev”
[ 7.781] (II) event4 - Synaptics Inc. Composite TouchPad / TrackPoint: is tagged by udev as: Touchpad
[ 7.781] (II) event4 - Synaptics Inc. Composite TouchPad / TrackPoint: no resolution or size hints, assuming a size of 69x50mm
[ 7.781] (II) event4 - Synaptics Inc. Composite TouchPad / TrackPoint: device is a touchpad
[ 7.781] (II) event4 - Synaptics Inc. Composite TouchPad / TrackPoint: device removed
[ 7.782] () Option “config_info” “udev:/sys/devices/70090000.xusb/usb1/1-2/1-2.3/1-2.3.4/1-2.3.4:1.0/input/input4/event4”
[ 7.782] (II) XINPUT: Adding extended input device “Synaptics Inc. Composite TouchPad / TrackPoint” (type: TOUCHPAD, id 8)
[ 7.782] (
) Option “AccelerationScheme” “none”
[ 7.782] () Synaptics Inc. Composite TouchPad / TrackPoint: (accel) selected scheme none/0
[ 7.782] (
) Synaptics Inc. Composite TouchPad / TrackPoint: (accel) acceleration factor: 2.000
[ 7.782] () Synaptics Inc. Composite TouchPad / TrackPoint: (accel) acceleration threshold: 4
[ 7.783] (II) event4 - Synaptics Inc. Composite TouchPad / TrackPoint: is tagged by udev as: Touchpad
[ 7.783] (II) event4 - Synaptics Inc. Composite TouchPad / TrackPoint: no resolution or size hints, assuming a size of 69x50mm
[ 7.783] (II) event4 - Synaptics Inc. Composite TouchPad / TrackPoint: device is a touchpad
[ 7.785] (II) config/udev: Adding input device Synaptics Inc. Composite TouchPad / TrackPoint (/dev/input/mouse0)
[ 7.785] (II) No input driver specified, ignoring this device.
[ 7.785] (II) This device may have been added with another device file.
[ 7.786] (II) config/udev: Adding input device Synaptics Inc. Composite TouchPad / TrackPoint (Stick) (/dev/input/event5)
[ 7.786] (
) Synaptics Inc. Composite TouchPad / TrackPoint (Stick): Applying InputClass “libinput pointer catchall”
[ 7.787] (II) Using input driver ‘libinput’ for ‘Synaptics Inc. Composite TouchPad / TrackPoint (Stick)’
[ 7.788] (II) systemd-logind: got fd for /dev/input/event5 13:69 fd 38 paused 0
[ 7.788] () Synaptics Inc. Composite TouchPad / TrackPoint (Stick): always reports core events
[ 7.788] (
) Option “Device” “/dev/input/event5”
[ 7.788] () Option “_source” “server/udev”
[ 7.790] (II) event5 - Synaptics Inc. Composite TouchPad / TrackPoint (Stick): is tagged by udev as: Mouse Pointingstick
[ 7.790] (II) event5 - Synaptics Inc. Composite TouchPad / TrackPoint (Stick): trackpoint device set to range 31
[ 7.790] (II) event5 - Synaptics Inc. Composite TouchPad / TrackPoint (Stick): device is a pointer
[ 7.790] (II) event5 - Synaptics Inc. Composite TouchPad / TrackPoint (Stick): device removed
[ 7.790] (
) Option “config_info” “udev:/sys/devices/70090000.xusb/usb1/1-2/1-2.3/1-2.3.4/1-2.3.4:1.1/input/input5/event5”
[ 7.790] (II) XINPUT: Adding extended input device “Synaptics Inc. Composite TouchPad / TrackPoint (Stick)” (type: MOUSE, id 9)
[ 7.791] () Option “AccelerationScheme” “none”
[ 7.791] (
) Synaptics Inc. Composite TouchPad / TrackPoint (Stick): (accel) selected scheme none/0
[ 7.791] () Synaptics Inc. Composite TouchPad / TrackPoint (Stick): (accel) acceleration factor: 2.000
[ 7.791] (
) Synaptics Inc. Composite TouchPad / TrackPoint (Stick): (accel) acceleration threshold: 4
[ 7.792] (II) event5 - Synaptics Inc. Composite TouchPad / TrackPoint (Stick): is tagged by udev as: Mouse Pointingstick
[ 7.792] (II) event5 - Synaptics Inc. Composite TouchPad / TrackPoint (Stick): trackpoint device set to range 31
[ 7.792] (II) event5 - Synaptics Inc. Composite TouchPad / TrackPoint (Stick): device is a pointer
[ 7.793] (II) config/udev: Adding input device Synaptics Inc. Composite TouchPad / TrackPoint (Stick) (/dev/input/mouse1)
[ 7.794] (II) No input driver specified, ignoring this device.
[ 7.794] (II) This device may have been added with another device file.
[ 7.794] (II) config/udev: Adding input device gpio-keys (/dev/input/event1)
[ 7.794] () gpio-keys: Applying InputClass “libinput keyboard catchall”
[ 7.794] (II) Using input driver ‘libinput’ for ‘gpio-keys’
[ 7.796] (II) systemd-logind: got fd for /dev/input/event1 13:65 fd 39 paused 0
[ 7.796] (
) gpio-keys: always reports core events
[ 7.796] () Option “Device” “/dev/input/event1”
[ 7.796] (
) Option “_source” “server/udev”
[ 7.797] (II) event1 - gpio-keys: is tagged by udev as: Keyboard
[ 7.797] (II) event1 - gpio-keys: device is a keyboard
[ 7.797] (II) event1 - gpio-keys: device removed
[ 7.797] () Option “config_info” “udev:/sys/devices/gpio-keys/input/input1/event1”
[ 7.797] (II) XINPUT: Adding extended input device “gpio-keys” (type: KEYBOARD, id 10)
[ 7.797] (
) Option “xkb_model” “pc105”
[ 7.797] () Option “xkb_layout” “de”
[ 7.799] (II) event1 - gpio-keys: is tagged by udev as: Keyboard
[ 7.799] (II) event1 - gpio-keys: device is a keyboard
[ 72.544] (–) NVIDIA(GPU-0): Lenovo Group Limited LEN LT2452pwC (DFP-0): connected
[ 72.544] (–) NVIDIA(GPU-0): Lenovo Group Limited LEN LT2452pwC (DFP-0): External TMDS
[ 72.553] (II) NVIDIA(0): Setting mode “NULL”
[ 72.603] (–) NVIDIA(GPU-0): Lenovo Group Limited LEN LT2452pwC (DFP-0): connected
[ 72.603] (–) NVIDIA(GPU-0): Lenovo Group Limited LEN LT2452pwC (DFP-0): External TMDS
[ 72.638] (II) NVIDIA(0): Setting mode “HDMI-0: nvidia-auto-select @1920x1200 +0+0 {AllowGSYNC=Off, ViewPortIn=1920x1200, ViewPortOut=1920x1200+0+0}”
[ 72.787] (–) NVIDIA(GPU-0): Lenovo Group Limited LEN LT2452pwC (DFP-0): connected
[ 72.787] (–) NVIDIA(GPU-0): Lenovo Group Limited LEN LT2452pwC (DFP-0): External TMDS
[ 85.426] (
) Option “fd” “33”
[ 85.426] (II) event2 - Lite-On Tech IBM USB Keyboard with UltraNav: device removed
[ 85.427] () Option “fd” “36”
[ 85.427] (II) event3 - Lite-On Tech IBM USB Keyboard with UltraNav: device removed
[ 85.428] (
) Option “fd” “37”
[ 85.428] (II) event4 - Synaptics Inc. Composite TouchPad / TrackPoint: device removed
[ 85.429] () Option “fd” “38”
[ 85.429] (II) event5 - Synaptics Inc. Composite TouchPad / TrackPoint (Stick): device removed
[ 85.429] (
) Option “fd” “39”
[ 85.429] (II) event1 - gpio-keys: device removed
[ 85.516] (II) systemd-logind: got pause for 13:68
[ 85.516] (II) systemd-logind: got pause for 13:69
[ 85.516] (II) systemd-logind: got pause for 13:65
[ 85.516] (II) systemd-logind: got pause for 13:66
[ 85.516] (II) systemd-logind: got pause for 13:67
[ 85.517] (II) libinput: Synaptics Inc. Composite TouchPad / TrackPoint (Stick): SetProperty on 304 called but device is disabled.
This driver cannot change properties on a disabled device
[ 85.517] (II) libinput: Synaptics Inc. Composite TouchPad / TrackPoint (Stick): SetProperty on 297 called but device is disabled.
This driver cannot change properties on a disabled device
[ 85.520] (II) libinput: Synaptics Inc. Composite TouchPad / TrackPoint (Stick): SetProperty on 306 called but device is disabled.
This driver cannot change properties on a disabled device
[ 85.521] (II) libinput: Synaptics Inc. Composite TouchPad / TrackPoint (Stick): SetProperty on 306 called but device is disabled.
This driver cannot change properties on a disabled device
[ 85.521] (II) libinput: Synaptics Inc. Composite TouchPad / TrackPoint (Stick): SetProperty on 275 called but device is disabled.
This driver cannot change properties on a disabled device
[160702.686] (II) UnloadModule: “libinput”
[160702.713] (II) systemd-logind: releasing fd for 13:65
[160705.733] (II) UnloadModule: “libinput”
[160705.733] (II) systemd-logind: releasing fd for 13:69
[160705.773] (II) UnloadModule: “libinput”
[160705.774] (II) systemd-logind: releasing fd for 13:68
[160705.788] (II) UnloadModule: “libinput”
[160705.789] (II) systemd-logind: releasing fd for 13:67
[160705.813] (II) UnloadModule: “libinput”
[160705.813] (II) systemd-logind: releasing fd for 13:66
[160705.841] (II) NVIDIA(GPU-0): Deleting GPU-0
[160705.843] (WW) xf86CloseConsole: KDSETMODE failed: Input/output error
[160705.843] (WW) xf86CloseConsole: VT_GETMODE failed: Input/output error
[160705.843] (WW) xf86CloseConsole: VT_ACTIVATE failed: Input/output error
[160705.849] (II) Server terminated successfully (0). Closing log file.`

uptime is

$ uptime

10:45:00 up 3:23, 0 users, load average: 0.27, 0.30, 0.46

Hi,

Can we have a clean test result?
Did you test the EGL application after this line?

[160705.841] (II) NVIDIA(GPU-0): Deleting GPU-0
[160705.843] (WW) xf86CloseConsole: KDSETMODE failed: Input/output error
[160705.843] (WW) xf86CloseConsole: VT_GETMODE failed: Input/output error
[160705.843] (WW) xf86CloseConsole: VT_ACTIVATE failed: Input/output error
[160705.849] (II) Server terminated successfully (0). Closing log file.`

yes I use the same code outside and inside a docker container no code changes same Gstreamer pipeline

Hmm. Honestly that is cool.

Maybe there are some limitation on docker that we don’t know.

Could you paste your full error log from gstreamer on docker?

The error is repeatable, again the same code is wrapped into a L4T-base:r32-4.2 container my Nano is running L4T-base:r32-4.2 operating system.


nvbuf_utils: Could not get EGL display connection
(Argus) Error NotSupported: Failed to initialize EGLDisplay (in src/eglutils/EGLUtils.cpp, function getDefaultDisplay(), line 77)
(Argus) Error BadParameter: (propagating from src/eglstream/FrameConsumerImpl.cpp, function initialize(), line 89)
(Argus) Error BadParameter: (propagating from src/eglstream/FrameConsumerImpl.cpp, function create(), line 44)
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadInitialize:247 Failed to create FrameConsumer
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:188 (propagating)
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:588 (propagating)
nvbuf_utils: Could not get EGL display connection
GST_ARGUS: Creating output stream
[ WARN:0] global /tmp/build_opencv/opencv/modules/videoio/src/cap_gstreamer.cpp (935) open OpenCV | GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1
utils.py loaded the environment parameters : True
##################################
[INFO] Videostream handle is False
##################################
[INFO] Program ended abnormally!
./entrypoint.sh: line 32: 10 Segmentation fault (core dumped)

… info from the nv_tegra_release file…

 $ cat /etc/nv_tegra_release 
# R32 (release), REVISION: 4.2, GCID: 20074772, BOARD: t210ref, EABI: aarch64, DATE: Thu Apr  9 01:22:12 UTC 2020

… and here my gstreamer pipeline

   "nvarguscamerasrc sensor-id=%d ! " + \
    "video/x-raw(memory:NVMM), width=1280, height=720, format=NV12, framerate=%d/1 ! " + \
    "nvvidconv flip-method=%d ! " + \
    "video/x-raw, display_width=320, display_height=320, format=BGRx ! " + \
    "videoconvert ! video/x-raw, format=BGR ! " + \
    "appsink") % (

… the docker information says:

Client:
 Version:           19.03.6
 API version:       1.40
 Go version:        go1.12.17
 Git commit:        369ce74a3c
 Built:             Fri Feb 28 23:47:53 2020
 OS/Arch:           linux/arm64
 Experimental:      true

Server:
 Engine:
  Version:          19.03.6
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.17
  Git commit:       369ce74a3c
  Built:            Wed Feb 19 01:06:16 2020
  OS/Arch:          linux/arm64
  Experimental:     true
 containerd:
  Version:          1.3.3-0ubuntu1~18.04.2
  GitCommit:        
 nvidia:
  Version:          spec: 1.0.1-dev
  GitCommit:        
 docker-init:
  Version:          0.18.0
  GitCommit:

… and the default runtime is nvidia

Client:
 Debug Mode: false
 Plugins:
  buildx: Build with BuildKit (Docker Inc.)

Server:
 Containers: 1
  Running: 0
  Paused: 0
  Stopped: 1
 Images: 2
 Server Version: 19.03.6
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: nvidia runc
 Default Runtime: nvidia
 Init Binary: docker-init
 containerd version: 
 runc version: 
 init version: 
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 4.9.140-tegra
 Operating System: Ubuntu 18.04.4 LTS
 OSType: linux
 Architecture: aarch64
 CPUs: 4
 Total Memory: 3.871GiB
 Name: <redacted>
 ID: UC2O:SEBQ:G3Y7:BPBN:VB7M:EBQX:X32X:4ENT:XMUQ:XXXX:XXXX:XXXX
 Docker Root Dir: /media/docker
 Debug Mode: false
 Username: <redacted>
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: true
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Could you compare if you can run in non-X environment with below gst pipeline?

Please check this on both native and docker environment.

gst-launch-1.0 nvarguscamerasrc ! nvvidconv ! ‘video/x-raw,format=BGRx’ ! fakesink