Hi Experts
My device happens alognment trap, and av_server.out crashs after several hours.
I need your suggestion to help me find the root cause.
I used "printf()" to find the cause, and found that the issue may be in the VIDENC1_process().
My device uses appro ipnc rdk 3.0, and codec version is H264ENC.version.02.30.00.03.
My application is "Corridor". So i use EDMA to corridor 1080x720 frame to 720x1080, and that means the input frame size of encode is 720x1080.
My simple image flow is below.
My log is also below.
-----------------------------------------------------
Log 1
Alignment trap: av_server.out (780) PC=0x000ee790 Instr=0xe5832000 Address=0xa898aa65 FSR 0x801
Unable to handle kernel paging request at virtual address 327b3381
pgd = c689c000
[327b3381] *pgd=00000000
Internal error: Oops: 1 [#1]
Modules linked in: puller davinci_mmc mmc_block mmc_core davinci_emac slhc tun loop nls_utf8 nls_ascii sha1 md5 des deflate crc32c i2c_emac cfq_iosched deadline_iosched libcrc32c crc_ccitt dm365mmap irqk edmak cmemk drv csl
CPU: 0
PC is at HeapMem_free+0x40/0xb4 [cmemk]
LR is at 0x1000
pc : [<bf022184>] lr : [<00001000>] Not tainted
sp : c0c67d64 ip : 327b3381 fp : c0c67d74
r10: 00000000 r9 : 00000001 r8 : c09c2a28
r7 : bf026da0 r6 : 00000000 r5 : c09c2a28 r4 : bf026d80
r3 : 00000001 r2 : 00000724 r1 : c9748000 r0 : 327b3381
Flags: nzcv IRQs on FIQs on Mode SVC_32 Segment user
Control: 5317F
Table: 8689C000 DAC: 00000015
Process av_server.out (pid: 770, stack limit = 0xc0c66258)
Stack: (0xc0c67d64 to 0xc0c68000)
7d60: c09c2a20 c0c67dc4 c0c67d78 bf022ca4 bf022154 00000000 00000000
7d80: bf026d98 c725b760 bf026da0 c09c2a60 00000000 00000005 c00b67a8 c725b760
7da0: c725b760 c73f26c8 c0506e20 c7436098 00000000 00000000 c0c67dec c0c67dc8
7dc0: c0097988 bf022b28 c00306f4 c725b760 00000000 c0514500 c0514508 00000000
7de0: c0c67dfc c0c67df0 c0097c4c c0097938 c0c67e1c c0c67e00 c0094444 c0097c28
7e00: c0c66000 00007ff7 c0514500 00000030 c0c67e4c c0c67e20 c004cf10 c00943e8
7e20: c0c67e4c c0514500 c71d89a0 c7203a90 00000000 00000007 00000000 c0c67f50
7e40: c0c67e6c c0c67e50 c004e518 c004ce8c 00002731 02a2740c c0c67ea0 c0c66000
7e60: c0c67e84 c0c67e70 c004eda8 c004e2d8 00000000 00000009 c0c67ebc c0c67e88
7e80: c0059d54 c004ecfc c0c67fb0 c71d8b80 c00561c4 c0c66000 c0034f88 c0c67fb0
7ea0: 00000000 c0034f88 c0c66000 00000000 c0c67f9c c0c67ec0 c0037ba4 c0059984
7ec0: c0c66000 00000001 c71d8b80 c0c67ed8 00000009 00000000 00000000 00000000
7ee0: 00000000 00000001 c0c67f14 c0c67ef8 c0065478 c0c67f88 00000000 00000001
7f00: befaab88 befaab88 00000008 00000000 c0c67f20 c0064f14 08b43ac2 00002c9c
7f20: c6385f21 00000000 00000000 00000000 1c3a999a 00002c9c c0065024 c0349110
7f40: 00000000 00000002 c0c67f48 c0c67f48 c71d89a0 000000a2 00000000 13865ed8
7f60: c0c67f88 befaab88 00000080 000000a2 c0034f88 00000000 0000004d 00000080
7f80: 000000a2 c0034f88 c0c66000 00000000 c0c67fac c0c67fa0 c0038058 c0037b5c
7fa0: 00000000 c0c67fb0 c0034e2c c003803c fffffdfc befaab88 4001f3e4 00000002
7fc0: 00000000 0000004d 00000080 000000a2 00000021 00000021 0000065c 0013e03c
7fe0: 00000000 befaab80 400344f4 40035634 80000010 befaab90 00000000 00000000
Backtrace:
[<bf022144>] (HeapMem_free+0x0/0xb4 [cmemk]) from [<bf022ca4>] (release+0x18c/0x270 [cmemk])
r4 = C09C2A20
[<bf022b18>] (release+0x0/0x270 [cmemk]) from [<c0097988>] (__fput+0x60/0x1bc)
[<c0097928>] (__fput+0x0/0x1bc) from [<c0097c4c>] (fput+0x34/0x38)
r8 = 00000000 r7 = C0514508 r6 = C0514500 r5 = 00000000
r4 = C725B760
[<c0097c18>] (fput+0x0/0x38) from [<c0094444>] (filp_close+0x6c/0x78)
[<c00943d8>] (filp_close+0x0/0x78) from [<c004cf10>] (put_files_struct+0x94/0xe8)
r6 = 00000030 r5 = C0514500 r4 = 00007FF7
[<c004ce7c>] (put_files_struct+0x0/0xe8) from [<c004e518>] (do_exit+0x250/0xa24)
[<c004e2c8>] (do_exit+0x0/0xa24) from [<c004eda8>] (sys_exit_group+0x0/0x1c)
[<c004ecec>] (do_group_exit+0x0/0xbc) from [<c0059d54>] (get_signal_to_deliver+0x3e0/0x42c)
r4 = 00000009
[<c0059974>] (get_signal_to_deliver+0x0/0x42c) from [<c0037ba4>] (do_signal+0x58/0x4e0)
[<c0037b4c>] (do_signal+0x0/0x4e0) from [<c0038058>] (do_notify_resume+0x2c/0x30)
[<c003802c>] (do_notify_resume+0x0/0x30) from [<c0034e2c>] (work_pending+0x1c/0x20)
Code: 1062e003 e1a0c004 ea000001 e1a0c000 (e5900000)
<1>Fixing recursive fault but reboot is needed!
-----------------------------------------------------
Log 2
Alignment trap: av_server.out (774) PC=0x000e1178 Instr=0xe5823000 Address=0x3c843d7a FSR 0x801
Unable to handle kernel paging request at virtual address 29822a7c
pgd = c0004000
[29822a7c] *pgd=00000000
Internal error: Oops: 5 [#1]
Modules linked in: puller davinci_mmc mmc_block mmc_core davinci_emac slhc tun loop nls_utf8 nls_ascii sha1 md5 des deflate crc32c i2c_emac cfq_iosched deadline_iosched libcrc32c crc_ccitt dm365mmap irqk edmak cmemk drv csl
CPU: 0
PC is at HeapMem_free+0x40/0xb4 [cmemk]
LR is at 0x1000
pc : [<bf022184>] lr : [<00001000>] Not tainted
sp : c78abd64 ip : 29822a7c fp : c78abd74
r10: 00000000 r9 : 00000001 r8 : c76083a8
r7 : bf026da0 r6 : 00000000 r5 : c76083a8 r4 : bf026d80
r3 : 00000001 r2 : 00000724 r1 : c9748000 r0 : 29822a7c
Flags: nzcv IRQs on FIQs on Mode SVC_32 Segment user
Control: 5317F
Table: 877C8000 DAC: 00000015
Process av_server.out (pid: 766, stack limit = 0xc78aa258)
Stack: (0xc78abd64 to 0xc78ac000)
bd60: c76083a0 c78abdc4 c78abd78 bf022ca4 bf022154 00000000 00000000
bd80: bf026d98 c8076080 bf026da0 c76083e0 00000000 00000005 c00b67a8 c8076080
bda0: c8076080 c0fe46c8 c800ce20 c707b098 00000000 00000000 c78abdec c78abdc8
bdc0: c0097988 bf022b28 c0e203d4 c8076080 00000000 c801c800 c801c808 00000000
bde0: c78abdfc c78abdf0 c0097c4c c0097938 c78abe1c c78abe00 c0094444 c0097c28
be00: c78aa000 00007ff7 c801c800 00000030 c78abe4c c78abe20 c004cf10 c00943e8
be20: c78abe4c c801c800 c0e1e3e0 c0f2b070 00000000 00000007 00000000 c78abf50
be40: c78abe6c c78abe50 c004e518 c004ce8c c0035ba4 c0051434 c78abea0 c78aa000
be60: c78abe84 c78abe70 c004eda8 c004e2d8 00000000 00000009 c78abebc c78abe88
be80: c0059d54 c004ecfc c78abfb0 c0e1e5c0 c00561c4 c78aa000 c0034f88 c78abfb0
bea0: 00000000 c0034f88 c78aa000 00000000 c78abf9c c78abec0 c0037ba4 c0059984
bec0: c78aa000 00000001 c0e1e5c0 c78abed8 00000009 00000000 00000000 00000000
bee0: 00000000 00000001 c78abf14 c78abef8 c0065478 c78abf88 00000000 00000001
bf00: bec53b88 bec53b88 00000008 00000000 c78abf20 c0064f14 00d962b7 00001e61
bf20: c7841f20 00000000 00000000 00000000 39ca321f 00001e61 c0065024 c0349110
bf40: 00000000 00000002 c78abf48 c78abf48 c0e1e3e0 c78abf60 00000000 38f0cf68
bf60: c78abf88 bec53b88 00000080 000000a2 c0034f88 00000000 0000004d 00000080
bf80: 000000a2 c0034f88 c78aa000 00000000 c78abfac c78abfa0 c0038058 c0037b5c
bfa0: 00000000 c78abfb0 c0034e2c c003803c fffffdfc bec53b88 4001f3e4 00000002
bfc0: 00000000 0000004d 00000080 000000a2 00000021 00000021 0000065c 0013db44
bfe0: 00000000 bec53b80 400344f4 40035634 80000010 bec53b90 37243027 8cdc6353
Backtrace:
[<bf022144>] (HeapMem_free+0x0/0xb4 [cmemk]) from [<bf022ca4>] (release+0x18c/0x270 [cmemk])
r4 = C76083A0
[<bf022b18>] (release+0x0/0x270 [cmemk]) from [<c0097988>] (__fput+0x60/0x1bc)
[<c0097928>] (__fput+0x0/0x1bc) from [<c0097c4c>] (fput+0x34/0x38)
r8 = 00000000 r7 = C801C808 r6 = C801C800 r5 = 00000000
r4 = C8076080
[<c0097c18>] (fput+0x0/0x38) from [<c0094444>] (filp_close+0x6c/0x78)
[<c00943d8>] (filp_close+0x0/0x78) from [<c004cf10>] (put_files_struct+0x94/0xe8)
r6 = 00000030 r5 = C801C800 r4 = 00007FF7
[<c004ce7c>] (put_files_struct+0x0/0xe8) from [<c004e518>] (do_exit+0x250/0xa24)
[<c004e2c8>] (do_exit+0x0/0xa24) from [<c004eda8>] (sys_exit_group+0x0/0x1c)
[<c004ecec>] (do_group_exit+0x0/0xbc) from [<c0059d54>] (get_signal_to_deliver+0x3e0/0x42c)
r4 = 00000009
[<c0059974>] (get_signal_to_deliver+0x0/0x42c) from [<c0037ba4>] (do_signal+0x58/0x4e0)
[<c0037b4c>] (do_signal+0x0/0x4e0) from [<c0038058>] (do_notify_resume+0x2c/0x30)
[<c003802c>] (do_notify_resume+0x0/0x30) from [<c0034e2c>] (work_pending+0x1c/0x20)
Code: 1062e003 e1a0c004 ea000001 e1a0c000 (e5900000)
<1>Fixing recursive fault but reboot is needed!
-----------------------------------------------------
Log 3
Alignment trap: av_server.out (778) PC=0x000e11c8 Instr=0xe5823000 Address=0x0280017e FSR 0x801
Unable to handle kernel paging request at virtual address 01800180
pgd = c0004000
[01800180] *pgd=00000000
Internal error: Oops: 5 [#1]
Modules linked in: puller davinci_mmc mmc_block mmc_core davinci_emac slhc tun loop nls_utf8 nls_ascii sha1 md5 des deflate crc32c i2c_emac cfq_iosched deadline_iosched libcrc32c crc_ccitt dm365mmap irqk edmak cmemk drv csl
CPU: 0
PC is at HeapMem_free+0x40/0xb4 [cmemk]
LR is at 0x1000
pc : [<bf022184>] lr : [<00001000>] Not tainted
sp : c78afd64 ip : 01800180 fp : c78afd74
r10: 00000000 r9 : 00000001 r8 : c760e9a8
r7 : bf026da0 r6 : 00000000 r5 : c760e9a8 r4 : bf026d80
r3 : 00000001 r2 : 00000724 r1 : c9748000 r0 : 01800180
Flags: nzcv IRQs on FIQs on Mode SVC_32 Segment user
Control: 5317F
Table: 86BD0000 DAC: 00000015
Process av_server.out (pid: 770, stack limit = 0xc78ae258)
Stack: (0xc78afd64 to 0xc78b0000)
fd60: c760e9a0 c78afdc4 c78afd78 bf022ca4 bf022154 00000000 00000000
fd80: bf026d98 c0e04e60 bf026da0 c760e9e0 00000000 00000005 c00b67a8 c0e04e60
fda0: c0e04e60 c0fe16c8 c800ce20 c7080098 00000000 00000000 c78afdec c78afdc8
fdc0: c0097988 bf022b28 c81b5894 c0e04e60 00000000 c801c800 c801c808 00000000
fde0: c78afdfc c78afdf0 c0097c4c c0097938 c78afe1c c78afe00 c0094444 c0097c28
fe00: c78ae000 00007ff7 c801c800 00000030 c78afe4c c78afe20 c004cf10 c00943e8
fe20: c78afe4c c801c800 c0e22100 c0d3eab0 00000000 00000007 00000000 c78aff50
fe40: c78afe6c c78afe50 c004e518 c004ce8c 00000000 000f4fb0 c78afea0 c78ae000
fe60: c78afe84 c78afe70 c004eda8 c004e2d8 00000000 00000009 c78afebc c78afe88
fe80: c0059d54 c004ecfc c78affb0 c0e222e0 c00561c4 c78ae000 c0034f88 c78affb0
fea0: 00000000 c0034f88 c78ae000 00000000 c78aff9c c78afec0 c0037ba4 c0059984
fec0: c78ae000 00000001 c0e222e0 c78afed8 00000009 00000000 00000000 00000000
fee0: 00000000 00000001 c78aff14 c78afef8 c0065478 c78aff88 00000000 00000001
ff00: bed42b88 bed42b88 00000008 00000000 c78aff20 c0064f14 35c2839c 00000102
ff20: c780bf20 00000000 00000000 00000000 2e774b4f 00000103 c0065024 c0349110
ff40: 00000000 00000002 c78aff48 c78aff48 c0e22100 c01cddf8 00000000 344f91b3
ff60: c78aff88 bed42b88 00000080 000000a2 c0034f88 00000000 0000004d 00000080
ff80: 000000a2 c0034f88 c78ae000 00000000 c78affac c78affa0 c0038058 c0037b5c
ffa0: 00000000 c78affb0 c0034e2c c003803c fffffdfc bed42b88 4001f3e4 00000002
ffc0: 00000000 0000004d 00000080 000000a2 00000021 00000021 0000065c 0013e084
ffe0: 00000000 bed42b80 400344f4 40035634 80000010 bed42b90 79cdbff5 7a8fa6b9
Backtrace:
[<bf022144>] (HeapMem_free+0x0/0xb4 [cmemk]) from [<bf022ca4>] (release+0x18c/0x270 [cmemk])
r4 = C760E9A0
[<bf022b18>] (release+0x0/0x270 [cmemk]) from [<c0097988>] (__fput+0x60/0x1bc)
[<c0097928>] (__fput+0x0/0x1bc) from [<c0097c4c>] (fput+0x34/0x38)
r8 = 00000000 r7 = C801C808 r6 = C801C800 r5 = 00000000
r4 = C0E04E60
[<c0097c18>] (fput+0x0/0x38) from [<c0094444>] (filp_close+0x6c/0x78)
[<c00943d8>] (filp_close+0x0/0x78) from [<c004cf10>] (put_files_struct+0x94/0xe8)
r6 = 00000030 r5 = C801C800 r4 = 00007FF7
[<c004ce7c>] (put_files_struct+0x0/0xe8) from [<c004e518>] (do_exit+0x250/0xa24)
[<c004e2c8>] (do_exit+0x0/0xa24) from [<c004eda8>] (sys_exit_group+0x0/0x1c)
[<c004ecec>] (do_group_exit+0x0/0xbc) from [<c0059d54>] (get_signal_to_deliver+0x3e0/0x42c)
r4 = 00000009
[<c0059974>] (get_signal_to_deliver+0x0/0x42c) from [<c0037ba4>] (do_signal+0x58/0x4e0)
[<c0037b4c>] (do_signal+0x0/0x4e0) from [<c0038058>] (do_notify_resume+0x2c/0x30)
[<c003802c>] (do_notify_resume+0x0/0x30) from [<c0034e2c>] (work_pending+0x1c/0x20)
Code: 1062e003 e1a0c004 ea000001 e1a0c000 (e5900000)
<1>Fixing recursive fault but reboot is needed!