OOM on objtool when building x86_64:allyesconfig on system running v6.1.x kernels

From: Guenter Roeck
Date: Mon Jan 23 2023 - 18:11:11 EST


Hi all,

when trying to build x86_64:allyesconfig on a system running v6.1.x kernels
(currently 6.1.7), I keep getting OOM errors in objtool.

[360871.492187] objtool invoked oom-killer: gfp_mask=0x140dca(GFP_HIGHUSER_MOVABLE|__GFP_COMP|__GFP_ZERO), order=0, oom_score_adj=0
[360871.492194] CPU: 4 PID: 1158479 Comm: objtool Not tainted 6.1.7-spi+ #1
[360871.492196] Hardware name: Micro-Star International Co., Ltd. MS-7B89/B450M MORTAR MAX (MS-7B89), BIOS 2.H0 07/27/2022
[360871.492198] Call Trace:
[360871.492199] <TASK>
[360871.492202] dump_stack_lvl+0x49/0x63
[360871.492206] dump_stack+0x10/0x16
[360871.492207] dump_header+0x4f/0x216
[360871.492209] oom_kill_process.cold+0xb/0x10
[360871.492211] out_of_memory+0x1cf/0x520
...
[360871.492254] Mem-Info:
[360871.492256] active_anon:743423 inactive_anon:6755060 isolated_anon:0
active_file:847 inactive_file:1145 isolated_file:0
unevictable:665 dirty:8 writeback:0
slab_reclaimable:475477 slab_unreclaimable:69268
mapped:2213 shmem:760735 pagetables:16035
sec_pagetables:0 bounce:0
kernel_misc_reclaimable:0
free:92647 free_pcp:10 free_cma:0
...
[360871.492446] Out of memory: Killed process 1158479 (objtool) total-vm:25987600kB, anon-rss:25766820kB, file-rss:1444kB, shmem-rss:180kB, UID:1000 pgtables:50464kB oom_score_adj:0

The system has 32GB of memory. I do not see the problem on other systems
running v5.15.y kernels, or on the same system before installing a v6.1.x
kernel. I don't think I have ever seen the problem on the same system
when trying to build an older kernel either.

Has anyone else observed a similar problem ? Any idea what might be
going on, or what I can do to help tracking this down ?

Thanks,
Guenter