linux下内存问题

发布于 2022-09-13 01:06:51 字数 10430 浏览 27 评论 0

Unable to handle kernel paging request at virtual address 00100118
pgd = c7f18000
[00100118] *pgd=c7f40031, *pte=00000000, *ppte=00000000
Internal error: Oops: 17 [#1] PREEMPT
last sysfs file: /sys/devices/virtual/volmon/volmon/dev
Modules linked in: driver_gwzd r8152 exwdg suart_emu
CPU: 0    Tainted: G        W   (2.6.33-rc4 #323)
PC is at __gpio_get_value+0x18/0x3c
LR is at gprs_timer_func+0x24/0x104 [driver_gwzd]
pc : [<c014f124>]    lr : [<bf03e940>]    psr: 80000013
sp : c7f47a60  ip : c7f47a70  fp : c7f47a6c
r10: c03ab20c  r9 : c03ab00c  r8 : c03ab40c
r7 : bf03e91c  r6 : 00000006  r5 : 00000018  r4 : 00007fff
r3 : c03afaa0  r2 : 00007fff  r1 : 000101c5  r0 : 00100100
Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 0005317f  Table: c7f18000  DAC: 00000015
Process cat (pid: 1066, stack limit = 0xc7f46270)
Stack: (0xc7f47a60 to 0xc7f48000)
7a60: c7f47a8c c7f47a70 bf03e940 c014f11c c03aa600 c7f46000 00000102 bf03e91c
7a80: c7f47acc c7f47a90 c0046790 bf03e92c c7820900 c03aae0c c7efa8b4 c7efa8b4
7aa0: 00000000 00000102 c7f46000 00000004 00000001 00000001 0000000a c03aa460
7ac0: c7f47b04 c7f47ad0 c00412dc c0046610 c0384a24 c7f46000 00000015 00000015
7ae0: 00000000 00200000 00000001 00000000 c7f46000 00000000 c7f47b14 c7f47b08
7b00: c00413b4 c0041268 c7f47b2c c7f47b18 c0027078 c0041378 ffffffff febfd000
7b20: c7f47d54 c7f47b30 c0027b4c c0027010 c033ba40 c033ba41 c033ba41 00000075
7b40: 00000014 c033ba3e c7f47dc8 c7ec4240 00000b29 00000000 00000000 c7f47d54
7b60: 0000003c c7f47b78 c0143294 c01433bc 20000013 ffffffff 00000009 00000000
7b80: 00000008 0000000a ffffffff 0000006c c0072050 00001000 c7ec4000 c03a4af8
7ba0: c7ec5000 000200da 003fffff 0000000a 0000006c ffffffff 00000008 c033ba3e
7bc0: c7f47c4c c7f47bd0 c00725ac c0071fc8 00000002 00000041 c03a4af8 00000002
7be0: c006c354 00000000 000200da 0000001b c7f47d84 c7f47dc4 0000001a 00000014
7c00: 0000000e 00000007 00000001 60000013 c014f4b0 c7f47d84 c0393858 c7f47c44
7c20: c7f47dc4 c7f47e0e c7f47d84 c0393858 c7f47c44 c7f47e0e 532d532d c015293c
7c40: c7f47c9c 00000000 00000000 00000000 00000000 00000000 00000000 00000000
7c60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
7c80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
7ca0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
7cc0: 00000000 00000000 00000000 00000000 c7871ea0 c7801800 00000000 c7801800
7ce0: c7f47d0c c7f47cf0 c00b0d6c c01411ac c7592680 c7801800 00000000 00000009
7d00: 00000000 00000008 0000000a ffffffff 0000006c c7f47d20 c00525dc c005258c
7d20: c7592680 c033ba41 c7f47d44 c7df0e00 00000fb8 0000f698 00002ca4 00000b29
7d40: c03ad004 00000108 c7f47d70 c7f47d58 c00b6970 c0143104 c7f47d7c c7f47d78
7d60: 000d7294 c7f47ec4 c7f47d80 c00e3b68 c00b693c c033b84e 0001ed34 00004e10
7d80: 00000000 00017758 00000000 0000490c 00013150 000023dc 00000000 00002530
7da0: 00013150 00000000 00000000 00000000 00000000 00000000 00000000 00000324
7dc0: 00000548 000020d8 00001388 00000728 00000c60 00000108 0000006c 00000000
7de0: 00000000 00000000 0000f698 00002ca4 000d8800 00000fb8 000d7294 00000002
7e00: 00000b29 c7df0e00 00007b4d 00000032 00000000 00000000 00000000 00000000
7e20: 000000c9 00000152 00000836 000001ca 000001ca 00000318 c7f47e54 c7f47e48
7e40: c0075714 c007561c c1b541cf 00007b4d 00001384 00000000 00000000 00000000
7e60: 00000000 c7f47e70 00000000 00000000 00001000 c7ec4000 00020001 00000000
7e80: 000008f7 00004c54 0000094c 00000000 003ee000 35ca5000 00000018 c7df0e00
7ea0: 00000001 00000001 00000000 00001000 c7f47f70 becd8a80 c7f47f0c c7f47ec8
7ec0: c00b6c78 c00e38bc c7dbc780 c7df0e28 bf040ed8 c014f11c 00000000 00000000
7ee0: 00000000 c7f46000 c7871ea0 c00b6aa4 c7dbc780 becd8a80 c7f47f70 00001000
7f00: c7f47f3c c7f47f10 c00dc998 c00b6ab4 c7f47f70 c7dbc780 becd8a80 c7f47f70
7f20: 00001000 00001000 c7f46000 00000000 c7f47f6c c7f47f40 c009b958 c00dc8ec
7f40: c7f47f64 c7f47f50 c0027078 00000000 00000000 c7dbc780 00001000 becd8a80
7f60: c7f47fa4 c7f47f70 c009bac8 c009b8b0 00000000 00000000 00001000 00000000
7f80: 00000003 00001000 becd8a80 00000003 00000003 c00280e8 00000000 c7f47fa8
7fa0: c0027f40 c009ba94 00001000 becd8a80 00000003 becd8a80 00001000 001f1eb0
7fc0: 00001000 becd8a80 00000003 00000003 00000000 00000001 00000001 00000000
7fe0: 001f34c0 becd8a60 0000c128 00008e1c 60000010 00000003 c04bb031 c04bb431
Backtrace: 
[<c014f10c>] (__gpio_get_value+0x0/0x3c) from [<bf03e940>] (gprs_timer_func+0x24/0x104 [driver_gwzd])
[<bf03e91c>] (gprs_timer_func+0x0/0x104 [driver_gwzd]) from [<c0046790>] (run_timer_softirq+0x190/0x25c)
 r7:bf03e91c r6:00000102 r5:c7f46000 r4:c03aa600
[<c0046600>] (run_timer_softirq+0x0/0x25c) from [<c00412dc>] (__do_softirq+0x84/0x110)
[<c0041258>] (__do_softirq+0x0/0x110) from [<c00413b4>] (irq_exit+0x4c/0x6c)
[<c0041368>] (irq_exit+0x0/0x6c) from [<c0027078>] (asm_do_IRQ+0x78/0x94)
[<c0027000>] (asm_do_IRQ+0x0/0x94) from [<c0027b4c>] (__irq_svc+0x4c/0x9c)
Exception stack(0xc7f47b30 to 0xc7f47b78)
7b20:                                     c033ba40 c033ba41 c033ba41 00000075
7b40: 00000014 c033ba3e c7f47dc8 c7ec4240 00000b29 00000000 00000000 c7f47d54
7b60: 0000003c c7f47b78 c0143294 c01433bc 20000013 ffffffff
 r5:febfd000 r4:ffffffff
[<c01430f4>] (vsnprintf+0x0/0xfc0) from [<c00b6970>] (seq_printf+0x48/0x78)
[<c00b6928>] (seq_printf+0x0/0x78) from [<c00e3b68>] (meminfo_proc_show+0x2bc/0x2f0)
 r3:00004e10 r2:0001ed34 r1:c033b84e
 r4:000d7294
[<c00e38ac>] (meminfo_proc_show+0x0/0x2f0) from [<c00b6c78>] (seq_read+0x1d4/0x430)
[<c00b6aa4>] (seq_read+0x0/0x430) from [<c00dc998>] (proc_reg_read+0xbc/0xd0)
[<c00dc8dc>] (proc_reg_read+0x0/0xd0) from [<c009b958>] (vfs_read+0xb8/0x164)
[<c009b8a0>] (vfs_read+0x0/0x164) from [<c009bac8>] (sys_read+0x44/0x70)
 r8:becd8a80 r7:00001000 r6:c7dbc780 r5:00000000 r4:00000000
[<c009ba84>] (sys_read+0x0/0x70) from [<c0027f40>] (ret_fast_syscall+0x0/0x28)
 r8:c00280e8 r7:00000003 r6:00000003 r5:becd8a80 r4:00001000
Code: e24cb004 e59f3024 e1a02000 e7930180 (e5903018) 
---[ end trace 6ae2517a0f7cddee ]---
Kernel panic - not syncing: Fatal exception in interrupt
Backtrace: 
[<c002bdf8>] (dump_backtrace+0x0/0x114) from [<c02b5328>] (dump_stack+0x18/0x1c)
 r7:c014f128 r6:c014f126 r5:00000001 r4:c03a5b30
[<c02b5310>] (dump_stack+0x0/0x1c) from [<c02b5390>] (panic+0x64/0x13c)
[<c02b532c>] (panic+0x0/0x13c) from [<c002c19c>] (die+0x290/0x2cc)
 r3:00000100 r2:c7f478c0 r1:00000000 r0:c033180d
[<c002bf0c>] (die+0x0/0x2cc) from [<c002e308>] (__do_kernel_fault+0x6c/0x7c)
[<c002e29c>] (__do_kernel_fault+0x0/0x7c) from [<c002e4e8>] (do_page_fault+0x1d0/0x1e8)
 r7:c79eca80 r6:00100118 r5:c7f0d500 r4:c037e5a8
[<c002e318>] (do_page_fault+0x0/0x1e8) from [<c00272e0>] (do_DataAbort+0x3c/0x9c)
[<c00272a4>] (do_DataAbort+0x0/0x9c) from [<c0027aec>] (__dabt_svc+0x4c/0x60)
Exception stack(0xc7f47a18 to 0xc7f47a60)
7a00:                                                       00100100 000101c5
7a20: 00007fff c03afaa0 00007fff 00000018 00000006 bf03e91c c03ab40c c03ab00c
7a40: c03ab20c c7f47a6c c7f47a70 c7f47a60 bf03e940 c014f124 80000013 ffffffff
 r8:c03ab40c r7:bf03e91c r6:00000006 r5:c7f47a4c r4:ffffffff
[<c014f10c>] (__gpio_get_value+0x0/0x3c) from [<bf03e940>] (gprs_timer_func+0x24/0x104 [driver_gwzd])
[<bf03e91c>] (gprs_timer_func+0x0/0x104 [driver_gwzd]) from [<c0046790>] (run_timer_softirq+0x190/0x25c)
 r7:bf03e91c r6:00000102 r5:c7f46000 r4:c03aa600
[<c0046600>] (run_timer_softirq+0x0/0x25c) from [<c00412dc>] (__do_softirq+0x84/0x110)
[<c0041258>] (__do_softirq+0x0/0x110) from [<c00413b4>] (irq_exit+0x4c/0x6c)
[<c0041368>] (irq_exit+0x0/0x6c) from [<c0027078>] (asm_do_IRQ+0x78/0x94)
[<c0027000>] (asm_do_IRQ+0x0/0x94) from [<c0027b4c>] (__irq_svc+0x4c/0x9c)
Exception stack(0xc7f47b30 to 0xc7f47b78)
7b20:                                     c033ba40 c033ba41 c033ba41 00000075
7b40: 00000014 c033ba3e c7f47dc8 c7ec4240 00000b29 00000000 00000000 c7f47d54
7b60: 0000003c c7f47b78 c0143294 c01433bc 20000013 ffffffff
 r5:febfd000 r4:ffffffff
[<c01430f4>] (vsnprintf+0x0/0xfc0) from [<c00b6970>] (seq_printf+0x48/0x78)
[<c00b6928>] (seq_printf+0x0/0x78) from [<c00e3b68>] (meminfo_proc_show+0x2bc/0x2f0)
 r3:00004e10 r2:0001ed34 r1:c033b84e
 r4:000d7294
[<c00e38ac>] (meminfo_proc_show+0x0/0x2f0) from [<c00b6c78>] (seq_read+0x1d4/0x430)
[<c00b6aa4>] (seq_read+0x0/0x430) from [<c00dc998>] (proc_reg_read+0xbc/0xd0)
[<c00dc8dc>] (proc_reg_read+0x0/0xd0) from [<c009b958>] (vfs_read+0xb8/0x164)
[<c009b8a0>] (vfs_read+0x0/0x164) from [<c009bac8>] (sys_read+0x44/0x70)
 r8:becd8a80 r7:00001000 r6:c7dbc780 r5:00000000 r4:00000000
[<c009ba84>] (sys_read+0x0/0x70) from [<c0027f40>] (ret_fast_syscall+0x0/0x28)
 r8:c00280e8 r7:00000003 r6:00000003 r5:becd8a80 r4:00001000
[root@Linux /tmp]#cat /proc/meminfo
MemTotal:         126260 kB
MemFree:           20040 kB
Buffers:               0 kB
Cached:            96036 kB
SwapCached:            0 kB
Active:            18648 kB
Inactive:          78160 kB
Active(anon):       9180 kB
Inactive(anon):        0 kB
Active(file):       9468 kB
Inactive(file):    78160 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:           804 kB
Mapped:             1352 kB
Shmem:              8408 kB
Slab:               5000 kB
SReclaimable:       1832 kB
SUnreclaim:         3168 kB
KernelStack:         264 kB
PageTables:          108 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:       63128 kB
Committed_AS:      11428 kB
VmallocTotal:     886784 kB
VmallocUsed:        4024 kB
VmallocChunk:     881300 kB

当时的系统状态如下:
1、后台应用程序,每隔1秒会创建一个新文件,写入50K数据再读出来,以此来消耗内存
2、前端手动输入cat /proc/meminfo查看内存剩余,如上图所示
3、内核崩溃

疑问:当时内核剩余的内存空间足够,为什么当剩余低于20M的时候,内核崩溃了呢?

问题描述

问题出现的环境背景及自己尝试过哪些方法

相关代码

粘贴代码文本(请勿用截图)

你期待的结果是什么?实际看到的错误信息又是什么?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文