jetson-utils icon indicating copy to clipboard operation
jetson-utils copied to clipboard

unable to run video-viewer more than once -causes low level system error and crashes

Open jwrl7 opened this issue 3 years ago • 0 comments

Using the latest master branch and running video-viewer with default arguments, I'm unable to start and stop video-viewer more than once. Any second attempt to launch the video-viewer results in a pretty low level system error - see below. Looks like there is some null pointer reference ?
```[ 352.870977] Unable to handle kernel NULL pointer dereference at virtual address 00000040``

I am able to take the raw gstreamer pipeline string that is created and run it manually from a command line and can start and stop the gstreamer pipeline without issues.

Here is the log output from dmesg when running video-viewer for the second time. I waited about 10 seconds before launching the application.

[  352.869243] ------------[ cut here ]------------
[  352.869474] WARNING: CPU: 3 PID: 6204 at /media/nvme-rh/redhawk-linux/nvgpu/drivers/gpu/nvgpu/common/mm/nvgpu_mem.c:236 nvgpu_mem_wr32+0x74/0x80 [nvgpu]
[  352.869520] Modules linked in: fuse zram overlay vtop rcim_emu rcim can_raw can uvcvideo ar0234 max9295 drm pwm_fan generic_pwm_tachometer tegra_oc_event spi_sc18is602 mttcan can_dev max96712 serdes binfmt_mi
sc nvgpu bluedroid_pm rfkill ip_tables x_tables hid_sensor_custom hid_sensor_hub ext4 jbd2 mbcache btrfs xor raid6_pq xhci_tegra igb eqos rtc_tegra xhci_hcd hwmon ptp pps_core

[  352.869530] CPU: 3 PID: 6204 Comm: SharpenStage Not tainted 4.9.201-rt134-r32.5.1-tegra-RedHawk-7.5.5-custom #1
[  352.869531] Hardware name: jetson-xavier (DT)
[  352.869533] task: ffffffc766735400 task.stack: ffffffc7d49fc000
[  352.869751] PC is at nvgpu_mem_wr32+0x74/0x80 [nvgpu]
[  352.869969] LR is at gk20a_fifo_setup_userd+0x98/0x1b0 [nvgpu]
[  352.869972] pc : [<ffffff8000e0dbe4>] lr : [<ffffff8000e307b0>] pstate: 60400145
[  352.869973] sp : ffffffc7d49ffc00
[  352.869976] x29: ffffffc7d49ffc00 x28: 0000000000000012
[  352.869979] x27: 0000000000000013 x26: 0000000000000014
[  352.869981] x25: 0000000000000016 x24: 0000000000000017
[  352.869984] x23: 0000000000000018 x22: 0000000000000022
[  352.869987] x21: 0000000000000023 x20: ffffff801225ea08
[  352.869989] x19: ffffff801225ea08 x18: 0000007fb7deca70
[  352.869991] x17: 0000007fb7d61530 x16: ffffff8008213fc0
[  352.869994] x15: ffffffbf1d6e3000 x14: 000000000000002d
[  352.869997] x13: 0000000000000001 x12: ffffff8000ecdeb8
[  352.869999] x11: 000000000000000b x10: 0101010101010101
[  352.870003] x9 : fffffffffffffffc x8 : ffffffc7c2e4b058
[  352.870006] x7 : 0000000000001000 x6 : 0000001f009a8000
[  352.870009] x5 : 0000000000000000 x4 : 0000000000000011
[  352.870011] x3 : 0000000000000001 x2 : 0000000000000010
[  352.870014] x1 : ffffff801225ea08 x0 : 0000000000000000

[  352.870016] ---[ end trace 0000000000000002 ]---
[  352.870017] Call trace:                                                                                                                                                                                [14/1202]
[  352.870233] [<ffffff8000e0dbe4>] nvgpu_mem_wr32+0x74/0x80 [nvgpu]
[  352.870454] [<ffffff8000e307b0>] gk20a_fifo_setup_userd+0x98/0x1b0 [nvgpu]
[  352.870670] [<ffffff8000e22cdc>] nvgpu_channel_setup_bind+0x2cc/0x6f8 [nvgpu]
[  352.870880] [<ffffff8000de6534>] gk20a_channel_ioctl+0x924/0xd98 [nvgpu]
[  352.870886] [<ffffff800821351c>] do_vfs_ioctl+0xb4/0xb58
[  352.870888] [<ffffff8008214038>] SyS_ioctl+0x78/0x98
[  352.870893] [<ffffff80080833dc>] __sys_trace_return+0x0/0x4
[  352.870977] Unable to handle kernel NULL pointer dereference at virtual address 00000040
[  352.871421] Mem abort info:
[  352.871448]   ESR = 0x96000046
[  352.871479]   Exception class = DABT (current EL), IL = 32 bits
[  352.871555]   SET = 0, FnV = 0
[  352.871586]   EA = 0, S1PTW = 0
[  352.871616] Data abort info:
[  352.871643]   ISV = 0, ISS = 0x00000046
[  352.871689]   CM = 0, WnR = 1
[  352.871720] user pgtable: 4k pages, 39-bit VAs, pgd = ffffffc7b7db4000
[  352.871801] [0000000000000040] *pgd=000000083639f003, *pud=000000083639f003, *pmd=0000000000000000
[  352.871939] Internal error: Oops: 96000046 [#1] PREEMPT SMP
[  352.871977] Modules linked in: fuse zram overlay vtop rcim_emu rcim can_raw can uvcvideo ar0234 max9295 drm pwm_fan generic_pwm_tachometer tegra_oc_event spi_sc18is602 mttcan can_dev max96712 serdes binfmt_mi
sc nvgpu bluedroid_pm rfkill ip_tables x_tables hid_sensor_custom hid_sensor_hub ext4 jbd2 mbcache btrfs xor raid6_pq xhci_tegra igb eqos rtc_tegra xhci_hcd hwmon ptp pps_core
[  352.871981] CPU: 3 PID: 6204 Comm: SharpenStage Tainted: G        W       4.9.201-rt134-r32.5.1-tegra-RedHawk-7.5.5-custom #1
[  352.871982] Hardware name: jetson-xavier (DT)
[  352.871984] task: ffffffc766735400 task.stack: ffffffc7d49fc000
[  352.872197] PC is at nvgpu_mem_wr32+0x44/0x80 [nvgpu]
[  352.872416] LR is at gk20a_fifo_setup_userd+0x98/0x1b0 [nvgpu]
[  352.872418] pc : [<ffffff8000e0dbb4>] lr : [<ffffff8000e307b0>] pstate: 60400145
[  352.872419] sp : ffffffc7d49ffc00
[  352.872422] x29: ffffffc7d49ffc00 x28: 0000000000000012
[  352.872424] x27: 0000000000000013 x26: 0000000000000014
[  352.872427] x25: 0000000000000016 x24: 0000000000000017
[  352.872429] x23: 0000000000000018 x22: 0000000000000022
[  352.872432] x21: 0000000000000023 x20: ffffff801225ea08
[  352.872434] x19: ffffff801225ea08 x18: 0000007fb7deca70
[  352.872437] x17: 0000007fb7d61530 x16: ffffff8008213fc0
[  352.872439] x15: ffffffbf1d6e3000 x14: 000000000000002d
[  352.872441] x13: 0000000000000001 x12: ffffff8000ecdeb8
[  352.872444] x11: 000000000000000b x10: 0101010101010101
[  352.872447] x9 : fffffffffffffffc x8 : ffffffc7c2e4b058
[  352.872449] x7 : 0000000000001000 x6 : 0000001f009a8000
[  352.872452] x5 : 0000000000000000 x4 : 0000000000000011
[  352.872454] x3 : 0000000000000001 x2 : 0000000000000010
[  352.872457] x1 : 0000000000000000 x0 : 0000000000000000

Here is the output from video-viewer on the second launch:

:~/new_jutils/jetson-utils/build$ ./aarch64/bin/video-viewer
[gstreamer] initialized gstreamer, version 1.14.5.0           
[gstreamer] gstCamera -- attempting to create device csi://0
[gstreamer] gstCamera pipeline string:                        
[gstreamer] nvarguscamerasrc sensor-id=0 ! video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=30/1, format=(string)NV12 ! nvvidconv flip-method=2 ! video/x-raw(memory:NVMM) ! appsink name=mysink                                                            
[gstreamer] gstCamera successfully created device csi://0
[video]  created gstCamera from csi://0                       
------------------------------------------------
gstCamera video options:
------------------------------------------------              
  -- URI: csi://0                           
     - protocol:  csi          
     - location:  0                                                        
  -- deviceType: csi
  -- ioType:     input                                                                                                
  -- codec:      raw
  -- width:      1280
  -- height:     720
  -- frameRate:  30.000000
  -- bitRate:    0
  -- numBuffers: 4
  -- zeroCopy:   true
  -- flipMethod: rotate-180
  -- loop:       0
  -- rtspLatency 2000
------------------------------------------------
[OpenGL] failed to open X11 server connection.
[OpenGL] failed to create X11 Window.
video-viewer:  failed to create output stream
[gstreamer] opening gstCamera for streaming, transitioning pipeline to GST_STATE_PLAYING
[gstreamer] gstreamer changed state from NULL to READY ==> mysink
[gstreamer] gstreamer changed state from NULL to READY ==> capsfilter1
[gstreamer] gstreamer changed state from NULL to READY ==> nvvconv0
[gstreamer] gstreamer changed state from NULL to READY ==> capsfilter0
[gstreamer] gstreamer changed state from NULL to READY ==> nvarguscamerasrc0
[gstreamer] gstreamer changed state from NULL to READY ==> pipeline0
[gstreamer] gstreamer changed state from READY to PAUSED ==> capsfilter1
[gstreamer] gstreamer changed state from READY to PAUSED ==> nvvconv0
[gstreamer] gstreamer changed state from READY to PAUSED ==> capsfilter0
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> nvarguscamerasrc0
[gstreamer] gstreamer changed state from READY to PAUSED ==> pipeline0
[gstreamer] gstreamer message new-clock ==> pipeline0
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> capsfilter1
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> nvvconv0
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> capsfilter0
[gstreamer] gstreamer stream status ENTER ==> src
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> nvarguscamerasrc0
[gstreamer] gstreamer message stream-start ==> pipeline0
GST_ARGUS: Creating output stream
[gstreamer] gstDecoder -- failed to retrieve next image buffer
video-viewer:  failed to capture video frame
[gstreamer] gstDecoder -- failed to retrieve next image buffer
video-viewer:  failed to capture video frame
[gstreamer] gstDecoder -- failed to retrieve next image buffer
video-viewer:  failed to capture video frame
[gstreamer] gstDecoder -- failed to retrieve next image buffer
video-viewer:  failed to capture video frame
[gstreamer] gstDecoder -- failed to retrieve next image buffer
video-viewer:  failed to capture video frame
^Creceived SIGINT
[gstreamer] gstDecoder -- failed to retrieve next image buffer
video-viewer:  failed to capture video frame
video-viewer:  shutting down...
[gstreamer] gstCamera -- stopping pipeline, transitioning to GST_STATE_NULL

(video-viewer:6146): GStreamer-CRITICAL **: 13:59:19.123: gst_mini_object_set_qdata: assertion 'object != NULL' failed
^Creceived SIGINT
^Creceived SIGINT
^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[B^[[B


jwrl7 avatar Jan 22 '22 22:01 jwrl7