每当我的 Ubuntu 系统接近内存耗尽时,它总是会崩溃并重置用户登录。
我检查了日志并发现了以下两条消息:
oom_reaper: reaped process 2558094 (brave), now anon-rss:180kB, file-rss:636kB, shmem- systemd-journald[354]: /dev/kmsg buffer overrun, some messages lost.
[email protected]: A process of this unit has been killed by the OOM killer.
oom_reaper 仅记录了 brave 的终止,但接下来的日志显示 gnome shell 也已终止,这可能会导致完全重置。
Brave 可能是罪魁祸首吗?还是我的看法不正确。
编辑:我似乎无法通过打开 100 多个选项卡来重现崩溃,完整的调用跟踪:
Apr 15 16:43:39 zenbook-jeroen kernel: [370346.813819] pulseaudio invoked oom-killer: gfp_mask=0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), order=0, oom_score_adj=0
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.813828] CPU: 15 PID: 2623891 Comm: pulseaudio Tainted: G O 6.5.0-26-generic #26~22.04.1-Ubuntu
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.813832] Hardware name: ASUSTeK COMPUTER INC. Zenbook UM5401QA_UM5401QA/UM5401QA, BIOS UM5401QA_UM5401QA.300 09/10/2021
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.813834] Call Trace:
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.813836] <TASK>
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.813841] dump_stack_lvl+0x48/0x70
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.813848] dump_stack+0x10/0x20
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.813851] dump_header+0x50/0x290
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.813856] oom_kill_process+0x10d/0x1c0
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.813860] out_of_memory+0x103/0x350
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.813863] __alloc_pages_may_oom+0x112/0x1e0
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.813869] __alloc_pages_slowpath.constprop.0+0x46f/0x9a0
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.813874] __alloc_pages+0x31d/0x350
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.813879] alloc_pages+0x91/0x1a0
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.813883] folio_alloc+0x1d/0x60
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.813887] filemap_alloc_folio+0x31/0x40
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.813891] __filemap_get_folio+0xd8/0x230
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.813895] filemap_fault+0x454/0x750
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.813898] ? srso_alias_return_thunk+0x5/0x7f
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.813905] __do_fault+0x39/0x150
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.813910] do_read_fault+0x11d/0x170
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.813914] do_fault+0xf3/0x170
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.813918] handle_pte_fault+0x74/0x170
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.813921] __handle_mm_fault+0x65c/0x720
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.813927] handle_mm_fault+0x164/0x360
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.813930] do_user_addr_fault+0x212/0x6b0
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.813934] ? srso_alias_return_thunk+0x5/0x7f
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.813938] exc_page_fault+0x83/0x1b0
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.813943] asm_exc_page_fault+0x27/0x30
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.813948] RIP: 0033:0x713644238b30
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.813989] Code: Unable to access opcode bytes at 0x713644238b06.
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.813991] RSP: 002b:00007ffc298baec8 EFLAGS: 00010246
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.813994] RAX: 0000000000000029 RBX: 000061b39f184ce0 RCX: 0000000000000001
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.813996] RDX: 0000000000000029 RSI: 000061b39f0dcf20 RDI: 000061b39f16b3a0
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.813998] RBP: 000061b39f16b3a0 R08: 000061b39f184ce0 R09: 0000000000000029
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.814000] R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.814001] R13: 0000000000000000 R14: 0000000000000001 R15: 000061b39ee1f5e8
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.814007] </TASK>
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.814009] Mem-Info:
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.814011] active_anon:1607856 inactive_anon:1206507 isolated_anon:0
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.814011] active_file:0 inactive_file:319 isolated_file:0
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.814011] unevictable:153277 dirty:19 writeback:0
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.814011] slab_reclaimable:145240 slab_unreclaimable:210891
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.814011] mapped:131197 shmem:352061 pagetables:99782
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.814011] sec_pagetables:0 bounce:0
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.814011] kernel_misc_reclaimable:0
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.814011] free:32858 free_pcp:42 free_cma:0
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.814017] Node 0 active_anon:6431424kB inactive_anon:4826028kB active_file:0kB inactive_file:1276kB unevictable:613108kB isolated(anon):0kB isolated(file):0kB mapped:524788kB dirty:76kB writeback:0kB shmem:1408244kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 90112kB writeback_tmp:0kB kernel_stack:144528kB pagetables:399128kB sec_pagetables:0kB all_unreclaimable? no
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.814023] Node 0 DMA free:13312kB boost:0kB min:64kB low:80kB high:96kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15996kB managed:15360kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.814030] lowmem_reserve[]: 0 2857 15291 15291 15291
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.814037] Node 0 DMA32 free:64360kB boost:2048kB min:14664kB low:17816kB high:20968kB reserved_highatomic:0KB active_anon:525340kB inactive_anon:1225660kB active_file:0kB inactive_file:0kB unevictable:4628kB writepending:4kB present:3060756kB managed:2994812kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.814043] lowmem_reserve[]: 0 0 12433 12433 12433
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.814049] Node 0 Normal free:53760kB boost:0kB min:54900kB low:68624kB high:82348kB reserved_highatomic:0KB active_anon:5906504kB inactive_anon:3599948kB active_file:0kB inactive_file:1376kB unevictable:608480kB writepending:72kB present:13077504kB managed:12740348kB mlocked:100kB bounce:0kB free_pcp:168kB local_pcp:0kB free_cma:0kB
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.814056] lowmem_reserve[]: 0 0 0 0 0
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.814062] Node 0 DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 1*1024kB (U) 2*2048kB (UM) 2*4096kB (M) = 13312kB
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.814080] Node 0 DMA32: 403*4kB (UME) 1299*8kB (UME) 690*16kB (UME) 337*32kB (UME) 241*64kB (UME) 107*128kB (UME) 8*256kB (UM) 0*512kB 0*1024kB 0*2048kB 0*4096kB = 64996kB
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.814102] Node 0 Normal: 1112*4kB (UME) 1401*8kB (UME) 951*16kB (UME) 441*32kB (UME) 99*64kB (UME) 22*128kB (UME) 10*256kB (UM) 0*512kB 0*1024kB 0*2048kB 0*4096kB = 56696kB
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.814123] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.814126] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.814128] 375985 total pagecache pages
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.814129] 21758 pages in swap cache
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.814130] Free swap = 20kB
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.814131] Total swap = 2097148kB
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.814133] 4038564 pages RAM
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.814134] 0 pages HighMem/MovableOnly
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.814135] 100934 pages reserved
Apr 15 16:43:40 zenbook-jeroen kernel: [370346.814136] 0 pages hwpoisoned