This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VM: RTOS Decoder graph verify failed after run multiple times

Part Number: TDA4VM

Dear experts,

We ran into a issue that rtos decoder graph verify failed.

Reproduce steps are:

(PSDKRA 6.2 version on TDA4VMXEVM)

1. run "VX_TEST_DATA_PATH=/opt/vision_apps/test_data ./vx_app_conformance.out --filter=tivxHwaVideoDecoder.MultiStreamProcessing" for at least 3~5 times.

2. you will see "[ FAILED   ] 1 test(s)"

Here is my log: from TIOVX

202004142237-multi-decode-error-tiovx.log
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
118.037524 s: VX_ZONE_INFO:[ownGraphScheduleGraph:763] Scheduling Graph (graph=13, pipe=0)
118.037578 s: VX_ZONE_INFO:[ownNodeKernelSchedule:570] Scheduling Node (node=8, pipe=0)
118.037607 s: VX_ZONE_INFO:[ownNodeKernelSchedule:570] Scheduling Node (node=7, pipe=0)
118.072115 s: VX_ZONE_INFO:[ownCheckGraphCompleted:676] Graph Completed (graph=13, pipe=0)
118.072144 s: VX_ZONE_INFO:[ownCheckGraphCompleted:701] All Graphs Completed
118.717528 s: VX_ZONE_INFO:[ownGraphScheduleGraph:763] Scheduling Graph (graph=13, pipe=0)
118.717550 s: VX_ZONE_INFO:[ownNodeKernelSchedule:570] Scheduling Node (node=8, pipe=0)
118.717595 s: VX_ZONE_INFO:[ownNodeKernelSchedule:570] Scheduling Node (node=7, pipe=0)
118.752087 s: VX_ZONE_INFO:[ownCheckGraphCompleted:676] Graph Completed (graph=13, pipe=0)
118.752116 s: VX_ZONE_INFO:[ownCheckGraphCompleted:701] All Graphs Completed
119.485541 s: VX_ZONE_INFO:[ownGraphScheduleGraph:763] Scheduling Graph (graph=13, pipe=0)
119.485561 s: VX_ZONE_INFO:[ownNodeKernelSchedule:570] Scheduling Node (node=8, pipe=0)
119.485608 s: VX_ZONE_INFO:[ownNodeKernelSchedule:570] Scheduling Node (node=7, pipe=0)
119.520099 s: VX_ZONE_INFO:[ownCheckGraphCompleted:676] Graph Completed (graph=13, pipe=0)
119.520127 s: VX_ZONE_INFO:[ownCheckGraphCompleted:701] All Graphs Completed
120.309507 s: VX_ZONE_INFO:[ownGraphScheduleGraph:763] Scheduling Graph (graph=13, pipe=0)
120.309529 s: VX_ZONE_INFO:[ownNodeKernelSchedule:570] Scheduling Node (node=8, pipe=0)
120.309574 s: VX_ZONE_INFO:[ownNodeKernelSchedule:570] Scheduling Node (node=7, pipe=0)
120.343900 s: VX_ZONE_INFO:[ownCheckGraphCompleted:676] Graph Completed (graph=13, pipe=0)
120.343928 s: VX_ZONE_INFO:[ownCheckGraphCompleted:701] All Graphs Completed
121.125495 s: VX_ZONE_INFO:[ownGraphScheduleGraph:763] Scheduling Graph (graph=13, pipe=0)
121.125516 s: VX_ZONE_INFO:[ownNodeKernelSchedule:570] Scheduling Node (node=8, pipe=0)
121.125559 s: VX_ZONE_INFO:[ownNodeKernelSchedule:570] Scheduling Node (node=7, pipe=0)
121.160043 s: VX_ZONE_INFO:[ownCheckGraphCompleted:676] Graph Completed (graph=13, pipe=0)
121.160072 s: VX_ZONE_INFO:[ownCheckGraphCompleted:701] All Graphs Completed
122.094723 s: VX_ZONE_INFO:[tivxQueueDelete:182] tivxQueueDelete: if this hangs, please ensure all application threads have been destroyed
122.095337 s: VX_ZONE_INFO:[tivxQueueDelete:182] tivxQueueDelete: if this hangs, please ensure all application threads have been destroyed
122.095371 s: VX_ZONE_INFO:[tivxQueueDelete:182] tivxQueueDelete: if this hangs, please ensure all application threads have been destroyed
[ DONE ] tivxHwaVideoDecoder.MultiStreamProcessing
[ -------- ] 1 tests from test case tivxHwaVideoDecoder
[ ======== ]
[ ALL DONE ] 1 test(s) from 1 test case(s) ran
[ PASSED ] 1 test(s)
[ FAILED ] 0 test(s)
[ DISABLED ] 0 test(s)
=================================
OpenVX Conformance report summary
=================================
To be conformant to the OpenVX baseline, 1 required test(s) must pass. 1 tests passed, 0 tests failed. PASSED.
To be conformant to the User Data Object extension, 0 required test(s) must pass. 0 tests passed, 0 tests failed. PASSED.
Note: The 0 disabled tests are optional and are not considered for conformance.
#REPORT: YYYYMMDDHHMMSS FILTERED 21932 0 1 1 1 0 (version 1.1-20170301)
122.105486 s: VX_ZONE_INIT:[tivxHostDeInit:49] De-Initialization Done for HOST !!!
122.106599 s: VX_ZONE_INFO:[tivxQueueDelete:182] tivxQueueDelete: if this hangs, please ensure all application threads have been destroyed
122.107671 s: VX_ZONE_INFO:[tivxQueueDelete:182] tivxQueueDelete: if this hangs, please ensure all application threads have been destroyed
122.108738 s: VX_ZONE_INFO:[tivxQueueDelete:182] tivxQueueDelete: if this hangs, please ensure all application threads have been destroyed
122.109804 s: VX_ZONE_INFO:[tivxQueueDelete:182] tivxQueueDelete: if this hangs, please ensure all application threads have been destroyed
122.109849 s: VX_ZONE_INIT:[tivxDeInit:100] De-Initialization Done !!!
APP: Deinit ... !!!
REMOTE_SERVICE: Deinit ... !!!
REMOTE_SERVICE: Deinit ... Done !!!
IPC: Deinit ... !!!
IPC: DeInit ... Done !!!
MEM: Deinit ION ... !!!
MEM: Alloc's: 11 alloc's of 8986376 bytes
MEM: Free's : 11 free's of 8986376 bytes
MEM: Open's : 0 allocs of 0 bytes
MEM: Deinit ION ... Done !!!
APP: Deinit ... Done !!!
root@j7-evm:/opt/vision_apps# VX_TEST_DATA_PATH=/opt/vision_apps/test_data ./vx_app_conformance.out --filter=tivxHwaVideoDecoder.MultiStreamProcessing
APP: Init ... !!!
APP_LOG: Mapping 0xac000000 ...
APP_LOG: Mapped 0xac000000 -> 0xffff8b0f0000 of size 262144 bytes
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Another log from my own app, FYI:

202004142219-multi-decode-error.log

Thanks & Best Regards!

ZM

  • Hi ZM,

    Can you provide a full log from boot to the end of the test? Also, this issue starts occurring only after a few runs, is that correct? 

    Thanks,

    David

  • Hi David,

    I am attaching the logs.
    I am able to reproduce the issue. 4th time i ran the command:
    VX_TEST_DATA_PATH=/opt/vision_apps/test_data ./vx_app_conformance.out --filter=tivxHwaVidDecoder.MultiStreamProcessing

    Regards,
    Keerthy

    decoder-issue-log.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    root@j7-evm:/opt/vision_apps# VX_TEST_DATA_PATH=/opt/vision_apps/test_data ./vx_app_conformance.out --filter=tivxHwaVideoDecoder.MultiStreamProcessing
    APP: Init ... !!!
    APP_LOG: Mapping 0xac000000 ...
    APP_LOG: Mped 0xac000000 -> 0xffffa4440000 of size 262144 bytes
    MEM: Iit ION ... !!!
    MEM: Initialized ION (fd=4) !!!
    MEM: Init ION.. Done !!!
    IPC: Init ... !!!
    APP_LOG: Mapping 0xac040000 ..
    APP_LOG: Mapped 0xac040000 -> 0xffffa24a0000 of size 33161216 bytes
    APP_LOG: Mapping 0x30e00000 ...
    APP_LOG: Mappe0x30e00000 -> 0xffffa4930000 of size 3072 bytes
    IPC: Init ..Done !!!
    REMOTE_SERVICE: Init ... !!!
    REMOTE_SERVICE: Init ... Done !!!
    APP: Init ... Done !!!
    0.015201 s: VZONE_INIT:Enabled
    0.015214 s: VX_ZONE_ERROR:Enabled
    0.015218 s: VX_ZONE_WARNING:Enabled
    0.017453 s: VX_ZONE_INIT:[tivxInit:64] Initialization Done !!!
    0.0179 s: VX_ZONE_INIT:[tivxHostInit:44] Initialization Done for HT !!!
    VxTests version: 1.1-20170301
    VCS version: unknown
    Build config: Release
    [ ======== ] Total 21932 tests from 144 test cases
    Use test filter: tivxHwaVideoDecoder.MtiStreamProcessing
    Use global OpenVX context: FALSE
    [ -------- ] tests from tivxHwaVideoDecoder
    [ RUN 0001 ] tivxaVideoDecoder.MultiStreamProcessing ...
    [ 133.333456] ion_buffer_destroy: buffer still mapped in the rnel
    [ DONE ] tivxHwaVideoDecoder.MultiStreamProcessing
    -------- ] 1 tests from test case tivxHwaVideoDecoder
    [ ======== ]
    [ ALL DE ] 1 test(s) from 1 test case(s) ran
    [ PASSED ] 1 test(s)
    [ ILED ] 0 test(s)
    [ DISABLED ] 0 test(s)
    ===============================
    OpenVX Conformance report summary
    =================================
    To be conformant to the OpenVbaseline, 1 required test(s) must pass. 1 tests passed, 0 testfailed. PASSED.
    To be conformant to the User Data Object extension, 0 required test(s) must pass. 0 tests passed, 0 tts failed. PASSED.
    Note: The 0 disabled tests are optional anare not considered for conformance.
    #REPORT: YYYYMMDDHHMMSS FILTERED 21932 0 1 1 1 0 (version 1.1-20170301)
    48.5891 s: VX_ZONE_INIT:[tivxHostDeInit:49] De-Initialization Do for HOST !!!
    48.190236 s: VX_ZONE_INIT:[tivxDeInit:100] De-Initialization Done !!!
    APP: Deinit ... !!!
    REMOTEERVICE: Deinit ... !!!
    REMOTE_SERVICE: Deinit ... Done !!!
    I: Deinit ... !!!
    IPC: DeInit ... Done !!!
    MEM: Deinit ION ... !!!
    MEM: Alloc's: 11 alloc's of 8986376 bytes
    MEM: Fe's : 11 free's of 8986376 bytes
    MEM: Open's : 0 allocs of bytes
    MEM: Deinit ION ... Done !!!
    APP: Deinit ... Done !!!
    root@j7-evm:/opt/vision_apps#
    root@j7-evm:/opt/vision_apps#
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • decoder-robustness.7zHi Zhong Ming,

    David has fixed the issue and  myself and David tested the test case 100 & 500 times respectively.

    2 Things:

    1) Patch: 0001-osal-tirtos-osa_queue-Fix-semaphore-cleanup

    To fix the actual issue with destroying the acquired semaphores. This needs the following build commands:

    video_codec: rm –rf out
    video_codec: make codec_apps
    vision_apps: make

    to install the changes to SD card i am doing:
    make linux_fs_install_sd

    2) The above will get us running mltiple iterations of decoder. That means by default output gets continuously written to SD
    Card and we observed that card gets full by 8-12 iteration depending on the memory size of the card.

    So we suggest the following change in the file \psdk_rtos_auto_j7_06_02_00_21\tiovx\kernels_j7\hwa\test\test_video_decoder.c:

    Comment out the below line:

    #define DUMP_DECODED_VIDEO_TO_FILE.

    The above ensures that output is not written to SD or else one will have manually clear the output of decoder every iteration
    to avoid SD card memory getting full.

    This needs the following build commands:

    tiovx directory: make tiovx
    vision_apps: make

    to install the changes to SD card i am doing:
    make linux_fs_install_sd

    I am posting this on behalf of David.

    Thanks,
    Keerthy

  • Hi Keerthy, 

    The patch does not work in my environment. And once the patch is used, it causes other stuck problem when decode multi H.264 streams. And if we run multi times, it will end up with decoder's crash just as before.

    Leon

  • Hi Leon,

    Can you please share the logs?

    Also please make sure that 2 is taken into account.
    That is needed to run multiple times successfully as the SD Card full can also result in failures.

    Regards,
    Keerthy