recorder-tui : could not create NvMedia Image stream producer

Hello,
I am trying to record camera feed from 2 cameras - SEKONIX SF3324 and SF3325 on port “a” and port “c”.
Here is the rig file:

{
    "rig": {
        "sensors": [
            {
                "name": "camera:front:center:120fov",
                "nominalSensor2Rig": {
                    "quaternion": [
                        -0.502444,
                        0.507493,
                        -0.497444,
                        0.492494
                    ],
                    "t": [
                        1.749,
                        -0.1,
                        1.47
                    ]
                },
                "parameter": "camera-type=ar0231-rccb-bae-sf3324,csi-port=a,camera-count=1,camera-mask=0001,sibilingIndex=0,async-record=1,format=h264,output-format=yuv,fifo-size=30,file-buffer-size=4194304",
                "properties": {
                    "Model": "ftheta",
                    "bw-poly": "0.0 0.00102669443003833 3.77865596590254e-08 -2.1812513600894e-11 4.76916107246175e-14",
                    "cx": "960",
                    "cy": "604",
                    "height": "1208",
                    "width": "1920"
                },
                "protocol": "camera.gmsl",
                "sensor2Rig": {
                    "quaternion": [
                        -0.502444,
                        0.507493,
                        -0.497444,
                        0.492494
                    ],
                    "t": [
                        1.749,
                        -0.1,
                        1.47
                    ]
                }
            },
            {
                "name": "camera:front:center:60fov",
                "nominalSensor2Rig": {
                    "quaternion": [
                        -0.502444,
                        0.507493,
                        -0.497444,
                        0.492494
                    ],
                    "t": [
                        1.749,
                        -0.1,
                        1.47
                    ]
                },
                "parameter": "camera-type=ar0231-rccb-bae-sf3325,csi-port=c,camera-count=1,camera-mask=0001,sibilingIndex=0,async-record=1,format=h264,output-format=yuv,fifo-size=30,file-buffer-size=4194304",
                "properties": {
                    "Model": "ftheta",
                    "bw-poly": "0.0 0.000545421498827636 -1.6216719633103e-10 -4.64720492990289e-12 2.85224527762934e-16",
                    "cx": "960",
                    "cy": "604",
                    "height": "1208",
                    "width": "1920"
                },
                "protocol": "camera.gmsl",
                "sensor2Rig": {
                    "quaternion": [
                        -0.502444,
                        0.507493,
                        -0.497444,
                        0.492494
                    ],
                    "t": [
                        1.749,
                        -0.1,
                        1.47
                    ]
                }
            }
        ],
        "vehicle": {
            "valid": true,
            "value": {
                "COMMENT": "steeringCoefficient is not validated",
                "axlebaseFront": 1.582,
                "axlebaseRear": 1.575,
                "bumperFront": 0.912,
                "bumperRear": 1.109,
                "centerOfMassToRearAxle": 1.564,
                "frontCorneringStiffness": 30654.0,
                "height": 1.473,
                "inertia": 1780.8,
                "length": 4.872,
                "mass": 1779.4,
                "rearCorneringStiffness": 36407.0,
                "steeringCoefficient": 14.8,
                "wheelDiameter": 0.673,
                "wheelbase": 2.85,
                "width": 1.852,
                "widthWithMirrors": 2.121
            }
        }
    },
    "version": 2
}

Which fails when I try to run the recorder-tui with following error log:

/usr/local/driveworks/tools/capture/recorder-tui /home/nvidia/nervo/src/dw_sensors/src/rig/release_m.json/release_m.json

- Rig release_m.json
	Copying rigs and setup code...
	Platform setup...
ec
Recorder @ release_m: 
Last output: [11-2-2020 16:17:27] Initialize DriveWorks SDK v1.2.400

Press s<Enter> to start/stop. Press q<Enter> to quit.
ec
Recorder @ release_m: 
Last output: [11-2-2020 16:17:27] Release build with GNU 4.9.4 from v1.2.0-rc11-0-ga7f5475 against Vibrante PDK v5.0.10.3

Press s<Enter> to start/stop. Press q<Enter> to quit.
ec
Recorder @ release_m: 
Last output: [11-2-2020 16:17:27] Platform: Detected Drive PX2 - Tegra A

Press s<Enter> to start/stop. Press q<Enter> to quit.
ec
Recorder @ release_m: 
Last output: [11-2-2020 16:17:27] TimeSource: monotonic epoch time offset is 1581458222595682

Press s<Enter> to start/stop. Press q<Enter> to quit.
ec
Recorder @ release_m: 
Last output: [11-2-2020 16:17:27] TimeSource: PTP ioctl returned error. Synchronized time will not be available.

Press s<Enter> to start/stop. Press q<Enter> to quit.
ec
Recorder @ release_m: 
Last output: [11-2-2020 16:17:27] TimeSource: Could not detect valid PTP time source at 'eth0'. Fallback to CLOCK_MONOTONIC.

Press s<Enter> to start/stop. Press q<Enter> to quit.
ec
Recorder @ release_m: 
Last output: [11-2-2020 16:17:27] Platform: number of GPU devices detected 1

Press s<Enter> to start/stop. Press q<Enter> to quit.
ec
Recorder @ release_m: 
Last output: [11-2-2020 16:17:27] Platform: currently selected GPU device integrated ID 0

Press s<Enter> to start/stop. Press q<Enter> to quit.
ec
Recorder @ release_m: 
Last output: [11-2-2020 16:17:27] SDK: Resources mounted from /usr/local/driveworks-1.2/data/resources

Press s<Enter> to start/stop. Press q<Enter> to quit.
ec
Recorder @ release_m: 
Last output: [11-2-2020 16:17:27] SDK: Create NvMediaDevice

Press s<Enter> to start/stop. Press q<Enter> to quit.
ec
Recorder @ release_m: 
Last output: [11-2-2020 16:17:27] SDK: Create NvMediaIPPManager

Press s<Enter> to start/stop. Press q<Enter> to quit.
ec
Recorder @ release_m: 
Last output: [11-2-2020 16:17:27] egl::Display: found 2 EGL devices

Press s<Enter> to start/stop. Press q<Enter> to quit.
ec
Recorder @ release_m: 
Last output: [11-2-2020 16:17:27] egl::Display: use drm device: drm-nvdc

Press s<Enter> to start/stop. Press q<Enter> to quit.
ec
Recorder @ release_m: 
Last output: [11-2-2020 16:17:27] SensorFactory::createSensor() -> camera.gmsl, camera-type=ar0231-rccb-bae-sf3324,csi-port=a,camera-count=1,camera-mask=0001,sibilingIndex=0,async-record=1,format=h264,output-format=yuv,fifo-size=30,file-buffer-size=4194304

Press s<Enter> to start/stop. Press q<Enter> to quit.
ec
Recorder @ release_m: 
Last output: [11-2-2020 16:17:27] CameraGMSL: required FPS = 30, resolution = 1920x1208

Press s<Enter> to start/stop. Press q<Enter> to quit.
ec
Recorder @ release_m: 
Last output: [11-2-2020 16:17:27] StreamProducerNvMediaImage: could not create NvMedia Image stream producer!

Press s<Enter> to start/stop. Press q<Enter> to quit.
ec
Recorder @ release_m: 
Last output: [11-2-2020 16:17:27] SensorManager: DW_CANNOT_CREATE_OBJECT: could not create NvMedia Image stream producer

Press s<Enter> to start/stop. Press q<Enter> to quit.
ec
Recorder @ release_m: 
Last output: [11-2-2020 16:17:27] SensorManager: DW_CANNOT_CREATE_OBJECT: could not create NvMedia Image stream producer

Last error: Segmentation fault (core dumped)

Press s<Enter> to start/stop. Press q<Enter> to quit.
ec
Recorder @ release_m: 
Last output: Rig: release_m.json recorder-tui: started

Last error: Segmentation fault (core dumped)

Press s<Enter> to start/stop. Press q<Enter> to quit.
ec
Recorder @ release_m: 
Last output: Rig: release_m.json recorder-tui: started

Last error: Segmentation fault (core dumped)

Press s<Enter> to start/stop. Press q<Enter> to quit.
Error: one of the recorders abruptly exited!
WARNING: Forcibly exited. Some data might have been lost!
WARNING: Use q<Enter> to exit gracefully, next time.

Here is output of blkid which shows that 1TB USB SSD is ext4

/dev/sdb1: LABEL="DrivePX_Data" UUID="9ac31bee-4926-482a-9c76-9dd74ba21e52" TYPE="ext4" PARTUUID="ff110a32-01"

nvcc --version:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sun_Apr__1_21:15:38_CDT_2018
Cuda compilation tools, release 9.2, V9.2.78

Also tried “export CUDA_VISIBLE_DEVICES=0” and checked output of ./deviceQuery after “export CUDA_VISIBLE_DEVICES=0,1”

./deviceQuery Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 2 CUDA Capable device(s)

Device 0: "DRIVE PX 2 AutoChauffeur"
  CUDA Driver Version / Runtime Version          9.2 / 9.2
  CUDA Capability Major/Minor version number:    6.1
  Total amount of global memory:                 3840 MBytes (4026466304 bytes)
  ( 9) Multiprocessors, (128) CUDA Cores/MP:     1152 CUDA Cores
  GPU Max Clock rate:                            1290 MHz (1.29 GHz)
  Memory Clock rate:                             3003 Mhz
  Memory Bus Width:                              128-bit
  L2 Cache Size:                                 1048576 bytes
  Maximum Texture Dimension Size (x,y,z)         1D=(131072), 2D=(131072, 65536), 3D=(16384, 16384, 16384)
  Maximum Layered 1D Texture Size, (num) layers  1D=(32768), 2048 layers
  Maximum Layered 2D Texture Size, (num) layers  2D=(32768, 32768), 2048 layers
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       49152 bytes
  Total number of registers available per block: 65536
  Warp size:                                     32
  Maximum number of threads per multiprocessor:  2048
  Maximum number of threads per block:           1024
  Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
  Max dimension size of a grid size    (x,y,z): (2147483647, 65535, 65535)
  Maximum memory pitch:                          2147483647 bytes
  Texture alignment:                             512 bytes
  Concurrent copy and kernel execution:          Yes with 2 copy engine(s)
  Run time limit on kernels:                     No
  Integrated GPU sharing Host Memory:            No
  Support host page-locked memory mapping:       Yes
  Alignment requirement for Surfaces:            Yes
  Device has ECC support:                        Disabled
  Device supports Unified Addressing (UVA):      Yes
  Device supports Compute Preemption:            Yes
  Supports Cooperative Kernel Launch:            Yes
  Supports MultiDevice Co-op Kernel Launch:      Yes
  Device PCI Domain ID / Bus ID / location ID:   0 / 4 / 0
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

Device 1: "NVIDIA Tegra X2"
  CUDA Driver Version / Runtime Version          9.2 / 9.2
  CUDA Capability Major/Minor version number:    6.2
  Total amount of global memory:                 6402 MBytes (6712545280 bytes)
  ( 2) Multiprocessors, (128) CUDA Cores/MP:     256 CUDA Cores
  GPU Max Clock rate:                            1275 MHz (1.27 GHz)
  Memory Clock rate:                             1600 Mhz
  Memory Bus Width:                              128-bit
  L2 Cache Size:                                 524288 bytes
  Maximum Texture Dimension Size (x,y,z)         1D=(131072), 2D=(131072, 65536), 3D=(16384, 16384, 16384)
  Maximum Layered 1D Texture Size, (num) layers  1D=(32768), 2048 layers
  Maximum Layered 2D Texture Size, (num) layers  2D=(32768, 32768), 2048 layers
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       49152 bytes
  Total number of registers available per block: 32768
  Warp size:                                     32
  Maximum number of threads per multiprocessor:  2048
  Maximum number of threads per block:           1024
  Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
  Max dimension size of a grid size    (x,y,z): (2147483647, 65535, 65535)
  Maximum memory pitch:                          2147483647 bytes
  Texture alignment:                             512 bytes
  Concurrent copy and kernel execution:          Yes with 1 copy engine(s)
  Run time limit on kernels:                     No
  Integrated GPU sharing Host Memory:            Yes
  Support host page-locked memory mapping:       Yes
  Alignment requirement for Surfaces:            Yes
  Device has ECC support:                        Disabled
  Device supports Unified Addressing (UVA):      Yes
  Device supports Compute Preemption:            Yes
  Supports Cooperative Kernel Launch:            Yes
  Supports MultiDevice Co-op Kernel Launch:      Yes
  Device PCI Domain ID / Bus ID / location ID:   0 / 0 / 0
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >
> Peer access from DRIVE PX 2 AutoChauffeur (GPU0) -> NVIDIA Tegra X2 (GPU1) : No
> Peer access from NVIDIA Tegra X2 (GPU1) -> DRIVE PX 2 AutoChauffeur (GPU0) : No

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 9.2, CUDA Runtime Version = 9.2, NumDevs = 2
Result = PASS

Please help

Dear atul.ahirrao,
Did you verify running sample_camera_gsml with the flags you mentioned in rig file to confirm if setup is correct?

Hello SivaRamaKrishna,

I tried using same flag for sample_camera_gmsl and it ran successfully.

Moreover, I ran “recorder” tool and it works just fine with the same rig file

Dear atul.ahirrao,
I could see same error reported in https://devtalk.nvidia.com/default/topic/1055877/driveworks/recorder-tui-error/post/5355150. Please follow the resolutions provided in the thread.

Dear SivaRamaKrishna,

I tried everything in that thread before posting this as new question and again tried everything but all my environment variables are similar:

echo $CUDA_VISIBLE_DEVICES 
0
$ echo $PATH
/usr/local/cuda-9.2/bin:/usr/local/cuda-9.2/NsightCompute-2019.1:/opt/ros/kinetic/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
$ echo $LD_LIBRARY_PATH 
/opt/ros/kinetic/lib:/opt/ros/kinetic/lib/aarch64-linux-gnu:/usr/lib:/usr/lib/aarch64-linux-gnu:/usr/local/cuda-9.2/lib64:/usr/local/cuda/targets/aarch64-linux/lib

But the error of “could not create NvMedia Image stream producer” persist when the same rig file works perfectly for “recorder” :

nvidia@tegra-ubuntu:/media/nvidia/DrivePX_Data/test1$ /usr/local/driveworks/tools/capture/recorder /home/nvidia/nervo/src/dw_sensors/src/rig/release_m.json 
[13-2-2020 14:0:42] Initialize DriveWorks SDK v1.2.400
[13-2-2020 14:0:42] Release build with GNU 4.9.4 from v1.2.0-rc11-0-ga7f5475 against Vibrante PDK v5.0.10.3
[13-2-2020 14:0:42] Platform: Detected Drive PX2 - Tegra A
[13-2-2020 14:0:42] TimeSource: monotonic epoch time offset is 1581619364199542
[13-2-2020 14:0:42] TimeSource: PTP ioctl returned error. Synchronized time will not be available.
[13-2-2020 14:0:42] TimeSource: Could not detect valid PTP time source at 'eth0'. Fallback to CLOCK_MONOTONIC.
[13-2-2020 14:0:42] Platform: number of GPU devices detected 2
[13-2-2020 14:0:42] Platform: currently selected GPU device discrete ID 0
[13-2-2020 14:0:42] SDK: Resources mounted from /usr/local/driveworks-1.2/data/resources
[13-2-2020 14:0:42] SDK: Create NvMediaDevice
[13-2-2020 14:0:42] SDK: Create NvMediaIPPManager
[13-2-2020 14:0:42] egl::Display: found 2 EGL devices
[13-2-2020 14:0:42] egl::Display: use drm device: drm-nvdc
[13-2-2020 14:0:42] SensorFactory::createSensor() -> camera.gmsl, camera-type=ar0231-rccb-bae-sf3324,csi-port=a,camera-count=1,camera-mask=0001,sibilingIndex=0,async-record=1,format=h264,output-format=yuv,fifo-size=30,serializer-bitrate=8000000
[13-2-2020 14:0:42] CameraGMSL: required FPS = 30, resolution = 1920x1208
***** aurix state *****
 CAM_PWR_ON: 0x0
 TEGRA_GMSL: TEGRA B
 TEGRA_FPDL: TEGRA B
 TEGRA_A_HDMI: MXM
 TEGRA_B_HDMI: MXM
 TEGRA_PCI: TEGRA B
 FAN_STATE: UNKNOWN
***********************
***** aurix state *****
 CAM_PWR_ON: 0x1
 TEGRA_GMSL: UNKNOWN
 TEGRA_FPDL: UNKNOWN
 TEGRA_A_HDMI: UNKNOWN
 TEGRA_B_HDMI: UNKNOWN
 TEGRA_PCI: UNKNOWN
 FAN_STATE: UNKNOWN
***********************
Sensor AR0231 RCCB Rev7 detected!
[13-2-2020 14:0:43] CameraGMSL: default IPP event callback function set
[13-2-2020 14:0:43] SensorFactory::createSensor() -> camera.gmsl, camera-type=ar0231-rccb-bae-sf3325,csi-port=c,camera-count=1,camera-mask=0001,sibilingIndex=0,async-record=1,format=h264,output-format=yuv,fifo-size=30,serializer-bitrate=8000000
[13-2-2020 14:0:43] CameraGMSL: required FPS = 30, resolution = 1920x1208
***** aurix state *****
 CAM_PWR_ON: 0x1
 TEGRA_GMSL: TEGRA B
 TEGRA_FPDL: TEGRA B
 TEGRA_A_HDMI: MXM
 TEGRA_B_HDMI: MXM
 TEGRA_PCI: TEGRA B
 FAN_STATE: UNKNOWN
***********************
***** aurix state *****
 CAM_PWR_ON: 0x3
 TEGRA_GMSL: UNKNOWN
 TEGRA_FPDL: UNKNOWN
 TEGRA_A_HDMI: UNKNOWN
 TEGRA_B_HDMI: UNKNOWN
 TEGRA_PCI: UNKNOWN
 FAN_STATE: UNKNOWN
***********************
Sensor AR0231 RCCB Rev7 detected!
[13-2-2020 14:0:43] CameraGMSL: default IPP event callback function set
Rig: release_m.json NewSink: /dev/null
[13-2-2020 14:0:43] SensorManager: started
Press s<Enter> to start, just <Enter> to see progress, q<Enter> to quit.
s
Rig: release_m.json NewSink: .
Rig: release_m.json Sensor: camera:front:center:120fov Bytes: 165338
Rig: release_m.json Sensor: camera:front:center:60fov Bytes: 231486
Rig: release_m.json EndOfSensorsInfo
s
Rig: release_m.json NewSink: .
Rig: release_m.json Sensor: camera:front:center:120fov Bytes: 714866
Rig: release_m.json Sensor: camera:front:center:60fov Bytes: 244135
Rig: release_m.json EndOfSensorsInfo
q
[13-2-2020 14:0:52] Sensor statistics for: camera.gmsl, camera-type=ar0231-rccb-bae-sf3325,csi-port=c,camera-count=1,camera-mask=0001,sibilingIndex=0,async-record=1,format=h264,output-format=yuv,fifo-size=30,serializer-bitrate=8000000
[13-2-2020 14:0:52] Events: 492
Errors: 0
Drops: 0
minDelta: 33294.0000000
maxDelta: 33358.0000000
meanDelta: 33332.203125
Standard deviation: 12.245698
[13-2-2020 14:0:52] Sensor statistics for: camera.gmsl, camera-type=ar0231-rccb-bae-sf3324,csi-port=a,camera-count=1,camera-mask=0001,sibilingIndex=0,async-record=1,format=h264,output-format=yuv,fifo-size=30,serializer-bitrate=8000000
[13-2-2020 14:0:52] Events: 0
Errors: 0
Drops: 0
minDelta: 33277.0000000
maxDelta: 33382.0000000
meanDelta: 33332.351563
Standard deviation: 12.131781
[13-2-2020 14:0:52] SensorManager: stopped
***** aurix state *****
 CAM_PWR_ON: 0x2
 TEGRA_GMSL: UNKNOWN
 TEGRA_FPDL: UNKNOWN
 TEGRA_A_HDMI: UNKNOWN
 TEGRA_B_HDMI: UNKNOWN
 TEGRA_PCI: UNKNOWN
 FAN_STATE: UNKNOWN
***********************
***** aurix state *****
 CAM_PWR_ON: 0x0
 TEGRA_GMSL: UNKNOWN
 TEGRA_FPDL: UNKNOWN
 TEGRA_A_HDMI: UNKNOWN
 TEGRA_B_HDMI: UNKNOWN
 TEGRA_PCI: UNKNOWN
 FAN_STATE: UNKNOWN
***********************
[13-2-2020 14:0:53] SDK: Release NvMediaDevice
[13-2-2020 14:0:53] Driveworks SDK released
[13-2-2020 14:0:53] SDK: Release NvMedia2D
nvidia@tegra-ubuntu:/media/nvidia/DrivePX_Data/test1$ ls
camera:front:center:120fov.h264
camera:front:center:120fov.h264.timestamps
camera:front:center:60fov.h264
camera:front:center:60fov.h264.timestamps

Hello SivaRamaKrishna,

Any updates on this? Is there any way that someone will help me on this issue one-on-one sometime?

Thanks,
Atul

Dear atul.ahirrao,
Could you check flashing the board again?