L4T R32.4.3 Breaks argus_camera and causes segmentation fault (SIGSEGV)

The argus_camera application from the NVIDIA Jetson Linux Multimedia samples crashes every time it is executed immediately with a segmentation fault.

Steps to reproduce:

  1. Install a fresh system to the Jetson TX2 with the Linux JetPack 4.4 including all of the Jetson SDK Components
  2. After the initial user setup and all the SDK components are installed, including the Multimedia API sources from nvidia-l4t-jetson-multimedia-api_32.4.3-20200625213407_arm64.deb, compile the argus_camera application

sudo apt-get install libgtk-3-dev libjpeg-dev
cp -a /usr/src/jetson_multimedia_api ~/
cd ~/jetson_multimedia_api/argus/cmake/
cmake ..
make
sudo make install

  1. Execute the argus_camera application from the command line
    /usr/local/bin/argus_camera

The program will get a segmentation fault immediately after executing, before starting any video stream.

Executing Argus Sample Application (argus_camera)
Argus Version: 0.97.3 (multi-process)
Segmentation fault (core dumped)

I have verified this multiple times. There was no issue with the argus_camera application on L4T R32.4.2 (JetPack 4.4 DP). I used the exact same procedure installing everything and compiling, and the argus_camera application works perfectly well on L4T R32.4.2, but is broken with the userspace libraries/applications that are installed with L4T R32.4.3.

I captured the coredump along with a gdb session output (in case that is easier to quickly diagnose) from the crashing argus_camera. The problem is in jetson_multimedia_api/argus/apps/camera/modules/Dispatcher.cpp @ line 945 where iCameraProperties->getFocusPositionRange() is called. I do not have the source for libnvargus_socketclient.so, but the SIGSEGV occurs at the same program counter every time inside of libnvargus_socketclient.so.

Here is the capture of the gdb session which gives the back trace, stack, and register information: argus_camera_gdb_info.txt (9.1 KB)

Here is the actual coredump file (not a txt file, it is bzip2 compressed): argus_camera.core.bz2 (2.2 MB)

Again, this is a completely unmodified L4T R32.4.3 system, other than the compilation of the argus_camera application, but here is some information from the system:

cat /etc/nv_tegra_release
# R32 (release), REVISION: 4.3, GCID: 21589087, BOARD: t186ref, EABI: aarch64, DATE: Fri Jun 26 04:34:27 UTC 2020

$ md5sum /usr/sbin/nvargus-daemon
fa5b39d1a502edf75145a3c0de58a865 /usr/sbin/nvargus-daemon

$ md5sum /usr/lib/aarch64-linux-gnu/tegra/libnvargus*
730af64f91e53d3632691209403bef4f /usr/lib/aarch64-linux-gnu/tegra/libnvargus.so
b8825bf3c2e2d253506e018893b6be87 /usr/lib/aarch64-linux-gnu/tegra/libnvargus_socketclient.so
ce04b1cb57540f36a55cf99796a137da /usr/lib/aarch64-linux-gnu/tegra/libnvargus_socketserver.so

$ dpkg -l nvidia-l4t-camera
ii nvidia-l4t-camera 32.4.3-20200625213 arm64 NVIDIA Camera Package

Here are the application binaries from the argus multimedia that I compiled: Argus_Multimedia_binary_apps_R32.4.3_aarch64.tbz2 (3.1 MB) -> not a txt file, tarred bzip2 compressed data of all the argus applications

3 Likes

hello JDSchroeder,

it may caused by parsed properties failed.
could you please commented out all calls to ICameraProperties::getFocusPositionRange, i.e. Lines(945) and Line(1151-1153) for testing
thanks

argus_camera can start with 945 commented out. However, there are still numerous problems. For example: ISP digital gain range is locked/grayed out and stuck with a minimum value in that field of 2.970 and a maximum value of 2.970. This is shown on the command line to also be the min/max value allowed for --ispdigitalgainrange. However, this was not the case with L4T 32.4.2 as the ISP digital gain worked properly before.

It looks like the current version of CameraDevice.h ICameraProperties does not match the CameraDevice.h source file from nvidia-l4t-jetson-multimedia-api_32.4.3-20200625213407_arm64.deb. Also it looks like the Jetson Linux Multimedia API for ICameraProperties changed recentely:


In an experiment I added some new virtual methods to the CameraDevice.h to make it more like the 32.4.3 documentation on the web and I was able to get ICameraProperties::getIspDigitalGainRange() to return 1.0 to 256.0 as the proper range. So I’m certain that whatever the underlying argus libraries that are part of the 32.4.3 release does not match the source header files and associated data in the jetson-multimedia-api_32.4.3-20200625213407_arm64.deb that gets installed/extracted as part of the Multimedia install in the SDK.

Perhaps there is something wrong with the Dispatcher source code. Did something change in the underlying APIs and the Multimedia sources failed to get updated properly for L4T 32.4.3?

Are you able to reproduce my issue?

hello JDSchroeder,

we can reproduce the issue, this only happened with user compile argus_camera application from the release sources.
here should be mismatch between default image and public release sources, we’re still looking into it.
thanks

hello JDSchroeder,

please having below header file “CameraDevice.h” and “Settings.h” updates, then recompile argus_camera application.
we had confirm with r32.4.3; that argus_camera works with below modification.
for example,

diff --git a/include/Argus/CameraDevice.h b/include/Argus/CameraDevice.h
index 27d8a12..26506bd 100644
--- a/include/Argus/CameraDevice.h
+++ b/include/Argus/CameraDevice.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016-2019, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2016-2020, NVIDIA CORPORATION. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -85,6 +85,13 @@ public:
     virtual uint32_t getMaxAeRegions() const = 0;

     /**
+     * Returns the minimum size of resultant region required by AE.
+     *
+     * @see IAutoControlSettings::setAeRegions()
+     */
+    virtual Size2D<uint32_t> getMinAeRegionSize() const = 0;
+
+    /**
diff --git a/include/Argus/Settings.h b/include/Argus/Settings.h
index 8570ad4..01645f0 100644
--- a/include/Argus/Settings.h
+++ b/include/Argus/Settings.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016-2019, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2016-2020, NVIDIA CORPORATION. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -245,8 +245,11 @@ public:
     /**
      * Sets the AE regions of interest.
      * If no regions are specified, the entire image is the region of interest.
+     *
      * @param[in] regions The AE regions of interest.
      * The maximum number of regions is returned by @c ICameraProperties::getMaxAeRegions().
+     * The minimum supported size of resultatnt region is returned by
+     * @c ICameraProperties::getMinAeRegionSize().
1 Like

I was having the same issue as @JDSchroeder with the argus_camera app, and applying this patch to the headers has fixed it for me. Thanks, @JerryChang!

2 Likes

@JerryChang could you please provide the simplest instructions to

hello Murpheus,

please download the MMAPI through SDKManager, then you should found the readme file for the instructions.
i.e. /usr/src/jetson_multimedia_api/argus/README.TXT

please note that, this thread is tracking argus_camera causes the segmentation fault (SIGSEGV),
you may apply the changes in post #9 based-on r32.4.3 release sources.
thanks