Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using cross-compiled plugin inside Nvidia DeepStream container in Jetson #111

Open
kostastsing opened this issue Jul 10, 2024 · 5 comments

Comments

@kostastsing
Copy link

kostastsing commented Jul 10, 2024

I have built the gst-plugin-pylon inside deepstream-l4t:6.4-triton-multiarch in a x86_64 workstation using qemu machine emulator. As the plugin depends on libnvbufsurface.so library for enabling NVMM feature, I download the L4T BSP inside the container, extract it and copy the corresponding library in /opt/nvidia/deepstream/deepstream/lib. I provide the code snippet in the dockerfile below:

FROM --platform=linux/arm64 nvcr.io/nvidia/deepstream-l4t:6.4-triton-multiarch
...
ARG L4T_PATH=https://developer.nvidia.com/downloads/embedded/l4t/r36_release_v3.0/release/jetson_linux_r36.3.0_aarch64.tbz2
RUN wget ${L4T_PATH} \
    && tar -xf jetson_linux_r3*aarch64.tbz2 \
    && cd Linux_for_Tegra/nv_tegra \
    && tar -jxpf nvidia_drivers.tbz2 \
    && cp -aprf usr/lib/aarch64-linux-gnu/tegra/libnvbuf*.so.1.0.0 /opt/nvidia/deepstream/deepstream/lib/ \
    && cp -aprf usr/lib/aarch64-linux-gnu/tegra/libnvdsbufferpool.so.1.0.0 /opt/nvidia/deepstream/deepstream/lib/ \
    && cd /opt/nvidia/deepstream/deepstream/lib/ \
    && rm libnvbufsurface.so libnvbufsurftransform.so libnvdsbufferpool.so \
    && ln -s libnvbufsurface.so.1.0.0 libnvbufsurface.so \
    && ln -s libnvbufsurftransform.so.1.0.0 libnvbufsurftransform.so \
    && ln -s libnvdsbufferpool.so.1.0.0 libnvdsbufferpool.so \
    && cd /code_libs && rm -rf Linux_for_Tegra && rm jetson_linux_r3*_aarch64.tbz2
...

Also, I have previously installed the pylon SDK for arm64 in the container in /opt/pylon. The plugin is then built successfully with NVMM support inside the container as you can see below:

#18 29.99 Cloning into 'gst-plugin-pylon'...
#18 60.68 The Meson build system
#18 60.68 Version: 1.4.1
#18 60.68 Source dir: /code_libs/gst-plugin-pylon
#18 60.68 Build dir: /code_libs/gst-plugin-pylon/builddir
#18 60.68 Build type: native build
#18 60.68 Project name: gst-plugin-pylon
#18 60.68 Project version: 0.7.0
#18 60.68 C compiler for the host machine: cc (gcc 11.4.0 "cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")
#18 60.68 C linker for the host machine: cc ld.bfd 2.38
#18 60.68 C++ compiler for the host machine: c++ (gcc 11.4.0 "c++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")
#18 60.68 C++ linker for the host machine: c++ ld.bfd 2.38
#18 60.68 Host machine cpu family: aarch64
#18 60.68 Host machine cpu: aarch64
#18 60.68 Found pkg-config: YES (/usr/bin/pkg-config) 0.29.2
#18 60.68 Run-time dependency gstreamer-1.0 found: YES 1.20.3
#18 60.68 Message: Building against GStreamer 1.20.3
#18 60.68 Program python3 found: YES (/usr/bin/python3)
#18 60.68 Compiler for C supports link arguments -Wl,-Bsymbolic-functions: YES 
#18 60.68 Compiler for C supports arguments -fno-strict-aliasing: YES 
#18 60.68 Message: Disabling GLib cast checks
#18 60.68 Checking for size of "char" : 1 
#18 60.68 Checking for size of "int" : 4 
#18 60.68 Checking for size of "long" : 8 
#18 60.68 Checking for size of "short" : 2 
#18 60.68 Checking for size of "void*" : 8 
#18 60.68 Checking for size of "off_t" : 8 
#18 60.68 Compiler for C supports arguments -fvisibility=hidden: YES 
#18 60.68 Compiler for C supports arguments -Wmissing-declarations: YES 
#18 60.68 Compiler for C++ supports arguments -Wmissing-declarations: YES 
#18 60.68 Compiler for C supports arguments -Wredundant-decls: YES 
#18 60.68 Compiler for C++ supports arguments -Wredundant-decls: YES 
#18 60.68 Compiler for C supports arguments -Wwrite-strings: YES 
#18 60.68 Compiler for C++ supports arguments -Wwrite-strings: YES 
#18 60.68 Compiler for C supports arguments -Winit-self: YES 
#18 60.68 Compiler for C++ supports arguments -Winit-self: YES 
#18 60.68 Compiler for C supports arguments -Wmissing-include-dirs: YES 
#18 60.68 Compiler for C++ supports arguments -Wmissing-include-dirs: YES 
#18 60.68 Compiler for C supports arguments -Wno-multichar: YES 
#18 60.68 Compiler for C++ supports arguments -Wno-multichar: YES 
#18 60.68 Compiler for C supports arguments -Wvla: YES 
#18 60.68 Compiler for C++ supports arguments -Wvla: YES 
#18 60.68 Compiler for C supports arguments -Wpointer-arith: YES 
#18 60.68 Compiler for C++ supports arguments -Wpointer-arith: YES 
#18 60.68 Compiler for C supports arguments -Wmissing-prototypes: YES 
#18 60.68 Compiler for C supports arguments -Wdeclaration-after-statement: YES 
#18 60.68 Compiler for C supports arguments -Wold-style-definition: YES 
#18 60.68 Compiler for C supports arguments -Waggregate-return: YES 
#18 60.68 Run-time dependency gstreamer-base-1.0 found: YES 1.20.3
#18 60.68 Run-time dependency gstreamer-check-1.0 found: YES 1.20.3
#18 60.68 Run-time dependency gstreamer-pbutils-1.0 found: YES 1.20.1
#18 60.68 Run-time dependency gstreamer-allocators-1.0 found: YES 1.20.1
#18 60.68 Run-time dependency gstreamer-video-1.0 found: YES 1.20.1
#18 60.68 Run-time dependency glib-2.0 found: YES 2.72.4
#18 60.68 Run-time dependency gobject-2.0 found: YES 2.72.4
#18 60.68 Header "gst/gstconfig.h" has symbol "GST_DISABLE_GST_DEBUG" with dependency gstreamer-1.0: NO 
#18 60.68 Message: GStreamer debug system is enabled
#18 60.68 Found CMake: /usr/bin/cmake (3.22.1)
#18 60.68 Run-time dependency pylon (modules: pylon::pylon) found: YES 7.4.0
#18 60.68 Library nvbufsurface found: YES
#18 60.68 Run-time dependency CUDA (modules: cudart_static) found: YES 12.2 (/usr/local/cuda)
#18 60.68 Run-time dependency valgrind found: NO (tried pkgconfig)
#18 60.68 Run-time dependency gstreamer-plugins-base-1.0 found: YES 1.20.1
#18 60.68 Dependency gstpylon found: YES 0.7.0 (overridden)
#18 60.68 Program /usr/libexec/gstreamer-1.0/gst-plugins-doc-cache-generator found: NO
#18 60.68 docs/meson.build:32: WARNING: GStreamer plugin inspector for documentation not found, can't update the cache
#18 60.68 Program hotdoc found: NO
#18 60.68 Message: Hotdoc not found, not building the documentation
#18 60.68 Message: Meta python bindings enabled
#18 60.68 Program python3 found: YES (/usr/bin/python3)
#18 60.68 Run-time dependency python found: YES 3.10
#18 60.68 bindings/meson.build:4: WARNING: Project targets '>= 0.61' but uses feature deprecated since '0.55.0': ExternalProgram.path. use ExternalProgram.full_path() instead
#18 60.68 Message: /usr/bin/python3
#18 60.68 Message: /usr/lib/python3/dist-packages/
#18 60.68 pybind11-config found: NO
#18 60.68 Run-time dependency pybind11 found: NO (tried pkgconfig, config-tool and cmake)
#18 60.68 Looking for a fallback subproject for the dependency pybind11
#18 60.68 Downloading pybind11 source from https://github.com/pybind/pybind11/archive/refs/tags/v2.10.0.tar.gz
#18 63.33 Downloading pybind11 patch from https://wrapdb.mesonbuild.com/v2/pybind11_2.10.0-1/get_patch
#18 65.09 
#18 65.09 Executing subproject pybind11 
#18 65.09 
#18 65.09 pybind11| Project name: pybind11
#18 65.09 pybind11| Project version: 2.10.0
#18 65.09 pybind11| C++ compiler for the host machine: c++ (gcc 11.4.0 "c++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")
#18 65.09 pybind11| C++ linker for the host machine: c++ ld.bfd 2.38
#18 65.09 pybind11| Build targets in project: 8
#18 65.09 pybind11| Subproject pybind11 finished.
#18 65.09 
#18 65.09 Dependency pybind11 from subproject subprojects/pybind11-2.10.0 found: YES 2.10.0
#18 65.09 Dependency gstpylon found: YES 0.7.0 (overridden)
#18 65.09 Configuring config.h using configuration
#18 65.09 Message: install git commit hooks
#18 65.09 Build targets in project: 9
#18 65.09 WARNING: Deprecated features used:
#18 65.09  * 0.55.0: {'ExternalProgram.path'}
#18 65.09 
#18 65.09 gst-plugin-pylon 0.7.0
#18 65.09 
#18 65.09     Plugins        : pylon
#18 65.09 
#18 65.09   Subprojects
#18 65.09     pybind11       : YES
#18 65.09 
#18 65.09   User defined options
#18 65.09     prefix         : /usr/
#18 65.09     python-bindings: enabled
#18 65.09 
#18 65.09 Found ninja-1.11.1.git.kitware.jobserver-1 at /usr/local/bin/ninja
#18 65.50 ninja: Entering directory `builddir'
#18 68.63 [1/34] Generating version.h with a custom command (wrapped by meson because command contains newlines)
#18 69.91 [2/34] Compiling C object tests/examples/pylon/list_properties.p/list_properties.c.o
#18 70.16 [3/34] Compiling C++ object gst-libs/gst/pylon/libgstpylon-1.0.so.p/gstpylondebug.cpp.o
#18 71.05 [4/34] Compiling C object tests/examples/pylon/pylonsrc.p/pylonsrc.c.o
#18 71.67 [5/34] Compiling C object tests/check/generic_states.p/generic_states.c.o
#18 73.32 [6/34] Compiling C object tests/examples/pylon/show_meta.p/show_meta.c.o
#18 75.99 [7/34] Compiling C++ object ext/pylon/libgstpylon.so.p/gstpylonplugin.cpp.o
#18 86.66 [8/34] Compiling C++ object gst-libs/gst/pylon/libgstpylon-1.0.so.p/gstpylonmeta.cpp.o
#18 86.68 [9/34] Compiling C++ object ext/pylon/libgstpylon.so.p/gstpylondisconnecthandler.cpp.o
#18 86.77 [10/34] Compiling C++ object ext/pylon/libgstpylon.so.p/gstpylonsysmembufferfactory.cpp.o
#18 87.00 [11/34] Compiling C++ object ext/pylon/libgstpylon.so.p/gstpylonimagehandler.cpp.o
#18 87.61 [12/34] Compiling C++ object ext/pylon/libgstpylon.so.p/gstchildinspector.cpp.o
#18 87.78 [13/34] Linking target tests/check/generic_states
#18 87.88 [14/34] Linking target tests/examples/pylon/pylonsrc
#18 87.99 [15/34] Linking target tests/examples/pylon/list_properties
#18 90.60 [16/34] Compiling C++ object ext/pylon/libgstpylon.so.p/gstpylonsrc.cpp.o
#18 91.95 [17/34] Compiling C++ object gst-libs/gst/pylon/libgstpylon-1.0.so.p/gstpylonparamspecs.cpp.o
#18 92.49 [18/34] Compiling C++ object gst-libs/gst/pylon/libgstpylon-1.0.so.p/gstpyloncache.cpp.o
#18 94.42 [19/34] Compiling C++ object ext/pylon/libgstpylon.so.p/gstpylondsnvmmbufferfactory.cpp.o
#18 95.04 [20/34] Compiling C++ object gst-libs/gst/pylon/libgstpylon-1.0.so.p/gstpylonparamfactory.cpp.o
#18 101.9 [21/34] Compiling C++ object gst-libs/gst/pylon/libgstpylon-1.0.so.p/gstpylonobject.cpp.o
#18 107.8 [22/34] Compiling C++ object tests/prototypes/dynamic_limits.p/dynamic_limits.cpp.o
#18 108.5 [23/34] Linking target tests/prototypes/dynamic_limits
#18 114.5 [24/34] Compiling C++ object gst-libs/gst/pylon/libgstpylon-1.0.so.p/gstpylonfeaturewalker.cpp.o
#18 132.3 [25/34] Compiling C++ object gst-libs/gst/pylon/libgstpylon-1.0.so.p/gstpylonintrospection.cpp.o
#18 133.0 [26/34] Linking target gst-libs/gst/pylon/libgstpylon-1.0.so
#18 134.2 [27/34] Generating symbol file gst-libs/gst/pylon/libgstpylon-1.0.so.p/libgstpylon-1.0.so.symbols
#18 134.8 [28/34] Linking target tests/examples/pylon/show_meta
#18 138.1 [29/34] Compiling C++ object ext/pylon/libgstpylon.so.p/gstpylon.cpp.o
#18 138.9 [30/34] Linking target ext/pylon/libgstpylon.so
#18 167.0 [31/34] Compiling C++ object bindings/pygstpylon.cpython-310-aarch64-linux-gnu.so.p/src_pygstpylon.cpp.o
#18 177.4 [32/34] Compiling C++ object bindings/pygstpylon.cpython-310-aarch64-linux-gnu.so.p/src_bindaccessfunctions.cpp.o
#18 195.1 [33/34] Compiling C++ object bindings/pygstpylon.cpython-310-aarch64-linux-gnu.so.p/src_bindpylonmeta.cpp.o
#18 195.8 [34/34] Linking target bindings/pygstpylon.cpython-310-aarch64-linux-gnu.so
#18 196.1 ninja: Entering directory `builddir'
#18 197.5 [1/4] Generating version.h with a custom command (wrapped by meson because command contains newlines)
#18 197.5 [1/2] Installing files.
#18 199.5 Installing gst-libs/gst/pylon/libgstpylon-1.0.so to /usr/lib/aarch64-linux-gnu
#18 199.5 Installing ext/pylon/libgstpylon.so to /usr/lib/aarch64-linux-gnu/gstreamer-1.0
#18 199.5 Installing bindings/pygstpylon.cpython-310-aarch64-linux-gnu.so to /usr/lib/python3/dist-packages
#18 199.5 Installing /code_libs/gst-plugin-pylon/gst-libs/gst/pylon/gstpylon-prelude.h to /usr/include/gstreamer-1.0/gst/pylon
#18 199.5 Installing /code_libs/gst-plugin-pylon/gst-libs/gst/pylon/gstpyloncache.h to /usr/include/gstreamer-1.0/gst/pylon
#18 199.5 Installing /code_libs/gst-plugin-pylon/gst-libs/gst/pylon/gstpylondebug.h to /usr/include/gstreamer-1.0/gst/pylon
#18 199.5 Installing /code_libs/gst-plugin-pylon/gst-libs/gst/pylon/gstpylonfeaturewalker.h to /usr/include/gstreamer-1.0/gst/pylon
#18 199.5 Installing /code_libs/gst-plugin-pylon/gst-libs/gst/pylon/gstpylonintrospection.h to /usr/include/gstreamer-1.0/gst/pylon
#18 199.5 Installing /code_libs/gst-plugin-pylon/gst-libs/gst/pylon/gstpylonmeta.h to /usr/include/gstreamer-1.0/gst/pylon
#18 199.5 Installing /code_libs/gst-plugin-pylon/gst-libs/gst/pylon/gstpylonmetaprivate.h to /usr/include/gstreamer-1.0/gst/pylon
#18 199.5 Installing /code_libs/gst-plugin-pylon/gst-libs/gst/pylon/gstpylonobject.h to /usr/include/gstreamer-1.0/gst/pylon
#18 199.5 Installing /code_libs/gst-plugin-pylon/gst-libs/gst/pylon/gstpylonparamspecs.h to /usr/include/gstreamer-1.0/gst/pylon
#18 199.5 Installing /code_libs/gst-plugin-pylon/builddir/meson-private/gstpylon-1.0.pc to /usr/lib/aarch64-linux-gnu/pkgconfig
#18 199.5 Running custom install script '/usr/bin/python3 /code_libs/gst-plugin-pylon/builddir/meson-private/pycompile.py python-3.10-installed.json 0'
#18 199.5 Running custom install script '/usr/bin/python3 /code_libs/gst-plugin-pylon/builddir/meson-private/pycompile.py python-3.10-installed.json 0'
#18 DONE 199.6s

As, I want to deploy my application to a Jetson device, I build a docker image based on deepstream-l4t:6.4-samples-multiarch that contains only the runtime libraries of deepstream. I copy the plugin library libgstpylon.so and all the shared libraries it depends on at runtime into the container from the image I built previously (base). I provide the corresponding dockerfile code snippet below:

# Gst-pylon plugin
COPY --from=base /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstpylon.so /usr/lib/aarch64-linux-gnu/gstreamer-1.0
# Pylon libraries
COPY --from=base /usr/lib/aarch64-linux-gnu/libgstpylon-1.0.so /usr/lib/aarch64-linux-gnu
COPY --from=base /opt/pylon/lib/libGCBase_gcc_v3_1_Basler_pylon.so /usr/local/lib
COPY --from=base /opt/pylon/lib/libGenApi_gcc_v3_1_Basler_pylon.so /usr/local/lib
COPY --from=base /opt/pylon/lib/libpylonbase.so /usr/local/lib
COPY --from=base /opt/pylon/lib/libpylonutility.so /usr/local/lib
COPY --from=base /opt/pylon/lib/libMathParser_gcc_v3_1_Basler_pylon.so /usr/local/lib
COPY --from=base /opt/pylon/lib/libXmlParser_gcc_v3_1_Basler_pylon.so /usr/local/lib
COPY --from=base /opt/pylon/lib/libLog_gcc_v3_1_Basler_pylon.so /usr/local/lib
COPY --from=base /opt/pylon/lib/libNodeMapData_gcc_v3_1_Basler_pylon.so /usr/local/lib

When, I run the final production image on Jetson device I am taking the below errors:

** (deepstreamer:53): CRITICAL **: 19:46:15.506: void gst_pylon_set_nvsurface_layout(GstPylon*, GstPylonNvsurfaceLayoutEnum): assertion 'self' failed

** (deepstreamer:53): CRITICAL **: 19:46:15.506: void gst_pylon_set_gpu_id(GstPylon*, gint): assertion 'self' failed

... pylonsrc gstpylonsrc.cpp:821:gst_pylon_src_start:<basler_1-src_elem> error: Failed to start camera.
... pylonsrc gstpylonsrc.cpp:821:gst_pylon_src_start:<basler_1-src_elem> error: No devices found matching the specified criteria

The plugin is successfully loaded and inspected inside the container, but there are two messages globbing failed printed:

globbing failed
globbing failed
Factory Details:
  Rank                     none (0)
  Long-name                Basler/Pylon source element
  Klass                    Source/Video/Hardware
  Description              Source element for Basler cameras
  Author                   Basler AG <[email protected]>

Plugin Details:
  Name                     pylon
  Description              Basler/Pylon plugin for pylon SDK 7.4.0(38864)
  Filename                 /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstpylon.so
  Version                  0.7.1-6-gf9dc08c
  License                  BSD
  Source module            gst-plugin-pylon
  Binary package           GStreamer Pylon Plug-in source release
  Origin URL               https://github.com/basler/gst-plugin-pylon
...

Regarding the hardware setup, I use two basler GigE cameras each connected to a different network port in a basler GigE interface card that is connected on a Jetson AGX Orin via the PCIe bus.

I have also installed the pylon SDK on Jetson (out of the container) and I have verified that the cameras operate successfully. In addition, to verify that the cameras can be accessed from inside the container I have installed pypylon and I have run the startup.py sample successfully.

Has anyone with a similar setup experienced this problem? Can anyone give a direction in resolving this issue?

@thiesmoeller
Copy link
Collaborator

Currently working on exactly what you did.
Will check your issues

@kostastsing
Copy link
Author

kostastsing commented Jul 10, 2024

The above errors are also raised when I install and use the plugin natively on AGX Orin Jetpack 6.0 (L4T r36.3.0) with pylon SDK 7.4.0 installed. Thus they do not seem to be related to docker. Also, the version of the plugin that raises the above errors in my setup is 0.7.1-6-gf9dc08c. I downgraded the plugin version to 0.7.0-12-geffb041 by checking out feature/fix_build_on_pylon7.4.0 branch and the plugin works successfully without errors.

@kostastsing
Copy link
Author

kostastsing commented Jul 12, 2024

UPDATE

While the plugin works after I downgraded the version to 0.7.0 it does not work when running inside a container using the setup and the Dockerfile I described above. I am getting a segmentation fault. I provide the stacktrace below:

Thread 1 "streamer" received signal SIGSEGV, Segmentation fault.
0x0000ffff7ec9b4ec in gst_pylon_new (gstpylonsrc=gstpylonsrc@entry=0xaaaaab6d9e80, device_user_name=<optimized out>, device_serial_number=<optimized out>, device_index=<optimized out>, enable_correction=<optimized out>, err=err@entry=0xffffffffdee0) at ../ext/pylon/gstpylon.cpp:340
340     ../ext/pylon/gstpylon.cpp: No such file or directory.
(gdb) bt
#0  0x0000ffff7ec9b4ec in gst_pylon_new(_GstElement*, char const*, char const*, int, int, _GError**)
    (gstpylonsrc=gstpylonsrc@entry=0xaaaaab6d9e80, device_user_name=<optimized out>, device_serial_number=<optimized out>, device_index=<optimized out>, enable_correction=<optimized out>, err=err@entry=0xffffffffdee0) at ../ext/pylon/gstpylon.cpp:340
#1  0x0000ffff7eca497c in gst_pylon_src_start(GstBaseSrc*) (src=<optimized out>) at ../ext/pylon/gstpylonsrc.cpp:780
#2  0x0000fffff6cd72e0 in  () at /lib/aarch64-linux-gnu/libgstbase-1.0.so.0
#3  0x0000fffff6cd8340 in  () at /lib/aarch64-linux-gnu/libgstbase-1.0.so.0
#4  0x0000fffff7a3d288 in  () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#5  0x0000fffff7a3dae0 in gst_pad_set_active () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#6  0x0000fffff7a2166c in  () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#7  0x0000fffff7a2b0f8 in gst_iterator_fold () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#8  0x0000fffff7a9fb1c in  () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#9  0x0000fffff7a1ed58 in  () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#10 0x0000fffff7a21968 in  () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#11 0x0000fffff6cd84e0 in  () at /lib/aarch64-linux-gnu/libgstbase-1.0.so.0
#12 0x0000fffff7a20be8 in gst_element_change_state () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#13 0x0000fffff7a21374 in  () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#14 0x0000fffff79f678c in  () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#15 0x0000fffff7a20be8 in gst_element_change_state () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0

Is the fault raised because it cannot find the source file ../ext/pylon/gstpylon.cpp? If yes, why the source file is needed since we have built the plugin and using the final executable inside the container?

Also, I keep getting two messages globbing failed each time I inspect or use the plugin inside the container.

@kostastsing
Copy link
Author

kostastsing commented Jul 20, 2024

UPDATE

While the plugin works after I downgraded the version to 0.7.0 it does not work when running inside a container using the setup and the Dockerfile I described above. I am getting a segmentation fault. I provide the stacktrace below:

Thread 1 "streamer" received signal SIGSEGV, Segmentation fault.
0x0000ffff7ec9b4ec in gst_pylon_new (gstpylonsrc=gstpylonsrc@entry=0xaaaaab6d9e80, device_user_name=<optimized out>, device_serial_number=<optimized out>, device_index=<optimized out>, enable_correction=<optimized out>, err=err@entry=0xffffffffdee0) at ../ext/pylon/gstpylon.cpp:340
340     ../ext/pylon/gstpylon.cpp: No such file or directory.
(gdb) bt
#0  0x0000ffff7ec9b4ec in gst_pylon_new(_GstElement*, char const*, char const*, int, int, _GError**)
    (gstpylonsrc=gstpylonsrc@entry=0xaaaaab6d9e80, device_user_name=<optimized out>, device_serial_number=<optimized out>, device_index=<optimized out>, enable_correction=<optimized out>, err=err@entry=0xffffffffdee0) at ../ext/pylon/gstpylon.cpp:340
#1  0x0000ffff7eca497c in gst_pylon_src_start(GstBaseSrc*) (src=<optimized out>) at ../ext/pylon/gstpylonsrc.cpp:780
#2  0x0000fffff6cd72e0 in  () at /lib/aarch64-linux-gnu/libgstbase-1.0.so.0
#3  0x0000fffff6cd8340 in  () at /lib/aarch64-linux-gnu/libgstbase-1.0.so.0
#4  0x0000fffff7a3d288 in  () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#5  0x0000fffff7a3dae0 in gst_pad_set_active () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#6  0x0000fffff7a2166c in  () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#7  0x0000fffff7a2b0f8 in gst_iterator_fold () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#8  0x0000fffff7a9fb1c in  () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#9  0x0000fffff7a1ed58 in  () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#10 0x0000fffff7a21968 in  () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#11 0x0000fffff6cd84e0 in  () at /lib/aarch64-linux-gnu/libgstbase-1.0.so.0
#12 0x0000fffff7a20be8 in gst_element_change_state () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#13 0x0000fffff7a21374 in  () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#14 0x0000fffff79f678c in  () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#15 0x0000fffff7a20be8 in gst_element_change_state () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0

Is the fault raised because it cannot find the source file ../ext/pylon/gstpylon.cpp? If yes, why the source file is needed since we have built the plugin and using the final executable inside the container?

Also, I keep getting two messages globbing failed each time I inspect or use the plugin inside the container.

I managed to solve the above issue by copying all the contents of /opt/pylon/lib from the host into the container. I came up with this solution after checking with lsof what files are opened when I run the command gst-inspect-1.0 pylonsrc. I can mark this issue as closed, but the other issue about using the latest plugin with version 0.7.1-6-gf9dc08c and pylon 7.4.0 still remains unresolved.

@thiesmoeller
Copy link
Collaborator

Hi @kostastsing,

we now have binary debian packages for multiple debian and ubuntu versions:

https://github.com/basler/gst-plugin-pylon/releases/tag/v0.7.3

and an explanation to build the plugin debian packages for NVIDIA deepstream including nvmm support:

https://github.com/basler/gst-plugin-pylon?tab=readme-ov-file#debian-nvidia-packaging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants