[kernel] host1x: venc syncpoint stuck waiting, timeout=-1

Hello everyone:

My video capture/encoding app, goes wrong in the long time run and can’t continue encoding.
GDB debugging found that the video encode thread is blocking.

Please take a look at this question for me. thank you

Here is the print when the problem occurs:

[54242.826675] host1x 50000000.host1x: mmapp: syncpoint id 14 (544c0000.nvenc_mmapp_0) stuck waiting 1348047, timeout=-1
[54242.838866] ---- syncpts ----
[54242.842304] id 1 (disp0_a) min 1 max 1 refs 1 (previous client : )
[54242.842341] id 2 (disp0_b) min 1 max 1 refs 1 (previous client : )
[54242.842529] id 3 (disp0_c) min 1 max 1 refs 1 (previous client : )
[54242.842564] id 4 (disp0_d) min 1 max 1 refs 1 (previous client : )
[54242.842594] id 5 (dsi) min 2 max 0 refs 1 (previous client : )
[54242.842638] id 9 (vi) min 1348048 max 1348048 refs 1 (previous client : vi)
[54242.842679] id 12 (544c0000.nvenc_mmapp_0) min 1348035 max 1348036 refs 2 (previous client : )
[54242.842712] id 13 (vi) min 1348060 max 1348060 refs 1 (previous client : vi)
[54242.842747] id 14 (544c0000.nvenc_mmapp_0) min 1348046 max 1348047 refs 2 (previous client : )
[54242.842781] id 15 (57000000.gpu_507) min 5393254 max 5393254 refs 1 (previous client : )
[54242.842814] id 16 (57000000.gpu_506) min 2 max 2 refs 1 (previous client : )
[54242.842846] id 17 (57000000.gpu_505) min 2 max 2 refs 1 (previous client : )
[54242.842877] id 18 (57000000.gpu_504) min 2 max 2 refs 1 (previous client : )
[54242.842907] id 19 (57000000.gpu_503) min 2 max 2 refs 1 (previous client : )
[54242.842938] id 20 (57000000.gpu_502) min 4 max 4 refs 1 (previous client : )
[54242.842974] id 21 (54340000.vic_nv_conv-0_0) min 8088267 max 8088267 refs 1 (previous client : )
[54242.843006] id 22 (54340000.vic_mmapp_0) min 4044108 max 4044108 refs 1 (previous client : )
[54242.843039] id 23 (54340000.vic_mmapp_0) min 4044141 max 4044141 refs 1 (previous client : )
[54242.843076] id 26 (vblank0) min 3254502 max 0 refs 1 (previous client : )

[54242.862563] host1x 50000000.host1x: mmapp: syncpoint id 14 (544c0000.nvenc_mmapp_0) stuck waiting 1348047, timeout=-1
[54242.862577] ---- syncpts ----
[54242.862601] id 1 (disp0_a) min 1 max 1 refs 1 (previous client : )
[54242.862618] id 2 (disp0_b) min 1 max 1 refs 1 (previous client : )
[54242.862633] id 3 (disp0_c) min 1 max 1 refs 1 (previous client : )
[54242.862648] id 4 (disp0_d) min 1 max 1 refs 1 (previous client : )
[54242.862664] id 5 (dsi) min 2 max 0 refs 1 (previous client : )
[54242.862688] id 9 (vi) min 1348048 max 1348048 refs 1 (previous client : vi)
[54242.862711] id 12 (544c0000.nvenc_mmapp_0) min 1348035 max 1348036 refs 2 (previous client : )
[54242.862729] id 13 (vi) min 1348060 max 1348060 refs 1 (previous client : vi)
[54242.862748] id 14 (544c0000.nvenc_mmapp_0) min 1348046 max 1348047 refs 2 (previous client : )
[54242.862766] id 15 (57000000.gpu_507) min 5393254 max 5393254 refs 1 (previous client : )
[54242.862783] id 16 (57000000.gpu_506) min 2 max 2 refs 1 (previous client : )
[54242.862801] id 17 (57000000.gpu_505) min 2 max 2 refs 1 (previous client : )
[54242.862817] id 18 (57000000.gpu_504) min 2 max 2 refs 1 (previous client : )
[54242.862833] id 19 (57000000.gpu_503) min 2 max 2 refs 1 (previous client : )
[54242.862850] id 20 (57000000.gpu_502) min 4 max 4 refs 1 (previous client : )
[54242.862868] id 21 (54340000.vic_nv_conv-0_0) min 8088267 max 8088267 refs 1 (previous client : )
[54242.862887] id 22 (54340000.vic_mmapp_0) min 4044108 max 4044108 refs 1 (previous client : )
[54242.862905] id 23 (54340000.vic_mmapp_0) min 4044141 max 4044141 refs 1 (previous client : )
[54242.862925] id 26 (vblank0) min 3254503 max 0 refs 1 (previous client : )

[54242.864450] host1x 50000000.host1x: mmapp: syncpoint id 12 (544c0000.nvenc_mmapp_0) stuck waiting 1348036, timeout=-1
[54242.864455] ---- syncpts ----
[54242.864468] id 1 (disp0_a) min 1 max 1 refs 1 (previous client : )
[54242.864476] id 2 (disp0_b) min 1 max 1 refs 1 (previous client : )
[54242.864484] id 3 (disp0_c) min 1 max 1 refs 1 (previous client : )
[54242.864491] id 4 (disp0_d) min 1 max 1 refs 1 (previous client : )
[54242.864513] id 5 (dsi) min 2 max 0 refs 1 (previous client : )
[54242.864535] id 9 (vi) min 1348048 max 1348048 refs 1 (previous client : vi)
[54242.864546] id 12 (544c0000.nvenc_mmapp_0) min 1348035 max 1348036 refs 2 (previous client : )
[54242.864554] id 13 (vi) min 1348060 max 1348060 refs 1 (previous client : vi)
[54242.864562] id 14 (544c0000.nvenc_mmapp_0) min 1348046 max 1348047 refs 2 (previous client : )
[54242.864570] id 15 (57000000.gpu_507) min 5393254 max 5393254 refs 1 (previous client : )
[54242.864578] id 16 (57000000.gpu_506) min 2 max 2 refs 1 (previous client : )
[54242.864585] id 17 (57000000.gpu_505) min 2 max 2 refs 1 (previous client : )
[54242.864593] id 18 (57000000.gpu_504) min 2 max 2 refs 1 (previous client : )
[54242.864600] id 19 (57000000.gpu_503) min 2 max 2 refs 1 (previous client : )
[54242.864607] id 20 (57000000.gpu_502) min 4 max 4 refs 1 (previous client : )
[54242.864616] id 21 (54340000.vic_nv_conv-0_0) min 8088267 max 8088267 refs 1 (previous client : )
[54242.864624] id 22 (54340000.vic_mmapp_0) min 4044108 max 4044108 refs 1 (previous client : )
[54242.864632] id 23 (54340000.vic_mmapp_0) min 4044141 max 4044141 refs 1 (previous client : )
[54242.864642] id 26 (vblank0) min 3254503 max 0 refs 1 (previous client : )
[54246.851061] host1x 50000000.host1x: cdma_handle_timeout: timeout: 14 (544c0000.nvenc_mmapp_0) client 6, HW thresh 1348046, done 1348047
[54246.895219] ---- mlocks ----
[54246.914258] 5: locked by channel 1

[54246.937651] ---- syncpts ----
[54246.943526] id 1 (disp0_a) min 1 max 1 refs 1 (previous client : )
[54246.952619] id 2 (disp0_b) min 1 max 1 refs 1 (previous client : )
[54246.961633] id 3 (disp0_c) min 1 max 1 refs 1 (previous client : )
[54246.970609] id 4 (disp0_d) min 1 max 1 refs 1 (previous client : )
[54246.978716] id 5 (dsi) min 2 max 0 refs 1 (previous client : )
[54246.986458] id 9 (vi) min 1348048 max 1348048 refs 1 (previous client : vi)
[54246.995321] id 12 (544c0000.nvenc_mmapp_0) min 1348035 max 1348036 refs 2 (previous client : )
[54247.005860] id 13 (vi) min 1348060 max 1348060 refs 1 (previous client : vi)
[54247.014836] id 14 (544c0000.nvenc_mmapp_0) min 1348046 max 1348047 refs 2 (previous client : )
[54247.025424] id 15 (57000000.gpu_507) min 5393254 max 5393254 refs 1 (previous client : )
[54247.035525] id 16 (57000000.gpu_506) min 2 max 2 refs 1 (previous client : )
[54247.044611] id 17 (57000000.gpu_505) min 2 max 2 refs 1 (previous client : )
[54247.053691] id 18 (57000000.gpu_504) min 2 max 2 refs 1 (previous client : )
[54247.062738] id 19 (57000000.gpu_503) min 2 max 2 refs 1 (previous client : )
[54247.062741] id 20 (57000000.gpu_502) min 4 max 4 refs 1 (previous client : )
[54247.062744] id 21 (54340000.vic_nv_conv-0_0) min 8088267 max 8088267 refs 1 (previous client : )
[54247.062747] id 22 (54340000.vic_mmapp_0) min 4044108 max 4044108 refs 1 (previous client : )
[54247.062749] id 23 (54340000.vic_mmapp_0) min 4044141 max 4044141 refs 1 (previous client : )
[54247.062753] id 26 (vblank0) min 3254755 max 0 refs 1 (previous client : )

[54247.062852] ---- channels ----
[54247.062857] 
               channel 1 - 544c0000.nvenc

[54247.062865] 1-544c0000.nvenc (2): active class 01, offset 0050, val 0000000e
[54247.062867] DMAPUT 000008f8, DMAGET 000008f8, DMACTL 00000000
[54247.062868] CBREAD 0000000e, CBSTAT 00010050
[54247.062872] 
               ffffffc0ed394000: JOB, syncpt_id=14, syncpt_val=1348047, first_get=000008b0, timeout=10000, num_slots=9, num_handles=13
[54247.062879]     GATHER at 803b8000+4c10, 3 words
[54247.062883] 304e0005 003db56c 00000017 
[54247.062886]     GATHER at 803b8000+4c1c, 50 words
[54247.062926] 100b0001 00000000 10100002 000001c0 12000103 10100002 000001c1 001491ce 10100002 00000080 00000003 10100002 000001c4 00800e60 10100002 000001c6 00803900 10100002 000001c9 00800130 10100002 000001c7 00844000 10100002 000001c8 0083e000 10100002 000001cd 0083c000 10100002 000001d0 0081f800 10100002 000001d1 00823800 10100002 000001cc 00850000 10100002 000001ce 00803940 10100002 000001cf 00803a00 10100002 00000100 00840000 10100002 000000c0 00000100 
[54247.062928]     GATHER at 803b8000+4ce4, 2 words
[54247.062930] 20000001 0000010e 

[54247.062933] 
               channel 3 - 544c0000.nvenc

[54247.062939] 3-544c0000.nvenc (2): active class 01, offset 0050, val e0000005
[54247.062940] DMAPUT 00000028, DMAGET 00000028, DMACTL 00000000
[54247.062942] CBREAD e0000005, CBSTAT 00010050
[54247.062945] 
               ffffffc03f8df000: JOB, syncpt_id=12, syncpt_val=1348036, first_get=00000fe0, timeout=10000, num_slots=9, num_handles=13
[54247.062949]     GATHER at 803b0000+429c, 3 words
[54247.062952] 304e0005 003db54b 00000016 
[54247.062954]     GATHER at 803b0000+42a8, 50 words
[54247.062993] 100b0001 00000000 10100002 000001c0 12000103 10100002 000001c1 001491c3 10100002 00000080 00000003 10100002 000001c4 00800da0 10100002 000001c6 00802700 10100002 000001c9 008000b0 10100002 000001c7 0082c000 10100002 000001c8 00826000 10100002 000001cd 00824000 10100002 000001d0 00802800 10100002 000001d1 00803000 10100002 000001cc 00828000 10100002 000001ce 00803800 10100002 000001cf 00802740 10100002 00000101 00830000 10100002 000000c0 00000100 
[54247.062994]     GATHER at 803b0000+4370, 2 words
[54247.062997] 20000001 0000010c 

[54247.063000] 
               ---- host general irq ----

[54247.063002] sync_hintmask_ext = 0xc0000000
[54247.063004] sync_hintmask = 0x80000000
[54247.063006] sync_intc0mask = 0x00000001
[54247.063007] sync_intmask = 0x00000011
[54247.063008] 
               ---- host syncpt irq mask ----

[54247.063010] syncpt_thresh_int_mask(0) = 0x11000001
[54247.063012] syncpt_thresh_int_mask(1) = 0x00000000
[54247.063013] syncpt_thresh_int_mask(2) = 0x00000000
[54247.063015] syncpt_thresh_int_mask(3) = 0x00000000
[54247.063016] syncpt_thresh_int_mask(4) = 0x00000000
[54247.063018] syncpt_thresh_int_mask(5) = 0x00000000
[54247.063019] syncpt_thresh_int_mask(6) = 0x00000000
[54247.063021] syncpt_thresh_int_mask(7) = 0x00000000
[54247.063023] syncpt_thresh_int_mask(8) = 0x00000000
[54247.063024] syncpt_thresh_int_mask(9) = 0x00000000
[54247.063026] syncpt_thresh_int_mask(10) = 0x00000000
[54247.063027] syncpt_thresh_int_mask(11) = 0x00000000
[54247.063028] 
               ---- host syncpt irq status ----

[54247.063030] syncpt_thresh_cpu0_int_status(0) = 0x00000000
[54247.063032] syncpt_thresh_cpu0_int_status(1) = 0x00000000
[54247.063033] syncpt_thresh_cpu0_int_status(2) = 0x00000000
[54247.063035] syncpt_thresh_cpu0_int_status(3) = 0x00000000
[54247.063037] syncpt_thresh_cpu0_int_status(4) = 0x00000000
[54247.063038] syncpt_thresh_cpu0_int_status(5) = 0x00000000
[54247.063039] 
               ---- host syncpt thresh ----

[54247.063041] syncpt_int_thresh_thresh_0(0) = 1
[54247.063049] syncpt_int_thresh_thresh_0(12) = 1348036
[54247.063052] syncpt_int_thresh_thresh_0(14) = 1348047
[54247.063214] falcon 544c0000.nvenc:     SYNCPT_ID   14
[54247.063217] falcon 544c0000.nvenc:     SYNCPT_VAL  1348047
[54247.063219] falcon 544c0000.nvenc:     FIRST_GET   0x8b0
[54247.063221] falcon 544c0000.nvenc:     TIMEOUT     10000
[54247.063222] falcon 544c0000.nvenc:     NUM_SLOTS   9
[54247.063224] falcon 544c0000.nvenc:     NUM_HANDLES 13

It’s could be the sensor output get problem cause this problem. It’s better get the top of message to check if any vi/csi status message.

Hi, ShaneCCC:

Sensor driver(358840) does not give any error printing before host1x error printing.

Will this error be related to the module overheating? Since I enhanced the heat dissipation, this has not happened again these days.

I can’t tell what could be happened if overheating. Could you help to figure it’s cause by overheating.