[MMAPI] The program turns into a defunct process after running multiple times

Hello everyone:

I use a shell script to run the process, and in the process, call Mmapi to encode it.

while true
do 
    ./my_mmapi_app
done

I modify a configuration file, and let the program restart (the program received instructions after the execution of _exit(0), after the restart to read the configuration file, to achieve the role of parameter transfer), when the program restart many times, there will be errors, the program becomes defunct process can not work properly.

Does the _exit(0) system call not completely release the related resources?

Please take a look, thank you

dmesg Print as follows:
[ 1907.398585] adv7482 1-0070: Detected HDMI video signal
[ 1912.735253] adv7482 1-0070: Detected HDMI video signal
[ 1912.962682] hdmi recv dv timings: 1280 * 720; interlaced: 0; polarities: 3; pixelclock: 74250000;
[ 1912.968872] nvmap_alloc_handle: PID 20650: mmapp: WARNING: All NvMap Allocations must have a tag to identify the subsystem allocating memory.Please pass the tag to the API call NvRmMemHanldeAllocAttr() or relevant.
[ 1912.994868] ****k:0 crate 0 rate 48000
[ 1912.994870] Setting pll_a = 49152000 Hz clk_out = 24576000 Hz
[ 1913.026757] hdmi recv dv timings: hfrontporch: 110; hsync: 40; hbackporch: 220; vsync: 5; vbackporch: 20;
[ 1913.042939] hdmi recv dv timings: il_vfrontporch: 0; il_vsync: 0; il_vbackporch: 0
[ 1913.057095] adv7482_set_pad_format: run line: 1618
[ 1913.068500] adv7482_set_pad_format: run line: 1618
[ 1913.088006] adv7482_get_pad_format++ 1510: mf->code is 8207 mf->colorspace is 3 mf->width is 1280 mf->height is 720 mf->field is 1 interlace is 0
[ 1913.130635] adv7482 1-0070: Detected HDMI video signal
[ 1913.142996] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 0
[ 1918.499587] adv7482 1-0070: Detected HDMI video signal
[ 1918.726215] hdmi recv dv timings: 1280 * 720; interlaced: 0; polarities: 3; pixelclock: 74250000;
[ 1918.731226] nvmap_alloc_handle: PID 20711: mmapp: WARNING: All NvMap Allocations must have a tag to identify the subsystem allocating memory.Please pass the tag to the API call NvRmMemHanldeAllocAttr() or relevant.
[ 1918.766494] ****k:0 crate 0 rate 48000
[ 1918.766497] Setting pll_a = 49152000 Hz clk_out = 24576000 Hz
[ 1918.790436] hdmi recv dv timings: hfrontporch: 110; hsync: 40; hbackporch: 220; vsync: 5; vbackporch: 20;
[ 1918.807165] hdmi recv dv timings: il_vfrontporch: 0; il_vsync: 0; il_vbackporch: 0
[ 1918.821804] adv7482_set_pad_format: run line: 1618
[ 1918.833635] adv7482_set_pad_format: run line: 1618
[ 1918.854204] video4linux video1: frame start syncpt timeout!0, 30
[ 1918.854220] adv7482_get_pad_format++ 1510: mf->code is 8207 mf->colorspace is 3 mf->width is 1280 mf->height is 720 mf->field is 1 interlace is 0
[ 1918.894954] adv7482 1-0070: Detected HDMI video signal
[ 1919.006249] video4linux video1: frame start syncpt timeout!0, 30
[ 1929.058921] host1x 50000000.host1x: cdma_handle_timeout: timeout: 9 (544c0000.nvenc_mmapp_0) client 2937, HW thresh 44656, done 44654
[ 1929.130745] ---- mlocks ----
[ 1929.138818] gk20a 57000000.gpu: gk20a_channel_timeout_handler: Job on channel 504 timed out

[ 1929.157440] ---- syncpts ----
[ 1929.157528] ---- mlocks ----

[ 1929.157538] ---- syncpts ----
[ 1929.157543] id 1 (disp0_a) min 1 max 1 refs 1 (previous client : )
[ 1929.157545] id 2 (disp0_b) min 1 max 1 refs 1 (previous client : )
[ 1929.157548] id 3 (disp0_c) min 1 max 1 refs 1 (previous client : )
[ 1929.157550] id 4 (disp0_d) min 1 max 1 refs 1 (previous client : )
[ 1929.157552] id 5 (dsi) min 2 max 0 refs 1 (previous client : )
[ 1929.157557] id 9 (544c0000.nvenc_mmapp_0) min 44656 max 44654 refs 2 (previous client : vi)
[ 1929.157560] id 11 (vi) min 5000 max 5000 refs 1 (previous client : vi)
[ 1929.157563] id 12 (vi) min 39208 max 39208 refs 1 (previous client : 544c0000.nvenc_mmapp_0)
[ 1929.157566] id 13 (544c0000.nvenc_mmapp_0) min 61989 max 61989 refs 1 (previous client : 544c0000.nvenc_mmapp_0)
[ 1929.157569] id 14 (57000000.gpu_504) min 452345 max 452345 refs 1 (previous client : 57000000.gpu_504)
[ 1929.157572] id 15 (57000000.gpu_506) min 51296 max 51296 refs 1 (previous client : 57000000.gpu_506)
[ 1929.157576] id 16 (57000000.gpu_505) min 654 max 654 refs 1 (previous client : 57000000.gpu_505)
[ 1929.157578] id 17 (57000000.gpu_507) min 654 max 654 refs 1 (previous client : 57000000.gpu_507)
[ 1929.157581] id 18 (57000000.gpu_503) min 682 max 682 refs 1 (previous client : 57000000.gpu_503)
[ 1929.157584] id 19 (57000000.gpu_502) min 3139 max 3139 refs 1 (previous client : 57000000.gpu_502)
[ 1929.157586] id 20 (vi) min 41664 max 41664 refs 1 (previous client : vi)
[ 1929.157589] id 21 (54340000.vic_mmapp_0) min 254573 max 254573 refs 1 (previous client : 54340000.vic_mmapp_0)
[ 1929.157592] id 22 (54340000.vic_mmapp_0) min 129225 max 129225 refs 1 (previous client : 54340000.vic_mmapp_0)
[ 1929.157595] id 23 (54340000.vic_mmapp_0) min 126906 max 126906 refs 2 (previous client : 54340000.vic_mmapp_0)
[ 1929.157599] id 26 (vblank0) min 115681 max 0 refs 1 (previous client : )

[ 1929.157698] ---- channels ----
[ 1929.157700] unable to lock channel list
[ 1929.157701] unable to lock channel list
[ 1929.157702] unable to lock channel list
[ 1929.157703] unable to lock channel list
[ 1929.157704] unable to lock channel list
[ 1929.157705] unable to lock channel list
[ 1929.157706] unable to lock channel list
[ 1929.157707] unable to lock channel list
[ 1929.157708] unable to lock channel list
[ 1929.157709]
---- host general irq ----

[ 1929.157711] sync_hintmask_ext = 0xc0000000
[ 1929.157712] sync_hintmask = 0x80002000
[ 1929.157714] sync_intc0mask = 0x00000001
[ 1929.157716] sync_intmask = 0x00000011
[ 1929.157717]
---- host syncpt irq mask ----

[ 1929.157719] syncpt_thresh_int_mask(0) = 0x00000001
[ 1929.157720] syncpt_thresh_int_mask(1) = 0x00000000
[ 1929.157722] syncpt_thresh_int_mask(2) = 0x00000000
[ 1929.157723] syncpt_thresh_int_mask(3) = 0x00000000
[ 1929.157725] syncpt_thresh_int_mask(4) = 0x00000000
[ 1929.157726] syncpt_thresh_int_mask(5) = 0x00000000
[ 1929.157728] syncpt_thresh_int_mask(6) = 0x00000000
[ 1929.157729] syncpt_thresh_int_mask(7) = 0x00000000
[ 1929.157731] syncpt_thresh_int_mask(8) = 0x00000000
[ 1929.157733] syncpt_thresh_int_mask(9) = 0x00000000
[ 1929.157734] syncpt_thresh_int_mask(10) = 0x00000000
[ 1929.157736] syncpt_thresh_int_mask(11) = 0x00000000
[ 1929.157737]
---- host syncpt irq status ----

[ 1929.157738] syncpt_thresh_cpu0_int_status(0) = 0x00000000
[ 1929.157740] syncpt_thresh_cpu0_int_status(1) = 0x00000000
[ 1929.157742] syncpt_thresh_cpu0_int_status(2) = 0x00000000
[ 1929.157743] syncpt_thresh_cpu0_int_status(3) = 0x00000000
[ 1929.157745] syncpt_thresh_cpu0_int_status(4) = 0x00000000
[ 1929.157746] syncpt_thresh_cpu0_int_status(5) = 0x00000000
[ 1929.157747]
---- host syncpt thresh ----

[ 1929.157749] syncpt_int_thresh_thresh_0(0) = 1
[ 1929.157856] 57000000.gpu pbdma 0:
[ 1929.157857] id: 0 (tsg), next_id: 0 (tsg) chan status: invalid
[ 1929.157869] PUT: 0000001f100032b8 GET: 0000001f100032b8 FETCH: 0000043a HEADER: 60400000

[ 1929.157875] 57000000.gpu eng 0:
[ 1929.157875] id: 0 (tsg), next_id: 0 (tsg), ctx status: invalid

[ 1929.157880] 57000000.gpu eng 1:
[ 1929.157880] id: 2 (tsg), next_id: 2 (tsg), ctx status: valid

[ 1929.158004] 502-57000000.gpu, pid 20725, refs: 2:
[ 1929.158005] channel status: in use idle not busy
[ 1929.158009] RAMFC : TOP: 8000001f10540030 PUT: 0000001f10540030 GET: 0000001f10540030 FETCH: 0000001f10540030
HEADER: 60400000 COUNT: 80000000
SYNCPOINT 00000000 00001301 SEMAPHORE 00000000 00000000 00000000 00000000

[ 1929.158016] 503-57000000.gpu, pid 20725, refs: 2:
[ 1929.158016] channel status: in use idle not busy
[ 1929.158020] RAMFC : TOP: 8000001f10500018 PUT: 0000001f10500018 GET: 0000001f10500018 FETCH: 0000001f10500018
HEADER: 60400000 COUNT: 80000000
SYNCPOINT 00000000 00001201 SEMAPHORE 00000000 00000000 00000000 00000000

[ 1929.158026] 504-57000000.gpu, pid 20725, refs: 11:
[ 1929.158026] channel status: in use idle not busy
[ 1929.158030] RAMFC : TOP: 8000001f100032b8 PUT: 0000001f100032b8 GET: 0000001f100032b8 FETCH: 0000001f100032b8
HEADER: 60400000 COUNT: 80000000
SYNCPOINT 00000000 00000e01 SEMAPHORE 00000001 0000fb90 00000002 00001004

[ 1929.158035] 505-57000000.gpu, pid 20725, refs: 2:
[ 1929.158036] channel status: in use idle not busy
[ 1929.158039] RAMFC : TOP: 8000001f10280018 PUT: 0000001f10280018 GET: 0000001f10280018 FETCH: 0000001f10280018
HEADER: 60400000 COUNT: 80000000
SYNCPOINT 00000000 00001001 SEMAPHORE 00000000 00000000 00000000 00000000

[ 1929.158045] 506-57000000.gpu, pid 20725, refs: 2:
[ 1929.158045] channel status: in use idle not busy
[ 1929.158048] RAMFC : TOP: 8000001f10040018 PUT: 0000001f10040018 GET: 0000001f10040018 FETCH: 0000001f10040018
HEADER: 60400000 COUNT: 80000000
SYNCPOINT 00000000 00000f01 SEMAPHORE 00000000 00000000 00000000 00000000

[ 1929.158054] 507-57000000.gpu, pid 20725, refs: 2:
[ 1929.158054] channel status: in use idle not busy
[ 1929.158057] RAMFC : TOP: 8000001f102c0018 PUT: 0000001f102c0018 GET: 0000001f102c0018 FETCH: 0000001f102c0018
HEADER: 60400000 COUNT: 80000000
SYNCPOINT 00000000 00001101 SEMAPHORE 00000000 00000000 00000000 00000000

[ 1929.158063] 508-57000000.gpu, pid 861, refs: 2:
[ 1929.158063] channel status: in use idle not busy
[ 1929.158066] RAMFC : TOP: 0000000000000000 PUT: 0000000000000000 GET: 0000000000000000 FETCH: 0000000000000000
HEADER: 60400000 COUNT: 00000000
SYNCPOINT 00000000 00000000 SEMAPHORE 00000000 00000000 00000000 00000000

[ 1929.158072] 509-57000000.gpu, pid 861, refs: 2:
[ 1929.158072] channel status: in use idle not busy
[ 1929.158076] RAMFC : TOP: 0000000000000000 PUT: 0000000000000000 GET: 0000000000000000 FETCH: 0000000000000000
HEADER: 60400000 COUNT: 00000000
SYNCPOINT 00000000 00000000 SEMAPHORE 00000000 00000000 00000000 00000000

[ 1929.158081] 510-57000000.gpu, pid 861, refs: 2:
[ 1929.158081] channel status: in use idle not busy
[ 1929.158084] RAMFC : TOP: 0000000000000000 PUT: 0000000000000000 GET: 0000000000000000 FETCH: 0000000000000000
HEADER: 60400000 COUNT: 00000000
SYNCPOINT 00000000 00000000 SEMAPHORE 00000000 00000000 00000000 00000000

[ 1929.158090] 511-57000000.gpu, pid 861, refs: 2:
[ 1929.158090] channel status: in use idle not busy
[ 1929.158093] RAMFC : TOP: 0000000000000000 PUT: 0000000000000000 GET: 0000000000000000 FETCH: 0000000000000000
HEADER: 60400000 COUNT: 00000000
SYNCPOINT 00000000 00000000 SEMAPHORE 00000000 00000000 00000000 00000000

[ 1929.159238] NV_PGRAPH_STATUS: 0x400000
[ 1929.159241] NV_PGRAPH_STATUS1: 0x0
[ 1929.159244] NV_PGRAPH_STATUS2: 0x0
[ 1929.159247] NV_PGRAPH_ENGINE_STATUS: 0x0
[ 1929.159251] NV_PGRAPH_GRFIFO_STATUS : 0x1
[ 1929.159254] NV_PGRAPH_GRFIFO_CONTROL : 0x10001
[ 1929.159257] NV_PGRAPH_PRI_FECS_HOST_INT_STATUS : 0x0
[ 1929.159260] NV_PGRAPH_EXCEPTION : 0x0
[ 1929.159263] NV_PGRAPH_FECS_INTR : 0x0
[ 1929.159265] NV_PFIFO_ENGINE_STATUS(GR) : 0x10001000
[ 1929.159268] NV_PGRAPH_ACTIVITY0: 0x0
[ 1929.159271] NV_PGRAPH_ACTIVITY1: 0xc0000
[ 1929.159274] NV_PGRAPH_ACTIVITY2: 0x0
[ 1929.159277] NV_PGRAPH_ACTIVITY4: 0x0
[ 1929.159280] NV_PGRAPH_PRI_SKED_ACTIVITY: 0x0
[ 1929.159284] NV_PGRAPH_PRI_GPC0_GPCCS_GPC_ACTIVITY0: 0x0
[ 1929.159287] NV_PGRAPH_PRI_GPC0_GPCCS_GPC_ACTIVITY1: 0x0
[ 1929.159291] NV_PGRAPH_PRI_GPC0_GPCCS_GPC_ACTIVITY2: 0x0
[ 1929.159294] NV_PGRAPH_PRI_GPC0_GPCCS_GPC_ACTIVITY3: 0x0
[ 1929.159298] NV_PGRAPH_PRI_GPC0_TPC0_TPCCS_TPC_ACTIVITY0: 0x0
[ 1929.159302] NV_PGRAPH_PRI_GPC0_TPC1_TPCCS_TPC_ACTIVITY0: 0x0
[ 1929.159306] NV_PGRAPH_PRI_GPC0_TPCS_TPCCS_TPC_ACTIVITY0: 0x0
[ 1929.159309] NV_PGRAPH_PRI_GPCS_GPCCS_GPC_ACTIVITY0: 0x0
[ 1929.159313] NV_PGRAPH_PRI_GPCS_GPCCS_GPC_ACTIVITY1: 0x0
[ 1929.159316] NV_PGRAPH_PRI_GPCS_GPCCS_GPC_ACTIVITY2: 0x0
[ 1929.159319] NV_PGRAPH_PRI_GPCS_GPCCS_GPC_ACTIVITY3: 0x0
[ 1929.159323] NV_PGRAPH_PRI_GPCS_TPC0_TPCCS_TPC_ACTIVITY0: 0x0
[ 1929.159327] NV_PGRAPH_PRI_GPCS_TPC1_TPCCS_TPC_ACTIVITY0: 0x0
[ 1929.159331] NV_PGRAPH_PRI_GPCS_TPCS_TPCCS_TPC_ACTIVITY0: 0x0
[ 1929.159336] NV_PGRAPH_PRI_BE0_BECS_BE_ACTIVITY0: 0x0
[ 1929.159339] NV_PGRAPH_PRI_BE1_BECS_BE_ACTIVITY0: 0x0
[ 1929.159342] NV_PGRAPH_PRI_BES_BECS_BE_ACTIVITY0: 0x0
[ 1929.159347] NV_PGRAPH_PRI_DS_MPIPE_STATUS: 0x0
[ 1929.159350] NV_PGRAPH_PRI_FE_GO_IDLE_ON_STATUS: 0x2e
[ 1929.159353] NV_PGRAPH_PRI_FE_GO_IDLE_TIMEOUT : 0x400
[ 1929.159356] NV_PGRAPH_PRI_FE_GO_IDLE_CHECK : 0x200
[ 1929.159360] NV_PGRAPH_PRI_FE_GO_IDLE_INFO : 0x33000700
[ 1929.159364] NV_PGRAPH_PRI_GPC0_TPC0_TEX_M_TEX_SUBUNITS_STATUS: 0x0
[ 1929.159368] NV_PGRAPH_PRI_CWD_FS: 0x0
[ 1929.159371] NV_PGRAPH_PRI_FE_TPC_FS: 0x0
[ 1929.159374] NV_PGRAPH_PRI_CWD_GPC_TPC_ID(0): 0x0
[ 1929.159377] NV_PGRAPH_PRI_CWD_SM_ID(0): 0x0
[ 1929.159380] NV_PGRAPH_PRI_FECS_CTXSW_STATUS_FE_0: 0x80000
[ 1929.159383] NV_PGRAPH_PRI_FECS_CTXSW_STATUS_1: 0x300
[ 1929.159386] NV_PGRAPH_PRI_GPC0_GPCCS_CTXSW_STATUS_GPC_0: 0x0
[ 1929.159390] NV_PGRAPH_PRI_GPC0_GPCCS_CTXSW_STATUS_1: 0x302
[ 1929.159394] NV_PGRAPH_PRI_FECS_CTXSW_IDLESTATE : 0xf
[ 1929.159398] NV_PGRAPH_PRI_GPC0_GPCCS_CTXSW_IDLESTATE : 0xf
[ 1929.159402] NV_PGRAPH_PRI_FECS_CURRENT_CTX : 0x161232
[ 1929.159405] NV_PGRAPH_PRI_FECS_NEW_CTX : 0x161232
[ 1929.159409] NV_PGRAPH_PRI_BE0_CROP_STATUS1 : 0x0
[ 1929.159413] NV_PGRAPH_PRI_BES_CROP_STATUS1 : 0x0
[ 1929.159417] NV_PGRAPH_PRI_BE0_ZROP_STATUS : 0x0
[ 1929.159420] NV_PGRAPH_PRI_BE0_ZROP_STATUS2 : 0x0
[ 1929.159424] NV_PGRAPH_PRI_BES_ZROP_STATUS : 0x0
[ 1929.159428] NV_PGRAPH_PRI_BES_ZROP_STATUS2 : 0x0
[ 1929.159431] NV_PGRAPH_PRI_BE0_BECS_BE_EXCEPTION: 0x0
[ 1929.159434] NV_PGRAPH_PRI_BE0_BECS_BE_EXCEPTION_EN: 0x0
[ 1929.159439] NV_PGRAPH_PRI_GPC0_GPCCS_GPC_EXCEPTION: 0x0
[ 1929.159442] NV_PGRAPH_PRI_GPC0_GPCCS_GPC_EXCEPTION_EN: 0x30000
[ 1929.159446] NV_PGRAPH_PRI_GPC0_TPC0_TPCCS_TPC_EXCEPTION: 0x0
[ 1929.159450] NV_PGRAPH_PRI_GPC0_TPC0_TPCCS_TPC_EXCEPTION_EN: 0x3
[ 1929.159468] gk20a 57000000.gpu: gk20a_set_error_notifier_locked: error notifier set to 8 for ch 504
[ 1929.159472] gk20a 57000000.gpu: gk20a_set_error_notifier_locked: error notifier set to 8 for ch 506
[ 1929.159475] gk20a 57000000.gpu: gk20a_set_error_notifier_locked: error notifier set to 8 for ch 505
[ 1929.159478] gk20a 57000000.gpu: gk20a_set_error_notifier_locked: error notifier set to 8 for ch 507
[ 1929.159568] gk20a 57000000.gpu: gk20a_fifo_set_ctx_mmu_error_tsg: TSG 0 generated a mmu fault
[ 1929.159574] ---- mlocks ----

[ 1929.159584] ---- syncpts ----
[ 1929.159588] id 1 (disp0_a) min 1 max 1 refs 1 (previous client : )
[ 1929.159591] id 2 (disp0_b) min 1 max 1 refs 1 (previous client : )
[ 1929.159593] id 3 (disp0_c) min 1 max 1 refs 1 (previous client : )
[ 1929.159595] id 4 (disp0_d) min 1 max 1 refs 1 (previous client : )
[ 1929.159597] id 5 (dsi) min 2 max 0 refs 1 (previous client : )
[ 1929.159602] id 9 (544c0000.nvenc_mmapp_0) min 44656 max 44654 refs 2 (previous client : vi)
[ 1929.159605] id 11 (vi) min 5000 max 5000 refs 1 (previous client : vi)
[ 1929.159608] id 12 (vi) min 39208 max 39208 refs 1 (previous client : 544c0000.nvenc_mmapp_0)
[ 1929.159610] id 13 (544c0000.nvenc_mmapp_0) min 61989 max 61989 refs 1 (previous client : 544c0000.nvenc_mmapp_0)
[ 1929.159613] id 14 (57000000.gpu_504) min 452345 max 452345 refs 1 (previous client : 57000000.gpu_504)
[ 1929.159616] id 15 (57000000.gpu_506) min 51296 max 51296 refs 1 (previous client : 57000000.gpu_506)
[ 1929.159618] id 16 (57000000.gpu_505) min 654 max 654 refs 1 (previous client : 57000000.gpu_505)
[ 1929.159621] id 17 (57000000.gpu_507) min 654 max 654 refs 1 (previous client : 57000000.gpu_507)
[ 1929.159623] id 18 (57000000.gpu_503) min 682 max 682 refs 1 (previous client : 57000000.gpu_503)
[ 1929.159626] id 19 (57000000.gpu_502) min 3139 max 3139 refs 1 (previous client : 57000000.gpu_502)
[ 1929.159628] id 20 (vi) min 41664 max 41664 refs 1 (previous client : vi)
[ 1929.159632] id 21 (54340000.vic_mmapp_0) min 254573 max 254573 refs 1 (previous client : 54340000.vic_mmapp_0)
[ 1929.159634] id 22 (54340000.vic_mmapp_0) min 129225 max 129225 refs 1 (previous client : 54340000.vic_mmapp_0)
[ 1929.159637] id 23 (54340000.vic_mmapp_0) min 126906 max 126906 refs 2 (previous client : 54340000.vic_mmapp_0)
[ 1929.159641] id 26 (vblank0) min 115681 max 0 refs 1 (previous client : )

[ 1929.159737] ---- channels ----
[ 1929.159739] unable to lock channel list
[ 1929.159740] unable to lock channel list
[ 1929.159740] unable to lock channel list
[ 1929.159741] unable to lock channel list
[ 1929.159742] unable to lock channel list
[ 1929.159743] unable to lock channel list
[ 1929.159744] unable to lock channel list
[ 1929.159745] unable to lock channel list
[ 1929.159746] unable to lock channel list
[ 1929.159746]
---- host general irq ----

[ 1929.159748] sync_hintmask_ext = 0xc0000000
[ 1929.159750] sync_hintmask = 0x80002000
[ 1929.159751] sync_intc0mask = 0x00000001
[ 1929.159753] sync_intmask = 0x00000011
[ 1929.159753]
---- host syncpt irq mask ----

[ 1929.159755] syncpt_thresh_int_mask(0) = 0x00000001
[ 1929.159757] syncpt_thresh_int_mask(1) = 0x00000000
[ 1929.159759] syncpt_thresh_int_mask(2) = 0x00000000
[ 1929.159760] syncpt_thresh_int_mask(3) = 0x00000000
[ 1929.159762] syncpt_thresh_int_mask(4) = 0x00000000
[ 1929.159763] syncpt_thresh_int_mask(5) = 0x00000000
[ 1929.159765] syncpt_thresh_int_mask(6) = 0x00000000
[ 1929.159766] syncpt_thresh_int_mask(7) = 0x00000000
[ 1929.159768] syncpt_thresh_int_mask(8) = 0x00000000
[ 1929.159769] syncpt_thresh_int_mask(9) = 0x00000000
[ 1929.159771] syncpt_thresh_int_mask(10) = 0x00000000
[ 1929.159772] syncpt_thresh_int_mask(11) = 0x00000000
[ 1929.159773]
---- host syncpt irq status ----

[ 1929.159775] syncpt_thresh_cpu0_int_status(0) = 0x00000000
[ 1929.159776] syncpt_thresh_cpu0_int_status(1) = 0x00000000
[ 1929.159778] syncpt_thresh_cpu0_int_status(2) = 0x00000000
[ 1929.159780] syncpt_thresh_cpu0_int_status(3) = 0x00000000
[ 1929.159781] syncpt_thresh_cpu0_int_status(4) = 0x00000000
[ 1929.159783] syncpt_thresh_cpu0_int_status(5) = 0x00000000
[ 1929.159784]
---- host syncpt thresh ----

[ 1929.159786] syncpt_int_thresh_thresh_0(0) = 1
[ 1929.159890] 57000000.gpu pbdma 0:
[ 1929.159890] id: 0 (tsg), next_id: 0 (tsg) chan status: invalid
[ 1929.159902] PUT: 0000001f100032b8 GET: 0000001f100032b8 FETCH: 0000043a HEADER: 60400000

[ 1929.159908] 57000000.gpu eng 0:
[ 1929.159908] id: 0 (tsg), next_id: 0 (tsg), ctx status: invalid

[ 1929.159913] 57000000.gpu eng 1:
[ 1929.159914] id: 2 (tsg), next_id: 2 (tsg), ctx status: valid

[ 1929.160019] 502-57000000.gpu, pid 20725, refs: 2:
[ 1929.160019] channel status: in use idle not busy
[ 1929.160023] RAMFC : TOP: 8000001f10540030 PUT: 0000001f10540030 GET: 0000001f10540030 FETCH: 0000001f10540030
HEADER: 60400000 COUNT: 80000000
SYNCPOINT 00000000 00001301 SEMAPHORE 00000000 00000000 00000000 00000000

[ 1929.160030] 503-57000000.gpu, pid 20725, refs: 2:
[ 1929.160030] channel status: in use idle not busy
[ 1929.160034] RAMFC : TOP: 8000001f10500018 PUT: 0000001f10500018 GET: 0000001f10500018 FETCH: 0000001f10500018
HEADER: 60400000 COUNT: 80000000
SYNCPOINT 00000000 00001201 SEMAPHORE 00000000 00000000 00000000 00000000

[ 1929.160040] 504-57000000.gpu, pid 20725, refs: 11:
[ 1929.160041] channel status: in use idle not busy
[ 1929.160044] RAMFC : TOP: 8000001f100032b8 PUT: 0000001f100032b8 GET: 0000001f100032b8 FETCH: 0000001f100032b8
HEADER: 60400000 COUNT: 80000000
SYNCPOINT 00000000 00000e01 SEMAPHORE 00000001 0000fb90 00000002 00001004

[ 1929.160050] 505-57000000.gpu, pid 20725, refs: 2:
[ 1929.160050] channel status: in use idle not busy
[ 1929.160054] RAMFC : TOP: 8000001f10280018 PUT: 0000001f10280018 GET: 0000001f10280018 FETCH: 0000001f10280018
HEADER: 60400000 COUNT: 80000000
SYNCPOINT 00000000 00001001 SEMAPHORE 00000000 00000000 00000000 00000000

[ 1929.160060] 506-57000000.gpu, pid 20725, refs: 2:
[ 1929.160060] channel status: in use idle not busy
[ 1929.160063] RAMFC : TOP: 8000001f10040018 PUT: 0000001f10040018 GET: 0000001f10040018 FETCH: 0000001f10040018
HEADER: 60400000 COUNT: 80000000
SYNCPOINT 00000000 00000f01 SEMAPHORE 00000000 00000000 00000000 00000000

[ 1929.160069] 507-57000000.gpu, pid 20725, refs: 2:
[ 1929.160069] channel status: in use idle not busy
[ 1929.160073] RAMFC : TOP: 8000001f102c0018 PUT: 0000001f102c0018 GET: 0000001f102c0018 FETCH: 0000001f102c0018
HEADER: 60400000 COUNT: 80000000
SYNCPOINT 00000000 00001101 SEMAPHORE 00000000 00000000 00000000 00000000

[ 1929.160078] 508-57000000.gpu, pid 861, refs: 2:
[ 1929.160078] channel status: in use idle not busy
[ 1929.160081] RAMFC : TOP: 0000000000000000 PUT: 0000000000000000 GET: 0000000000000000 FETCH: 0000000000000000
HEADER: 60400000 COUNT: 00000000
SYNCPOINT 00000000 00000000 SEMAPHORE 00000000 00000000 00000000 00000000

[ 1929.160087] 509-57000000.gpu, pid 861, refs: 2:
[ 1929.160087] channel status: in use idle not busy
[ 1929.160091] RAMFC : TOP: 0000000000000000 PUT: 0000000000000000 GET: 0000000000000000 FETCH: 0000000000000000
HEADER: 60400000 COUNT: 00000000
SYNCPOINT 00000000 00000000 SEMAPHORE 00000000 00000000 00000000 00000000

[ 1929.160096] 510-57000000.gpu, pid 861, refs: 2:
[ 1929.160096] channel status: in use idle not busy
[ 1929.160100] RAMFC : TOP: 0000000000000000 PUT: 0000000000000000 GET: 0000000000000000 FETCH: 0000000000000000
HEADER: 60400000 COUNT: 00000000
SYNCPOINT 00000000 00000000 SEMAPHORE 00000000 00000000 00000000 00000000

[ 1929.160105] 511-57000000.gpu, pid 861, refs: 2:
[ 1929.160105] channel status: in use idle not busy
[ 1929.160109] RAMFC : TOP: 0000000000000000 PUT: 0000000000000000 GET: 0000000000000000 FETCH: 0000000000000000
HEADER: 60400000 COUNT: 00000000
SYNCPOINT 00000000 00000000 SEMAPHORE 00000000 00000000 00000000 00000000

[ 1931.543647] id 1 (disp0_a) min 1 max 1 refs 1 (previous client : )
[ 1931.552390] id 2 (disp0_b) min 1 max 1 refs 1 (previous client : )
[ 1931.561153] id 3 (disp0_c) min 1 max 1 refs 1 (previous client : )
[ 1931.569877] id 4 (disp0_d) min 1 max 1 refs 1 (previous client : )
[ 1931.578578] id 5 (dsi) min 2 max 0 refs 1 (previous client : )
[ 1931.578584] id 9 (544c0000.nvenc_mmapp_0) min 44656 max 44654 refs 2 (previous client : vi)
[ 1931.578587] id 11 (vi) min 5000 max 5000 refs 1 (previous client : vi)
[ 1931.578590] id 12 (vi) min 39208 max 39208 refs 1 (previous client : 544c0000.nvenc_mmapp_0)
[ 1931.578593] id 13 (544c0000.nvenc_mmapp_0) min 61989 max 61989 refs 1 (previous client : 544c0000.nvenc_mmapp_0)
[ 1931.578596] id 14 (57000000.gpu_504) min 452345 max 452345 refs 1 (previous client : 57000000.gpu_504)
[ 1931.578599] id 15 (57000000.gpu_506) min 51296 max 51296 refs 1 (previous client : 57000000.gpu_506)
[ 1931.578602] id 16 (57000000.gpu_505) min 654 max 654 refs 1 (previous client : 57000000.gpu_505)
[ 1931.578605] id 17 (57000000.gpu_507) min 654 max 654 refs 1 (previous client : 57000000.gpu_507)
[ 1931.578607] id 18 (57000000.gpu_503) min 682 max 682 refs 1 (previous client : 57000000.gpu_503)
[ 1931.578610] id 19 (57000000.gpu_502) min 3139 max 3139 refs 1 (previous client : 57000000.gpu_502)
[ 1931.578613] id 20 (vi) min 41664 max 41664 refs 1 (previous client : vi)
[ 1931.578616] id 21 (54340000.vic_mmapp_0) min 254573 max 254573 refs 1 (previous client : 54340000.vic_mmapp_0)
[ 1931.578618] id 22 (54340000.vic_mmapp_0) min 129225 max 129225 refs 1 (previous client : 54340000.vic_mmapp_0)
[ 1931.578621] id 23 (54340000.vic_mmapp_0) min 126906 max 126906 refs 2 (previous client : 54340000.vic_mmapp_0)
[ 1931.578625] id 26 (vblank0) min 115826 max 0 refs 1 (previous client : )

[ 1931.578731] ---- channels ----
[ 1931.578732] unable to lock channel list
[ 1931.578734] unable to lock channel list
[ 1931.578735] unable to lock channel list
[ 1931.578735] unable to lock channel list
[ 1931.578736] unable to lock channel list
[ 1931.578737] unable to lock channel list
[ 1931.578739] unable to lock channel list
[ 1931.578740] unable to lock channel list
[ 1931.578741] unable to lock channel list
[ 1931.578742]
---- host general irq ----

[ 1931.578744] sync_hintmask_ext = 0xc0000000
[ 1931.578745] sync_hintmask = 0x80002000
[ 1931.578747] sync_intc0mask = 0x00000001
[ 1931.578749] sync_intmask = 0x00000011
[ 1931.578750]
---- host syncpt irq mask ----

[ 1931.578752] syncpt_thresh_int_mask(0) = 0x00000001
[ 1931.578764] syncpt_thresh_int_mask(1) = 0x00000000
[ 1931.578766] syncpt_thresh_int_mask(2) = 0x00000000
[ 1931.578768] syncpt_thresh_int_mask(3) = 0x00000000
[ 1931.578769] syncpt_thresh_int_mask(4) = 0x00000000
[ 1931.578771] syncpt_thresh_int_mask(5) = 0x00000000
[ 1931.578772] syncpt_thresh_int_mask(6) = 0x00000000
[ 1931.578774] syncpt_thresh_int_mask(7) = 0x00000000
[ 1931.578775] syncpt_thresh_int_mask(8) = 0x00000000
[ 1931.578777] syncpt_thresh_int_mask(9) = 0x00000000
[ 1931.578778] syncpt_thresh_int_mask(10) = 0x00000000
[ 1931.578780] syncpt_thresh_int_mask(11) = 0x00000000
[ 1931.578781]
---- host syncpt irq status ----

[ 1931.578783] syncpt_thresh_cpu0_int_status(0) = 0x00000000
[ 1931.578784] syncpt_thresh_cpu0_int_status(1) = 0x00000000
[ 1931.578786] syncpt_thresh_cpu0_int_status(2) = 0x00000000
[ 1931.578787] syncpt_thresh_cpu0_int_status(3) = 0x00000000
[ 1931.578789] syncpt_thresh_cpu0_int_status(4) = 0x00000000
[ 1931.578791] syncpt_thresh_cpu0_int_status(5) = 0x00000000
[ 1931.578792]
---- host syncpt thresh ----

[ 1931.578794] syncpt_int_thresh_thresh_0(0) = 1
[ 1931.578912] falcon 544c0000.nvenc: SYNCPT_ID 9
[ 1931.578914] falcon 544c0000.nvenc: SYNCPT_VAL 44654
[ 1931.578928] falcon 544c0000.nvenc: FIRST_GET 0xad0
[ 1931.578930] falcon 544c0000.nvenc: TIMEOUT 10000
[ 1931.578932] falcon 544c0000.nvenc: NUM_SLOTS 9
[ 1931.578934] falcon 544c0000.nvenc: NUM_HANDLES 10

Hi li lin,
Does it help if you sleep 1 second between each execution? Looks to be an issue doing close/open too fast.

Hi li_lin,

Have you tried the suggestion to add sleep 1 second between each execution?
Does it help? Any result can be shared?

Thanks

Sorry for a long time no reply, because my test is not long enough to determine whether the problem is completely resolved.

The approach I’m using now is to call _exit() in the main function in the process, sleep1 in the script, so far, there’s no case of a program becoming a defunct process.

Hi DaneLLL and kayccc,

You said:
> Looks to be an issue doing close/open too fast.

Is there any known issue when device is opened as soon as closed ?

My application need to change resolution depending on the network QoS.
When an event to change resolution occur (change bandwidth or loss ratio, etc.), will stop encoder/converter/decoder, re-initialize and re-start.
I think that “1 second” is too large interruption for a live streaming.

If any time need before re-initialization and re-starting after stopping, we have to know the specification or limitation.

Which is this “sleep 1 second between each execution” a specification, a limitation or an issue to be fixed?

Best Regards,

Hi mynaemi,
Please refer to Viranjan’s suggeston [url]https://devtalk.nvidia.com/default/topic/1032037/jetson-tx2/-mmapi-r28-1-r28-1-to-reduce-dpb-delay-of-nvvideodecoder/post/5255155/#5255155[/url]