GStreamer CRITICAL ERROR when ran under docker

gst_mini_object_set_qdata: assertion ‘object != NULL’

I am seeing this CRITICAL error and then our application hangs when running under nvidia-docker2 on JP4.5.

Our image is based off of:

FROM nvcr.io/nvidia/deepstream-l4t:5.1-21.02-base

The container is run like this:

docker run --privileged --rm --net=host --ipc=host -e DISPLAY=$DISPLAY -v /tmp/argus_socket:/tmp/argus_socket --cap-add SYS_PTRACE -v ~/.Xauthority:/root/.Xauthority -v /tmp/.X11-unix/:/tmp/.X11-unix --device /dev/video0  --device /dev/video1 myimage:latest
$ cat /etc/docker/daemon.json
{
    "default-runtime": "nvidia",
    "runtimes": {
        "nvidia": {
            "path": "nvidia-container-runtime",
            "runtimeArgs": []
        }
    }
}

Witthout docker, I am able to start and stop pipelines normally. But within docker I see the critical failure above and hang.

What am I doing wrong?

Hi,
Please share the gstreamer pipeline and full console log for more information.