内存未满时Linux内核模块OOM

时间:2014-09-25 14:34:33

标签: c linux-kernel kernel-module

我编写自己的内核模块,我收到此错误: 内核恐慌 - 没有同步:内存不足,没有可用的进程...... 但是当我想看到htop时,我发现系统只使用了3G的700M。所以他们还有记忆。

我使用自定义linux内核2.6.32.61,在这个模块中我必须经常分配188 B.我使用 kmem_cache_alloc()来分配这个内存。这个错误很奇怪,因为它是随机发生的。有时我立即得到这个错误,当我启动模块时,有时模块运行几分钟。有时我得到这个错误:(见下文)。

你能帮我解决这个错误吗? 或者,您能否提供有关错误消息的更多信息(见下文)?

在这个错误信息中,我看到了我使用的功能,但是当我看到它时,它看起来很正常,所以我不知道为什么会出现这个错误。

感谢您的帮助。

PS:抱歉我的英文不好

sequencer_threa invoked oom-killer: gfp_mask=0xd0, order=0, oom_adj=0
Sep 25 14:20:51 optisat kernel: [  159.043727] sequencer_threa cpuset=/ mems_allowed=0
Sep 25 14:20:51 optisat kernel: [  159.043730] Pid: 2792, comm: sequencer_threa Not tainted 2.6.32.61 #18
Sep 25 14:20:51 optisat kernel: [  159.043731] Call Trace:
Sep 25 14:20:51 optisat kernel: [  159.043736]  [<c10919ce>] oom_kill_process+0x9e/0x2c0
Sep 25 14:20:51 optisat kernel: [  159.043738]  [<c1091fcd>] ? select_bad_process+0xad/0xf0
Sep 25 14:20:51 optisat kernel: [  159.043740]  [<c1092053>] __out_of_memory+0x43/0xb0
Sep 25 14:20:51 optisat kernel: [  159.043742]  [<c1092332>] out_of_memory+0x52/0xb0
Sep 25 14:20:51 optisat kernel: [  159.043744]  [<c109517c>] __alloc_pages_nodemask+0x55c/0x570
Sep 25 14:20:51 optisat kernel: [  159.043747]  [<c12c2387>] cache_alloc_refill+0x2ea/0x5f6
Sep 25 14:20:51 optisat kernel: [  159.043750]  [<c10b5ad6>] kmem_cache_alloc+0x136/0x150
Sep 25 14:20:51 optisat kernel: [  159.043753]  [<f9d94542>] ? alloc_ts_pkt+0x12/0x30 [optimux_rx]
Sep 25 14:20:51 optisat kernel: [  159.043756]  [<f9d94542>] alloc_ts_pkt+0x12/0x30 [optimux_rx]
Sep 25 14:20:51 optisat kernel: [  159.043758]  [<f9d9190c>] build_t2_mi_pkts+0x12c/0x360 [optimux_rx]
Sep 25 14:20:51 optisat kernel: [  159.043760]  [<c10b5a9d>] ? kmem_cache_alloc+0xfd/0x150
Sep 25 14:20:51 optisat kernel: [  159.043763]  [<f9d92f14>] parse_ref_packet+0x13d4/0x1e50 [optimux_rx]
Sep 25 14:20:51 optisat kernel: [  159.043765]  [<c12c6e02>] ? _spin_unlock_irq+0x22/0x30
Sep 25 14:20:51 optisat kernel: [  159.043768]  [<c105cbcb>] ? trace_hardirqs_on+0xb/0x10
Sep 25 14:20:51 optisat kernel: [  159.043770]  [<c1050eed>] ? sched_clock_cpu+0xed/0x160
Sep 25 14:20:51 optisat kernel: [  159.043773]  [<c1023af0>] ? finish_task_switch+0x0/0xd0
Sep 25 14:20:51 optisat kernel: [  159.043776]  [<c11ca89b>] ? e1000e_set_d3_lplu_state+0x15b/0x170
Sep 25 14:20:51 optisat kernel: [  159.043778]  [<c12c6db1>] ? _spin_unlock_irqrestore+0x31/0x60
Sep 25 14:20:51 optisat kernel: [  159.043780]  [<c105cb54>] ? trace_hardirqs_on_caller+0x114/0x180
Sep 25 14:20:51 optisat kernel: [  159.043782]  [<c105cbcb>] ? trace_hardirqs_on+0xb/0x10
Sep 25 14:20:51 optisat kernel: [  159.043784]  [<f9d96ac9>] sequencer_thread+0x239/0x4a0 [optimux_rx]
Sep 25 14:20:51 optisat kernel: [  159.043787]  [<c104b450>] ? autoremove_wake_function+0x0/0x40
Sep 25 14:20:51 optisat kernel: [  159.043790]  [<f9d96890>] ? sequencer_thread+0x0/0x4a0 [optimux_rx]
Sep 25 14:20:51 optisat kernel: [  159.043792]  [<c104aea5>] kthread+0x65/0x70
Sep 25 14:20:51 optisat kernel: [  159.043794]  [<c104ae40>] ? kthread+0x0/0x70
Sep 25 14:20:51 optisat kernel: [  159.043796]  [<c10038eb>] kernel_thread_helper+0x7/0x1c
Sep 25 14:20:51 optisat kernel: [  159.043797] Mem-Info:
Sep 25 14:20:51 optisat kernel: [  159.043798] DMA per-cpu:
Sep 25 14:20:51 optisat kernel: [  159.043799] CPU    0: hi:    0, btch:   1 usd:   0
Sep 25 14:20:51 optisat kernel: [  159.043800] CPU    1: hi:    0, btch:   1 usd:   0
Sep 25 14:20:51 optisat kernel: [  159.043801] CPU    2: hi:    0, btch:   1 usd:   0
Sep 25 14:20:51 optisat kernel: [  159.043802] CPU    3: hi:    0, btch:   1 usd:   0
Sep 25 14:20:51 optisat kernel: [  159.043803] Normal per-cpu:
Sep 25 14:20:51 optisat kernel: [  159.043804] CPU    0: hi:  186, btch:  31 usd: 144
Sep 25 14:20:51 optisat kernel: [  159.043805] CPU    1: hi:  186, btch:  31 usd: 197
Sep 25 14:20:51 optisat kernel: [  159.043806] CPU    2: hi:  186, btch:  31 usd: 143
Sep 25 14:20:51 optisat kernel: [  159.043807] CPU    3: hi:  186, btch:  31 usd:   0
Sep 25 14:20:51 optisat kernel: [  159.043808] HighMem per-cpu:
Sep 25 14:20:51 optisat kernel: [  159.043809] CPU    0: hi:  186, btch:  31 usd: 172
Sep 25 14:20:51 optisat kernel: [  159.043810] CPU    1: hi:  186, btch:  31 usd: 170
Sep 25 14:20:51 optisat kernel: [  159.043811] CPU    2: hi:  186, btch:  31 usd: 169
Sep 25 14:20:51 optisat kernel: [  159.043812] CPU    3: hi:  186, btch:  31 usd:   0
Sep 25 14:20:51 optisat kernel: [  159.043814] active_anon:4330 inactive_anon:1137 isolated_anon:0
Sep 25 14:20:51 optisat kernel: [  159.043815]  active_file:1373 inactive_file:2388 isolated_file:0
Sep 25 14:20:51 optisat kernel: [  159.043815]  unevictable:0 dirty:79 writeback:0 unstable:0
Sep 25 14:20:51 optisat kernel: [  159.043816]  free:607286 slab_reclaimable:2764 slab_unreclaimable:190380
Sep 25 14:20:51 optisat kernel: [  159.043816]  mapped:1813 shmem:59 pagetables:160 bounce:0
Sep 25 14:20:51 optisat kernel: [  159.043819] DMA free:3460kB min:64kB low:80kB high:96kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15668kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:0kB slab_unreclaimable:11592kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
Sep 25 14:20:51 optisat kernel: [  159.043822] lowmem_reserve[]: 0 859 3236 3236
Sep 25 14:20:51 optisat kernel: [  159.043826] Normal free:2732kB min:3716kB low:4644kB high:5572kB active_anon:0kB inactive_anon:0kB active_file:4kB inactive_file:68kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:879840kB mlocked:0kB dirty:0kB writeback:0kB mapped:4kB shmem:0kB slab_reclaimable:11056kB slab_unreclaimable:749928kB kernel_stack:952kB pagetables:640kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:28 all_unreclaimable? no
Sep 25 14:20:51 optisat kernel: [  159.043829] lowmem_reserve[]: 0 0 19015 19015
Sep 25 14:20:51 optisat kernel: [  159.043833] HighMem free:2422952kB min:512kB low:3080kB high:5652kB active_anon:17320kB inactive_anon:4548kB active_file:5488kB inactive_file:9484kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:2433944kB mlocked:0kB dirty:316kB writeback:0kB mapped:7248kB shmem:236kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
Sep 25 14:20:51 optisat kernel: [  159.043836] lowmem_reserve[]: 0 0 0 0
Sep 25 14:20:51 optisat kernel: [  159.043838] DMA: 2*4kB 2*8kB 1*16kB 2*32kB 2*64kB 3*128kB 1*256kB 1*512kB 0*1024kB 1*2048kB 0*4096kB = 3432kB
Sep 25 14:20:51 optisat kernel: [  159.043844] Normal: 16*4kB 1*8kB 0*16kB 0*32kB 1*64kB 1*128kB 0*256kB 1*512kB 0*1024kB 1*2048kB 0*4096kB = 2824kB
Sep 25 14:20:51 optisat kernel: [  159.043850] HighMem: 1485*4kB 808*8kB 471*16kB 204*32kB 99*64kB 36*128kB 5*256kB 1*512kB 2*1024kB 3*2048kB 580*4096kB = 2423076kB
Sep 25 14:20:51 optisat kernel: [  159.043855] 3815 total pagecache pages
Sep 25 14:20:51 optisat kernel: [  159.043856] 0 pages in swap cache
Sep 25 14:20:51 optisat kernel: [  159.043857] Swap cache stats: add 0, delete 0, find 0/0
Sep 25 14:20:51 optisat kernel: [  159.043858] Free swap  = 1316856kB
Sep 25 14:20:51 optisat kernel: [  159.043859] Total swap = 1316856kB
Sep 25 14:20:51 optisat kernel: [  159.048960] 849904 pages RAM
Sep 25 14:20:51 optisat kernel: [  159.048961] 622594 pages HighMem
Sep 25 14:20:51 optisat kernel: [  159.048962] 35058 pages reserved
Sep 25 14:20:51 optisat kernel: [  159.048963] 8458 pages shared
Sep 25 14:20:51 optisat kernel: [  159.048964] 202716 pages non-shared
Sep 25 14:20:51 optisat kernel: [  159.048965] Out of memory: kill process 2797 (make) score 2343 or a child
Sep 25 14:20:51 optisat kernel: [  159.049026] Killed process 2998 (beam.smp)
Sep 25 14:20:51 optisat kernel: [  159.094076] sequencer_threa invoked oom-killer: gfp_mask=0xd0, order=0, oom_adj=0
Sep 25 14:20:51 optisat kernel: [  159.094080] sequencer_threa cpuset=/ mems_allowed=0
Sep 25 14:20:51 optisat kernel: [  159.094082] Pid: 2792, comm: sequencer_threa Not tainted 2.6.32.61 #18
Sep 25 14:20:51 optisat kernel: [  159.094084] Call Trace:
Sep 25 14:20:51 optisat kernel: [  159.094088]  [<c10919ce>] oom_kill_process+0x9e/0x2c0
Sep 25 14:20:51 optisat kernel: [  159.094090]  [<c1091fcd>] ? select_bad_process+0xad/0xf0
Sep 25 14:20:51 optisat kernel: [  159.094092]  [<c1092053>] __out_of_memory+0x43/0xb0
Sep 25 14:20:51 optisat kernel: [  159.094094]  [<c1092332>] out_of_memory+0x52/0xb0
Sep 25 14:20:51 optisat kernel: [  159.094097]  [<c109517c>] __alloc_pages_nodemask+0x55c/0x570
Sep 25 14:20:51 optisat kernel: [  159.094100]  [<c12c2387>] cache_alloc_refill+0x2ea/0x5f6
Sep 25 14:20:51 optisat kernel: [  159.094103]  [<c10b5ad6>] kmem_cache_alloc+0x136/0x150
Sep 25 14:20:51 optisat kernel: [  159.094107]  [<f9d94542>] ? alloc_ts_pkt+0x12/0x30 [optimux_rx]
Sep 25 14:20:51 optisat kernel: [  159.094109]  [<f9d94542>] alloc_ts_pkt+0x12/0x30 [optimux_rx]
Sep 25 14:20:51 optisat kernel: [  159.094111]  [<f9d92b04>] parse_ref_packet+0xfc4/0x1e50 [optimux_rx]
Sep 25 14:20:51 optisat kernel: [  159.094114]  [<c105a89b>] ? trace_hardirqs_off+0xb/0x10
Sep 25 14:20:51 optisat kernel: [  159.094116]  [<c1050f05>] ? sched_clock_cpu+0x105/0x160
Sep 25 14:20:51 optisat kernel: [  159.094119]  [<c1050eed>] ? sched_clock_cpu+0xed/0x160
Sep 25 14:20:51 optisat kernel: [  159.094121]  [<c10b45e3>] ? cache_free_debugcheck+0xe3/0x300
Sep 25 14:20:51 optisat kernel: [  159.094124]  [<c113d465>] ? __debug_check_no_obj_freed+0x125/0x190
Sep 25 14:20:51 optisat kernel: [  159.094125]  [<c105a89b>] ? trace_hardirqs_off+0xb/0x10
Sep 25 14:20:51 optisat kernel: [  159.094128]  [<c105cbcb>] ? trace_hardirqs_on+0xb/0x10
Sep 25 14:20:51 optisat kernel: [  159.094130]  [<f9d969da>] sequencer_thread+0x14a/0x4a0 [optimux_rx]
Sep 25 14:20:51 optisat kernel: [  159.094134]  [<c104b450>] ? autoremove_wake_function+0x0/0x40
Sep 25 14:20:51 optisat kernel: [  159.094136]  [<f9d96890>] ? sequencer_thread+0x0/0x4a0 [optimux_rx]
Sep 25 14:20:51 optisat kernel: [  159.094139]  [<c104aea5>] kthread+0x65/0x70
Sep 25 14:20:51 optisat kernel: [  159.094141]  [<c104ae40>] ? kthread+0x0/0x70
Sep 25 14:20:51 optisat kernel: [  159.094143]  [<c10038eb>] kernel_thread_helper+0x7/0x1c
Sep 25 14:20:51 optisat kernel: [  159.094144] Mem-Info:
Sep 25 14:20:51 optisat kernel: [  159.094145] DMA per-cpu:
Sep 25 14:20:51 optisat kernel: [  159.094146] CPU    0: hi:    0, btch:   1 usd:   0
Sep 25 14:20:51 optisat kernel: [  159.094147] CPU    1: hi:    0, btch:   1 usd:   0
Sep 25 14:20:51 optisat kernel: [  159.094148] CPU    2: hi:    0, btch:   1 usd:   0
Sep 25 14:20:51 optisat kernel: [  159.094149] CPU    3: hi:    0, btch:   1 usd:   0
Sep 25 14:20:51 optisat kernel: [  159.094150] Normal per-cpu:
Sep 25 14:20:51 optisat kernel: [  159.094152] CPU    0: hi:  186, btch:  31 usd: 165
Sep 25 14:20:51 optisat kernel: [  159.094153] CPU    1: hi:  186, btch:  31 usd: 204
Sep 25 14:20:51 optisat kernel: [  159.094154] CPU    2: hi:  186, btch:  31 usd: 143
Sep 25 14:20:51 optisat kernel: [  159.094155] CPU    3: hi:  186, btch:  31 usd:  33
Sep 25 14:20:51 optisat kernel: [  159.094156] HighMem per-cpu:
Sep 25 14:20:51 optisat kernel: [  159.094156] CPU    0: hi:  186, btch:  31 usd: 172
Sep 25 14:20:51 optisat kernel: [  159.094157] CPU    1: hi:  186, btch:  31 usd: 170
Sep 25 14:20:51 optisat kernel: [  159.094158] CPU    2: hi:  186, btch:  31 usd: 169
Sep 25 14:20:51 optisat kernel: [  159.094160] CPU    3: hi:  186, btch:  31 usd: 116
Sep 25 14:20:51 optisat kernel: [  159.094162] active_anon:4329 inactive_anon:1041 isolated_anon:0
Sep 25 14:20:51 optisat kernel: [  159.094163]  active_file:1394 inactive_file:2381 isolated_file:0
Sep 25 14:20:51 optisat kernel: [  159.094163]  unevictable:0 dirty:92 writeback:0 unstable:0
Sep 25 14:20:51 optisat kernel: [  159.094164]  free:607290 slab_reclaimable:2518 slab_unreclaimable:190594
Sep 25 14:20:51 optisat kernel: [  159.094165]  mapped:1744 shmem:59 pagetables:155 bounce:0
Sep 25 14:20:51 optisat kernel: [  159.094168] DMA free:3460kB min:64kB low:80kB high:96kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15668kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:0kB slab_unreclaimable:11592kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
Sep 25 14:20:51 optisat kernel: [  159.094171] lowmem_reserve[]: 0 859 3236 3236
Sep 25 14:20:51 optisat kernel: [  159.094175] Normal free:2872kB min:3716kB low:4644kB high:5572kB active_anon:0kB inactive_anon:0kB active_file:4kB inactive_file:68kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:879840kB mlocked:0kB dirty:0kB writeback:0kB mapped:4kB shmem:0kB slab_reclaimable:10072kB slab_unreclaimable:750784kB kernel_stack:952kB pagetables:620kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
Sep 25 14:20:51 optisat kernel: [  159.094179] lowmem_reserve[]: 0 0 19015 19015
Sep 25 14:20:51 optisat kernel: [  159.094183] HighMem free:2422828kB min:512kB low:3080kB high:5652kB active_anon:17316kB inactive_anon:4164kB active_file:5572kB inactive_file:9456kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:2433944kB mlocked:0kB dirty:368kB writeback:0kB mapped:6972kB shmem:236kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
Sep 25 14:20:51 optisat kernel: [  159.094186] lowmem_reserve[]: 0 0 0 0
Sep 25 14:20:51 optisat kernel: [  159.094188] DMA: 2*4kB 2*8kB 1*16kB 2*32kB 2*64kB 3*128kB 1*256kB 1*512kB 0*1024kB 1*2048kB 0*4096kB = 3432kB
Sep 25 14:20:51 optisat kernel: [  159.094194] Normal: 28*4kB 1*8kB 0*16kB 0*32kB 1*64kB 1*128kB 0*256kB 1*512kB 0*1024kB 1*2048kB 0*4096kB = 2872kB
Sep 25 14:20:51 optisat kernel: [  159.094200] HighMem: 1454*4kB 808*8kB 471*16kB 204*32kB 99*64kB 36*128kB 5*256kB 1*512kB 2*1024kB 3*2048kB 580*4096kB = 2422952kB
Sep 25 14:20:51 optisat kernel: [  159.094206] 3790 total pagecache pages
Sep 25 14:20:51 optisat kernel: [  159.094207] 0 pages in swap cache
Sep 25 14:20:51 optisat kernel: [  159.094208] Swap cache stats: add 0, delete 0, find 0/0
Sep 25 14:20:51 optisat kernel: [  159.094209] Free swap  = 1316856kB
Sep 25 14:20:51 optisat kernel: [  159.094209] Total swap = 1316856kB
Sep 25 14:20:51 optisat kernel: [  159.099045] 849904 pages RAM
Sep 25 14:20:51 optisat kernel: [  159.099046] 622594 pages HighMem
Sep 25 14:20:51 optisat kernel: [  159.099047] 35058 pages reserved
Sep 25 14:20:51 optisat kernel: [  159.099048] 8161 pages shared
Sep 25 14:20:51 optisat kernel: [  159.099048] 202610 pages non-shared
Sep 25 14:20:51 optisat kernel: [  159.099050] Out of memory: kill process 2459 (dbus-daemon) score 743 or a child
Sep 25 14:20:51 optisat kernel: [  159.099114] Killed process 2459 (dbus-daemon)
Sep 25 14:20:51 optisat kernel: [  159.112749] htop invoked oom-killer: gfp_mask=0x800d0, order=0, oom_adj=0
Sep 25 14:20:51 optisat kernel: [  159.112753] htop cpuset=/ mems_allowed=0
Sep 25 14:20:51 optisat kernel: [  159.112755] Pid: 3074, comm: htop Not tainted 2.6.32.61 #18
Sep 25 14:20:51 optisat kernel: [  159.112756] Call Trace:
Sep 25 14:20:51 optisat kernel: [  159.112761]  [<c10919ce>] oom_kill_process+0x9e/0x2c0
Sep 25 14:20:51 optisat kernel: [  159.112764]  [<c1091fcd>] ? select_bad_process+0xad/0xf0
Sep 25 14:20:51 optisat kernel: [  159.112766]  [<c1092053>] __out_of_memory+0x43/0xb0
Sep 25 14:20:51 optisat kernel: [  159.112768]  [<c1092332>] out_of_memory+0x52/0xb0
Sep 25 14:20:51 optisat kernel: [  159.112770]  [<c109517c>] __alloc_pages_nodemask+0x55c/0x570
Sep 25 14:20:51 optisat kernel: [  159.112773]  [<c1101430>] ? proc_info_read+0x0/0xc0
Sep 25 14:20:51 optisat kernel: [  159.112776]  [<c10951a7>] __get_free_pages+0x17/0x30
Sep 25 14:20:51 optisat kernel: [  159.112778]  [<c110146b>] proc_info_read+0x3b/0xc0
Sep 25 14:20:51 optisat kernel: [  159.112780]  [<c1101430>] ? proc_info_read+0x0/0xc0
Sep 25 14:20:51 optisat kernel: [  159.112783]  [<c10bfa34>] vfs_read+0x84/0x180
Sep 25 14:20:51 optisat kernel: [  159.112785]  [<c1101430>] ? proc_info_read+0x0/0xc0
Sep 25 14:20:51 optisat kernel: [  159.112787]  [<c10bfb68>] sys_read+0x38/0x70
Sep 25 14:20:51 optisat kernel: [  159.112789]  [<c1002cd4>] sysenter_do_call+0x12/0x32
Sep 25 14:20:51 optisat kernel: [  159.112790] Mem-Info:
Sep 25 14:20:51 optisat kernel: [  159.112791] DMA per-cpu:
Sep 25 14:20:51 optisat kernel: [  159.112792] CPU    0: hi:    0, btch:   1 usd:   0
Sep 25 14:20:51 optisat kernel: [  159.112794] CPU    1: hi:    0, btch:   1 usd:   0
Sep 25 14:20:51 optisat kernel: [  159.112795] CPU    2: hi:    0, btch:   1 usd:   0
Sep 25 14:20:51 optisat kernel: [  159.112796] CPU    3: hi:    0, btch:   1 usd:   0
Sep 25 14:20:51 optisat kernel: [  159.112797] Normal per-cpu:
Sep 25 14:20:51 optisat kernel: [  159.112798] CPU    0: hi:  186, btch:  31 usd:  53
Sep 25 14:20:51 optisat kernel: [  159.112800] CPU    1: hi:  186, btch:  31 usd: 175
Sep 25 14:20:51 optisat kernel: [  159.112801] CPU    2: hi:  186, btch:  31 usd: 160
Sep 25 14:20:51 optisat kernel: [  159.112802] CPU    3: hi:  186, btch:  31 usd:  57
Sep 25 14:20:51 optisat kernel: [  159.112803] HighMem per-cpu:
Sep 25 14:20:51 optisat kernel: [  159.112804] CPU    0: hi:  186, btch:  31 usd: 172
Sep 25 14:20:51 optisat kernel: [  159.112805] CPU    1: hi:  186, btch:  31 usd: 170
Sep 25 14:20:51 optisat kernel: [  159.112806] CPU    2: hi:  186, btch:  31 usd: 157
Sep 25 14:20:51 optisat kernel: [  159.112807] CPU    3: hi:  186, btch:  31 usd: 113
Sep 25 14:20:51 optisat kernel: [  159.112810] active_anon:4201 inactive_anon:1114 isolated_anon:0
Sep 25 14:20:51 optisat kernel: [  159.112811]  active_file:1394 inactive_file:2326 isolated_file:0
Sep 25 14:20:51 optisat kernel: [  159.112811]  unevictable:0 dirty:92 writeback:0 unstable:0
Sep 25 14:20:51 optisat kernel: [  159.112812]  free:607509 slab_reclaimable:2518 slab_unreclaimable:190569
Sep 25 14:20:51 optisat kernel: [  159.112813]  mapped:1744 shmem:59 pagetables:155 bounce:0
Sep 25 14:20:51 optisat kernel: [  159.112816] DMA free:3460kB min:64kB low:80kB high:96kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15668kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:0kB slab_unreclaimable:11592kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? yes
Sep 25 14:20:51 optisat kernel: [  159.112819] lowmem_reserve[]: 0 859 3236 3236
Sep 25 14:20:51 optisat kernel: [  159.112824] Normal free:3500kB min:3716kB low:4644kB high:5572kB active_anon:0kB inactive_anon:0kB active_file:4kB inactive_file:68kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:879840kB mlocked:0kB dirty:0kB writeback:0kB mapped:4kB shmem:0kB slab_reclaimable:10072kB slab_unreclaimable:750784kB kernel_stack:952kB pagetables:620kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
Sep 25 14:20:51 optisat kernel: [  159.112828] lowmem_reserve[]: 0 0 19015 19015
Sep 25 14:20:51 optisat kernel: [  159.112832] HighMem free:2423076kB min:512kB low:3080kB high:5652kB active_anon:16804kB inactive_anon:4456kB active_file:5572kB inactive_file:9236kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:2433944kB mlocked:0kB dirty:368kB writeback:0kB mapped:6972kB shmem:236kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:96 all_unreclaimable? no
Sep 25 14:20:51 optisat kernel: [  159.112836] lowmem_reserve[]: 0 0 0 0
Sep 25 14:20:51 optisat kernel: [  159.112838] DMA: 2*4kB 2*8kB 1*16kB 2*32kB 2*64kB 3*128kB 1*256kB 1*512kB 0*1024kB 1*2048kB 0*4096kB = 3432kB
Sep 25 14:20:51 optisat kernel: [  159.112844] Normal: 161*4kB 12*8kB 1*16kB 0*32kB 1*64kB 1*128kB 0*256kB 1*512kB 0*1024kB 1*2048kB 0*4096kB = 3508kB
Sep 25 14:20:51 optisat kernel: [  159.112850] HighMem: 1440*4kB 802*8kB 471*16kB 211*32kB 101*64kB 36*128kB 5*256kB 1*512kB 2*1024kB 3*2048kB 580*4096kB = 2423200kB
Sep 25 14:20:51 optisat kernel: [  159.112856] 3790 total pagecache pages
Sep 25 14:20:51 optisat kernel: [  159.112857] 0 pages in swap cache
Sep 25 14:20:51 optisat kernel: [  159.112858] Swap cache stats: add 0, delete 0, find 0/0
Sep 25 14:20:51 optisat kernel: [  159.112859] Free swap  = 1316856kB
Sep 25 14:20:51 optisat kernel: [  159.112860] Total swap = 1316856kB
Sep 25 14:20:51 optisat kernel: [  159.117742] 849904 pages RAM
Sep 25 14:20:51 optisat kernel: [  159.117743] 622594 pages HighMem
Sep 25 14:20:51 optisat kernel: [  159.117744] 35058 pages reserved
Sep 25 14:20:51 optisat kernel: [  159.117745] 8060 pages shared
Sep 25 14:20:51 optisat kernel: [  159.117746] 202704 pages non-shared
Sep 25 14:20:51 optisat kernel: [  159.117748] Out of memory: kill process 1897 (rpc.statd) score 601 or a child
Sep 25 14:20:51 optisat kernel: [  159.117808] Killed process 1897 (rpc.statd)

1 个答案:

答案 0 :(得分:0)

有几个原因可能会导致内存不足的问题,首先是缺少kmem_cache_create()请求足够大的连续内存的可用性。请注意,kmem_cache_create()使用SLAB层,因为我怀疑从提供的输出。

dmesg输出似乎缺少一行后跟一个类似于下面的表,这个表应该提供有关导致OOM错误的进程以及oom_adj得分和使用的驻留内存的更多信息。这个过程。 oom_adj_score越高,这个过程就越有可能被杀死。

kernel: [ pid ]   uid  tgid total_vm      rss cpu oom_adj oom_score_adj name 

尝试使用以下命令来获取dmesg输出中的更多信息:     dmesg -l info,notice,warn,err,crit,alert,emerg

此外,您可能还需要考虑在/etc/sysctl.conf文件中设置以下内容并运行sysctl -p(以避免重新启动):

vm.overcommit_memory = 2
vm.overcommit_ratio = 80

请参阅此link