😡 编译个邮件服务器 docker image 成功给我服务器 OOM Killer 唤醒了

编译到一半一看怎么被 SIGKILL 了,我寻思我也没杀它啊

然后看了看 kmsg,编译个软件 8G 内存你都能吃完

rustc invoked oom-killer: gfp_mask=0x140dca(GFP_HIGHUSER_MOVABLE|__GFP_ZERO|__GFP_COMP), order=0, oom_score_adj=-500
CPU: 3 UID: 0 PID: 20945 Comm: rustc Tainted: G O 7.0.11-xanmod1 #1-NixOS PREEMPT(lazy)
Tainted: [O]=OOT_MODULE
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS edk2-20230301gitf80f052277c8-1.fc38 03/01/2023
Call Trace:
<TASK>
dump_stack_lvl+0x5d/0x80
dump_header+0x43/0x1b3
oom_kill_process.cold+0x8/0x87
out_of_memory+0x1fb/0x540
__alloc_frozen_pages_noprof+0x1439/0x15f0
alloc_pages_mpol+0x86/0x170
vma_alloc_folio_noprof+0x6e/0xd0
folio_prealloc+0x66/0x110
do_anonymous_page+0x318/0x830
? __pte_offset_map+0x1b/0x100
__handle_mm_fault+0xb5d/0xf80
? psi_task_switch+0x113/0x290
handle_mm_fault+0xe7/0x2e0
do_user_addr_fault+0x21a/0x690
exc_page_fault+0x6e/0x180
asm_exc_page_fault+0x26/0x30
RIP: 0033:0x7ccc0bcd3e3f
Code: c0 41 21 e8 44 89 c0 c1 e8 05 45 8b 4c 85 00 44 89 c1 83 e1 1f 41 0f a3 c9 72 48 4c 01 f3 4f 8d 0c 40 49 c1 e1 04 4f 8d 04 0c <4b> 89 14 0c 0f b6 53 08 66 43 89 54 0c 08 0f b6 53 08 44 8d 4a fc
RSP: 002b:00007ccc01571d40 EFLAGS: 00010212
RAX: 00000000000d0e60 RBX: 00007cc89f964ca0 RCX: 0000000000000016
RDX: 00007ccafb8f0b60 RSI: 00007cc9427217d8 RDI: 00007ccc01571dc0
RBP: 0000000001ffffff R08: 00007cc84f965020 R09: 000000004e564420
R10: 0000000000080000 R11: 00007cc8b1400880 R12: 00007cc801400c00
R13: 00007cc861400c00 R14: 00007cc881400880 R15: 00000000fdc00000
</TASK>
Mem-Info:
active_anon:576862 inactive_anon:340300 isolated_anon:0
active_file:16790 inactive_file:285993 isolated_file:0
unevictable:21629 dirty:486 writeback:0
slab_reclaimable:45319 slab_unreclaimable:90723
mapped:74820 shmem:1059 pagetables:13754
sec_pagetables:0 bounce:0
kernel_misc_reclaimable:0
free:100298 free_pcp:2073 free_cma:0
Node 0 active_anon:2307448kB inactive_anon:1360972kB active_file:67160kB inactive_file:1143972kB unevictable:86516kB isolated(anon):0kB isolated(file):0kB mapped:299280kB dirty:1944kB writeback:0kB shmem:4236kB shmem_thp:0kB shmem_pmdmapped:0kB anon_thp:0kB kernel_stack:12184kB pagetables:55016kB sec_pagetables:0kB all_unreclaimable? no Balloon:0kB
Node 0 DMA free:13340kB boost:0kB min:232kB low:288kB high:344kB reserved_highatomic:0KB free_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB zspages:0kB present:15000kB managed:14364kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
lowmem_reserve[]: 0 1919 7864 7864 7864
Node 0 DMA32 free:88344kB boost:36864kB min:69072kB low:77124kB high:85176kB reserved_highatomic:0KB free_highatomic:0KB active_anon:625164kB inactive_anon:515756kB active_file:1468kB inactive_file:420764kB unevictable:0kB writepending:512kB zspages:194800kB present:2072888kB managed:1965180kB mlocked:0kB bounce:0kB free_pcp:5000kB local_pcp:4kB free_cma:0kB
lowmem_reserve[]: 0 0 5945 5945 5945
Node 0 Normal free:299508kB boost:199924kB min:299704kB low:324648kB high:349592kB reserved_highatomic:0KB free_highatomic:0KB active_anon:1682272kB inactive_anon:845460kB active_file:65696kB inactive_file:723204kB unevictable:86516kB writepending:1468kB zspages:1661296kB present:6291456kB managed:6087804kB mlocked:0kB bounce:0kB free_pcp:3292kB local_pcp:628kB free_cma:0kB
lowmem_reserve[]: 0 0 0 0 0
Node 0 DMA: 14kB (U) 18kB (U) 116kB (U) 032kB 064kB 0128kB 0256kB 0512kB 11024kB (U) 22048kB (M) 24096kB (M) = 13340kB
Node 0 DMA32: 1819
4kB (UE) 14138kB (UME) 84216kB (UME) 52832kB (UME) 34764kB (UME) 96128kB (UME) 17256kB (UM) 1512kB (M) 01024kB 02048kB 04096kB = 88308kB
Node 0 Normal: 32754kB (UME) 46838kB (UME) 483216kB (UME) 212232kB (UME) 69664kB (UME) 250128kB (UME) 57256kB (UME) 10512kB (E) 51024kB (E) 12048kB (E) 0*4096kB = 299204kB
Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB
Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
326113 total pagecache pages
1662 pages in swap cache
Free swap = 0kB
Total swap = 8067068kB
2094836 pages RAM
0 pages HighMem/MovableOnly
77999 pages reserved
0 pages cma reserved
0 pages hwpoisoned
Memory allocations (profiling is currently turned on):
1.92 GiB 503382 mm/memory.c:4559 func:__alloc_swap_folio
1.66 GiB 434864 mm/zsmalloc.c:239 func:alloc_zpdesc
1.57 GiB 412066 mm/memory.c:1220 func:folio_prealloc
1.05 GiB 276526 mm/readahead.c:189 func:ractl_alloc_folio
493 MiB 44749 mm/slub.c:3292 func:alloc_slab_page
114 MiB 29226 mm/compaction.c:1847 func:compaction_alloc
86.2 MiB 22074 mm/filemap.c:2012 func:__filemap_get_folio_mpol
75.4 MiB 19295 fs/btrfs/compression.c:438 [btrfs] func:add_ra_bio_pages
73.5 MiB 18816 mm/percpu-vm.c:95 func:pcpu_alloc_pages
47.4 MiB 12140 arch/x86/mm/pgtable.c:18 func:pte_alloc_one
Memory cgroup min protection 0kB -- low protection 0kB
Tasks state (memory values in pages):
[ pid ] uid tgid total_vm rss rss_anon rss_file rss_shmem pgtables_bytes swapents oom_score_adj name
[ 1010] 4 1010 2641 54 1 53 0 69632 365 -900 dbus-broker-lau
[ 1011] 4 1011 1321 403 99 304 0 53248 282 -900 dbus-broker
[ 1034] 0 1034 4918 931 28 903 0 94208 329 0 systemd-logind
[ 1205] 0 1205 2990 11 0 11 0 65536 57 0 agetty
[ 1206] 0 1206 3116 40 0 40 0 65536 107 0 agetty
[ 38057] 0 38057 2766 938 93 845 0 65536 213 -1000 sshd
[ 38068] 0 38068 27318 2765 129 2634 2 114688 199 -250 systemd-journal
[ 38071] 60 38071 4600 446 1 445 0 77824 448 0 nginx
[ 38080] 60 38080 4654 197 0 197 0 69632 510 0 nginx
[ 38081] 60 38081 4654 188 0 188 0 69632 509 0 nginx
[ 38082] 60 38082 4654 197 0 197 0 69632 505 0 nginx
[ 38083] 60 38083 4654 188 0 188 0 69632 513 0 nginx
[ 38084] 60 38084 4654 188 0 188 0 69632 505 0 nginx
[ 38085] 60 38085 4654 197 0 197 0 69632 505 0 nginx
[ 38086] 60 38086 4654 188 0 188 0 69632 505 0 nginx
[ 38087] 60 38087 4694 188 0 188 0 69632 521 0 nginx
[ 38089] 0 38089 10337 586 23 563 0 98304 979 -1000 systemd-udevd
[ 38091] 152 38091 4777 550 50 500 0 86016 283 0 systemd-network
[ 38098] 990 38098 462054 1814 274 1540 0 253952 2076 0 beszel-agent
[ 38099] 986 38099 4603221 1075 1 1074 0 1576960 13360 0 node-MainThread
[ 38104] 61242 38104 461996 3922 2096 1826 0 294912 2336 0 cloudflared
[ 38106] 61242 38106 483064 3217 1063 2154 0 520192 5322 0 cloudflared
[ 38116] 994 38116 2490 448 33 415 0 69632 128 -900 systemd-oomd
[ 38117] 61431 38117 540100 2915 1 2914 0 634880 5447 0 .xray-wrapped
[ 38141] 154 38141 21099 464 36 428 0 77824 138 0 systemd-timesyn
[ 38177] 63246 38177 484411 638 4 634 0 303104 3076 0 ntfy
[ 38178] 993 38178 28546 343 23 320 0 114688 2594 0 haproxy
[ 38246] 993 38246 157785 392 52 340 0 294912 12418 0 haproxy
[ 38379] 997 38379 121235 916 363 553 0 122880 357 0 nsncd
[ 38397] 0 38397 509785 7031 1555 5476 0 638976 12550 -500 dockerd
[ 38425] 0 38425 503887 3183 692 2491 0 454656 6526 -500 containerd
[ 38605] 0 38605 317049 681 0 681 0 122880 1017 -499 containerd-shim
[ 38606] 0 38606 316985 1599 320 1279 0 118784 721 -499 containerd-shim
[ 38661] 0 38661 9278 754 322 432 0 114688 4821 0 supervisord
[ 38668] 0 38668 1046840 1794 1 1793 0 544768 5414 0 CLIProxyAPI
[ 38764] 1000 38764 1951 78 0 78 0 61440 102 0 dbus-daemon
[ 38766] 0 38766 62911 721 315 406 0 409600 6149 0 Xvfb
[ 38768] 100 38768 1984 81 0 81 0 57344 121 0 dbus-daemon
[ 38794] 0 38794 4466 298 88 210 0 73728 663 0 fluxbox
[ 38795] 0 38795 68649 234 49 185 0 155648 2896 0 x11vnc
[ 38816] 0 38816 1018 82 0 82 0 49152 87 0 bash
[ 38825] 0 38825 7187 285 88 197 0 94208 3061 0 python3
[ 38836] 1000 38836 379073987 47007 6802 40196 9 13832192 40231 0 qq
[ 38837] 1000 38837 392039 421 0 421 0 1175552 17156 0 MainThread
[ 38845] 1000 38845 12741460 929 85 844 0 417792 2461 0 qq
[ 38846] 1000 38846 12741460 906 79 827 0 430080 2467 0 qq
[ 38858] 1000 38858 12588285 193 0 193 0 73728 84 0 chrome_crashpad
[ 38866] 1000 38866 2566982 2130 840 1290 0 2310144 47447 0 MainThread
[ 38896] 1000 38896 12668578 3832 466 3360 6 536576 2869 0 qq
[ 50844] 1000 50844 12663316 887 65 822 0 499712 2578 0 qq
[ 65373] 0 65373 3465 765 6 759 0 73728 380 0 sshd-session
[ 65379] 0 65379 4297 1136 1 1135 0 77824 448 100 systemd
[ 65381] 0 65381 3999 224 1 223 0 73728 335 100 (sd-pam)
[ 65393] 0 65393 3505 490 48 442 0 73728 412 0 sshd-session
[ 65395] 0 65395 3112 116 0 116 0 65536 434 0 bash
[ 554] 0 554 474229 485 1 484 0 262144 2430 0 docker
[ 585] 0 585 474774 2445 591 1854 0 389120 4210 0 docker-buildx
[ 20203] 0 20203 455091 382 0 382 0 221184 1030 -500 .runc-wrapped
[ 20218] 0 20218 670 19 0 19 0 49152 27 -500 sh
[ 20226] 0 20226 223739 65 28 37 0 425984 30022 -500 cargo
[ 20943] 0 20943 4144503 900950 897474 3476 0 24223744 1762663 -500 rustc
[ 21490] 0 21490 3230 2368 358 2010 0 65536 0 0 sshd-session
[ 21491] 995 21491 2861 2125 282 1843 0 69632 0 0 sshd-auth
oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=system.slice:docker:5n5wvj31747mdf0yxju3834a4,mems_allowed=0,global_oom,task_memcg=/system.slice/system.slice:docker:5n5wvj31747mdf0yxju3834a4,task=rustc,pid=20943,uid=0
Out of memory: Killed process 20943 (rustc) total-vm:16578012kB, anon-rss:3589896kB, file-rss:13904kB, shmem-rss:0kB, UID:0 pgtables:23656kB oom_score_adj:-500
oom_reaper: reaped process 20943 (rustc), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
vethb24062c: renamed from eth0
br-81adaeb4a988: port 1(veth1a25895) entered disabled state
br-81adaeb4a988: port 1(veth1a25895) entered disabled state
veth1a25895 (unregistering): left allmulticast mode
veth1a25895 (unregistering): left promiscuous mode
br-81adaeb4a988: port 1(veth1a25895) entered disabled state

我就不信了,直接上 GitHub Action 我看你怎么 OOM

你好啊,陌生人!

我的朋友,看起来你是新来的,如果想参与到讨论中,点击下面的按钮!

合作推广

火星云