AnsweredAssumed Answered

imx6 prompts memory corruption

Question asked by 其东 刘 on May 4, 2020
Latest reply on May 4, 2020 by igorpadykov

Hello everyone, we made a board with reference to the MCIMX6Q-SDB development board. The Linux version is Linux-3.14.52.
During use, we found that the kernel will crash because of kmem_cache_alloc.
Later we open the memory debugging option and find that the kernel will print memory corruption information. What is the reason for these phenomena?
The relevant log information is as follows (for complete information, please consult nearby):

kmem_cache_alloc log:


20200426 063323kjournald starting. Commit interval 5 seconds
20200426 063323EXT3-fs (mmcblk3p2): using internal journal
20200426 063323EXT3-fs (mmcblk3p2): recovery complete
20200426 063323EXT3-fs (mmcblk3p2): mounted filesystem with ordered data mode
20200426 063323VFS: Mounted root (ext3 filesystem) on device 179:2.
20200426 063324devtmpfs: mounted
20200426 063324Freeing unused kernel memory: 1296K (808d6000 - 80a1a000)
20200426 063324INIT: version 2.88 booting
20200426 063324Starting udev
20200426 063324udevd[179]: starting version 182
20200426 063324Unable to handle kernel paging request at virtual address 2ed43004
20200426 063324Unable to handle kernel paging request at virtual address 2ed3b004
20200426 063324pgd = ac77c000
20200426 063324[2ed3b004] *pgd=00000000
20200426 063324Internal error: Oops: 5 [#1] PREEMPT SMP ARM
20200426 063324Modules linked in:
20200426 063324CPU: 0 PID: 179 Comm: udevd Not tainted 3.14.52-1.1.1_ga #954
20200426 063324task: ac751200 ti: ac732000 task.ti: ac732000
20200426 063324PC is at kmem_cache_alloc+0x2c/0x124
20200426 063324LR is at kmem_cache_alloc+0x20/0x124
20200426 063324pc : [<800cdc24>] lr : [<800cdc18>] psr: 200b0013
20200426 063324sp : ac733ee8 ip : 00000008 fp : 80a84706
20200426 063324r10: ac761f5c r9 : 80acfec0 r8 : 00000200
20200426 063324r7 : 2ed3b000 r6 : ac732000 r5 : ac000480 r4 : 00000000
20200426 063324r3 : 2ed3b000 r2 : ac732000 r1 : 00000200 r0 : 00000001
20200426 063324Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
20200426 063324Control: 10c53c7d Table: 3c77c04a DAC: 00000015
20200426 063324Process udevd (pid: 179, stack limit = 0xac732238)
20200426 063324Stack: (0xac733ee8 to 0xac734000)
20200426 0633243ee0: ac761f04 ac761ec8 ac701020 76f36000 ac761ec8 00000000
20200426 0633243f00: 80acfec0 800c05ec ac787380 8012ff50 000285f4 ac761ec8 ac761f20 76f36000
20200426 0633243f20: 80a85a18 76f36000 00000001 00000000 000285f4 800bb8b8 aa188a68 aa1d6158
20200426 0633243f40: 76f35000 00000000 ac290fc0 76f36000 76f35000 ac761f20 ac761000 800bc7d8
20200426 0633243f60: 00200200 80662ab0 00100100 ac290ff8 ac290fc0 00001000 76f35000 8000e5e4
20200426 0633243f80: ac732000 00000000 000285f4 800bc8d0 00000000 000f2a68 00000000 00000000
20200426 0633243fa0: 0000005b 8000e460 000f2a68 00000000 76f35000 00001000 00000000 00000000
20200426 0633243fc0: 000f2a68 00000000 00000000 0000005b 00000000 00000000 000285e8 000285f4
20200426 0633243fe0: fbad2418 7e88048c 76deb648 76e4c63c 600b0010 76f35000 e39df7ef ebfdf7fd
20200426 063324[<800cdc24>] (kmem_cache_alloc) from [<800c05ec>] (anon_vma_clone+0xa8/0x160)
20200426 063324[<800c05ec>] (anon_vma_clone) from [<800bb8b8>] (__split_vma.isra.37+0x78/0x174)
20200426 063324[<800bb8b8>] (__split_vma.isra.37) from [<800bc7d8>] (do_munmap+0x2f0/0x3ac)
20200426 063324[<800bc7d8>] (do_munmap) from [<800bc8d0>] (vm_munmap+0x3c/0x50)
20200426 063324[<800bc8d0>] (vm_munmap) from [<8000e460>] (ret_fast_syscall+0x0/0x38)
20200426 063324Code: ebfdf911 e5954000 ee1d7f90 e0873004 (e5939004)
20200426 063324---[ end trace dcda4d9edeef09ff ]---
20200426 063324note: udevd[179] exited with preempt_count 1
20200426 063324Unable to handle kernel paging request at virtual address 2ed3b004
20200426 063324pgd = ac8ac000
20200426 063324[2ed3b004] *pgd=00000000
20200426 063324Internal error: Oops: 5 [#2] PREEMPT SMP ARM
20200426 063324Modules linked in:
20200426 063324CPU: 0 PID: 199 Comm: rc Tainted: G D 3.14.52-1.1.1_ga #954
20200426 063324task: ac750d80 ti: ac74c000 task.ti: ac74c000
20200426 063324PC is at kmem_cache_alloc+0x2c/0x124
20200426 063324LR is at kmem_cache_alloc+0x20/0x124
20200426 063324pc : [<800cdc24>] lr : [<800cdc18>] psr: 200b0013
20200426 063324sp : ac74de80 ip : 00000008 fp : 80a84706
20200426 063324r10: ac7167cc r9 : 80acfec0 r8 : 00000200
20200426 063324r7 : 2ed3b000 r6 : ac74c000 r5 : ac000480 r4 : 00000000
20200426 063324r3 : 2ed3b000 r2 : ac74c000 r1 : 00000200 r0 : 00000001
20200426 063324Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
20200426 063324Control: 10c53c7d Table: 3c8ac04a DAC: 00000015
20200426 063324Process rc (pid: 199, stack limit = 0xac74c238)
20200426 063324Stack: (0xac74de80 to 0xac74e000)
20200426 063324de80: ac6fb920 00000005 ac701000 ac761370 ac761370 00000000 80acfec0 800c05ec
20200426 063324dea0: 00000000 80a24824 80a30aa0 00000005 ac716790 ac761370 aa164584 aa164574
20200426 063324dec0: ac716790 ac291180 ac74c028 800c06c0 00000005 80a85a00 ac761370 aa164584
20200426 063324dee0: aa164574 80028798 ac66d910 80a29888 00000817 00000000 00000000 ac291340
20200426 063324df00: 00000000 ac751870 ac751680 ac761e84 ac291378 ac2911b8 ac761e70 ac761e78
20200426 063324df20: ac761e80 01200011 00000000 76f923f8 80a85a00 80a85a00 00000000 fffffff4
20200426 063324df40: ac74df70 01200011 00000000 76f3a000 00000000 00000000 ac74c000 00000000
20200426 063324df60: 7ef6b9cc 80028ce0 00000000 00000000 00000008 00000000 7ef6ba58 80037598
20200426 063324df80: 00000000 76f923f8 00000000 76f3a000 00000078 8000e5e4 ac74c000 00000000
20200426 063324dfa0: 7ef6b9cc 8000e460 76f923f8 00000000 01200011 00000000 00000000 00000000
20200426 063324dfc0: 76f923f8 00000000 76f3a000 00000078 76f92390 000e50d0 000000c7 7ef6b9cc
20200426 063324dfe0: 76f92850 7ef6b9a0 000000c7 76ea5c4c 600b0010 01200011 3ff78811 3ff78c11
20200426 063324[<800cdc24>] (kmem_cache_alloc) from [<800c05ec>] (anon_vma_clone+0xa8/0x160)
20200426 063324[<800c05ec>] (anon_vma_clone) from [<800c06c0>] (anon_vma_fork+0x1c/0x12c)
20200426 063324[<800c06c0>] (anon_vma_fork) from [<80028798>] (copy_process.part.61+0xf2c/0x1328)
20200426 063324[<80028798>] (copy_process.part.61) from [<80028ce0>] (do_fork+0xb0/0x33c)
20200426 063324[<80028ce0>] (do_fork) from [<8000e460>] (ret_fast_syscall+0x0/0x38)
20200426 063324Code: ebfdf911 e5954000 ee1d7f90 e0873004 (e5939004)
20200426 063324---[ end trace dcda4d9edeef0a00 ]---
20200426 063324note: rc[199] exited with preempt_count 1
20200426 063324pgd = ac8b0000
20200426 063324[2ed43004] *pgd=00000000
20200426 063324Internal error: Oops: 5 [#3] PREEMPT SMP ARM
20200426 063324Modules linked in:
20200426 063324CPU: 1 PID: 198 Comm: udevadm Tainted: G D 3.14.52-1.1.1_ga #954
20200426 063324task: ac63b600 ti: ac8aa000 task.ti: ac8aa000
20200426 063324PC is at kmem_cache_alloc+0x2c/0x124
20200426 063324LR is at kmem_cache_alloc+0x20/0x124
20200426 063324pc : [<800cdc24>] lr : [<800cdc18>] psr: 800f0013
20200426 063324sp : ac8abee8 ip : 00000008 fp : 80a84706
20200426 063324r10: ac86424c r9 : 80acfec0 r8 : 00000200
20200426 063324r7 : 2ed43000 r6 : ac8aa000 r5 : ac000480 r4 : 00000000
20200426 063324r3 : 2ed43000 r2 : ac8aa000 r1 : 00000200 r0 : 00000001
20200426 063324Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
20200426 063324Control: 10c53c7d Table: 3c8b004a DAC: 00000015
20200426 063324Process udevadm (pid: 198, stack limit = 0xac8aa238)
20200426 063324Stack: (0xac8abee8 to 0xac8ac000)
20200426 063324bee0: ac864cf4 ac864cb8 ac862080 76f58000 ac864cb8 00000000
20200426 063324bf00: 80acfec0 800c05ec 00000001 ac8696c0 00000000 ac864cb8 ac864210 76f58000
20200426 063324bf20: 80a85a18 76f58000 00000001 00000000 00000000 800bb8b8 aa1fa160 ac7b7528
20200426 063324bf40: 76f57000 00000000 ac7301c0 76f58000 76f57000 ac864210 ac864108 800bc7d8
20200426 063324bf60: 00200200 80662ab0 00100100 ac7301f8 ac7301c0 00001000 76f57000 8000e5e4
20200426 063325bf80: ac8aa000 00000000 00000000 800bc8d0 00000000 00569218 00000000 00000000
20200426 063325bfa0: 0000005b 8000e460 00569218 00000000 76f57000 00001000 00000000 00000000
20200426 063325bfc0: 00569218 00000000 00000000 0000005b 00002266 00000000 00000000 00000000
20200426 063325bfe0: fbad2418 7eb5aaf4 76e0c648 76e6d63c 600f0010 76f57000 f7ebefe7 aff2eff9
20200426 063325[<800cdc24>] (kmem_cache_alloc) from [<800c05ec>] (anon_vma_clone+0xa8/0x160)
20200426 063325[<800c05ec>] (anon_vma_clone) from [<800bb8b8>] (__split_vma.isra.37+0x78/0x174)
20200426 063325[<800bb8b8>] (__split_vma.isra.37) from [<800bc7d8>] (do_munmap+0x2f0/0x3ac)
20200426 063325[<800bc7d8>] (do_munmap) from [<800bc8d0>] (vm_munmap+0x3c/0x50)
20200426 063325[<800bc8d0>] (vm_munmap) from [<8000e460>] (ret_fast_syscall+0x0/0x38)
20200426 063325Code: ebfdf911 e5954000 ee1d7f90 e0873004 (e5939004)
20200426 063325---[ end trace dcda4d9edeef0a01 ]---
20200426 063325note: udevadm[198] exited with preempt_count 1
20200426 063414random: nonblocking pool is initialized
20200426 063436
20200426 063436

 

pagealloc: memory corruption

imx-sdma 20ec000.sdma: no iram assigned, using external mem
imx-sdma 20ec000.sdma: no event needs to be remapped
imx-sdma 20ec000.sdma: loaded firmware 3.2
imx-sdma 20ec000.sdma: initialized
pfuze100-regulator 1-0008: Full layer: 2, Metal layer: 1
pfuze100-regulator 1-0008: FAB: 0, FIN: 0
pfuze100-regulator 1-0008: pfuze100 found.
pagealloc: memory corruption
ac350000: 20 07 20 07 20 07 20 07 20 07 20 07 20 07 20 07 . . . . . . . .
ac350010: 20 07 20 07 20 07 20 07 20 07 20 07 20 07 20 07 . . . . . . . .
ac350020: 20 07 20 07 20 07 20 07 20 07 20 07 20 07 20 07 . . . . . . . .
ac350030: 20 07 20 07 20 07 20 07 20 07 20 07 20 07 20 07 . . . . . . . .
ac350040: 20 07 20 07 20 07 20 07 20 07 20 07 20 07 20 07 . . . . . . . .
ac350050: 20 07 20 07 20 07 20 07 20 07 20 07 20 07 20 07 . . . . . . . .
ac350060: 20 07 20 07 20 07 20 07 20 07 20 07 20 07 20 07 . . . . . . . .

Outcomes