Closed ramosian-glider closed 3 years ago
(gdb) bt
#0 __msan_poison_alloca (address=0xffffffff91403640, size=24, descr=0xffffffff91596160 "----c@stack_trace_save") at mm/kmsan/kmsan_instr.c:159
#1 0xffffffff819dfa91 in stack_trace_save (store=store@entry=0xffffffff91403698, size=size@entry=1, skipnr=skipnr@entry=1) at kernel/stacktrace.c:115
#2 0xffffffff82439b11 in kmsan_internal_return_address (arg=-1856413344, arg@entry=1) at mm/kmsan/kmsan.c:509
#3 0xffffffff82439f57 in __msan_poison_alloca (address=0xffffffff91403730, size=24, descr=0xffffffff91596160 "----c@stack_trace_save")
at mm/kmsan/kmsan_instr.c:167
#4 0xffffffff819dfa91 in stack_trace_save (store=store@entry=0xffffffff91403788, size=size@entry=1, skipnr=skipnr@entry=1) at kernel/stacktrace.c:115
#5 0xffffffff82439b11 in kmsan_internal_return_address (arg=-1856413344, arg@entry=1) at mm/kmsan/kmsan.c:509
#6 0xffffffff82439f57 in __msan_poison_alloca (address=0xffffffff91403820, size=24, descr=0xffffffff91596160 "----c@stack_trace_save")
at mm/kmsan/kmsan_instr.c:167
#7 0xffffffff819dfa91 in stack_trace_save (store=store@entry=0xffffffff91403878, size=size@entry=1, skipnr=skipnr@entry=1) at kernel/stacktrace.c:115
#8 0xffffffff82439b11 in kmsan_internal_return_address (arg=-1856413344, arg@entry=1) at mm/kmsan/kmsan.c:509
#9 0xffffffff82439f57 in __msan_poison_alloca (address=0xffffffff91403910, size=24, descr=0xffffffff91596160 "----c@stack_trace_save")
at mm/kmsan/kmsan_instr.c:167
#10 0xffffffff819dfa91 in stack_trace_save (store=store@entry=0xffffffff91403968, size=size@entry=1, skipnr=skipnr@entry=1) at kernel/stacktrace.c:115
#11 0xffffffff82439b11 in kmsan_internal_return_address (arg=-1856413344, arg@entry=1) at mm/kmsan/kmsan.c:509
#12 0xffffffff82439f57 in __msan_poison_alloca (address=0xffffffff91403a88, size=40, descr=0xffffffff915db070 "----ac@__alloc_pages")
at mm/kmsan/kmsan_instr.c:167
#13 0xffffffff822ea600 in __alloc_pages (gfp=73728, order=0, preferred_nid=0, nodemask=0x0 <fixed_percpu_data>) at mm/page_alloc.c:5186
#14 0xffffffff823bfecb in alloc_pages (gfp=gfp@entry=73728, order=order@entry=0) at mm/mempolicy.c:2272
#15 0xffffffff8242a2c4 in alloc_slab_page (flags=73728, node=-1, oo=..., s=<optimized out>) at mm/slub.c:1661
#16 allocate_slab (s=s@entry=0xffff888014832800, flags=0, node=node@entry=-1) at mm/slub.c:1801
#17 0xffffffff8240db0c in new_slab (s=0xffff888014832800, flags=<optimized out>, node=-1) at mm/slub.c:1864
#18 new_slab_objects (s=0xffff888014832800, flags=3520, node=<optimized out>, pc=<optimized out>) at mm/slub.c:2610
#19 ___slab_alloc (s=<optimized out>, s@entry=0x92, gfpflags=gfpflags@entry=3520, node=<optimized out>, node@entry=-1, addr=addr@entry=18446744071591563891,
c=c@entry=0xffff88807fc99350) at mm/slub.c:2773
#20 0xffffffff82410fe6 in __slab_alloc (s=0xffff888014832800, gfpflags=3520, node=-1, addr=18446744071591563891, c=<optimized out>) at mm/slub.c:2813
#21 slab_alloc_node (s=0xffff888014832800, gfpflags=3520, node=-1, addr=0, orig_size=<optimized out>) at mm/slub.c:2895
#22 slab_alloc (s=<optimized out>, gfpflags=3520, addr=<optimized out>, orig_size=<optimized out>) at mm/slub.c:2938
#23 __kmalloc (size=192, flags=3520) at mm/slub.c:4070
#24 0xffffffff81c21273 in kmalloc (size=192, flags=3520) at /usr/local/google/src/clang-kernel-build/kmsan-devel/./include/linux/slab.h:561
#25 kzalloc (size=192, flags=3264) at /usr/local/google/src/clang-kernel-build/kmsan-devel/./include/linux/slab.h:686
#26 __ring_buffer_alloc (size=4096, flags=1, key=0xffffffff939eb69b <tracer_alloc_buffers..key>) at kernel/trace/ring_buffer.c:1720
#27 0xffffffff935e6625 in tracer_alloc_buffers () at kernel/trace/trace.c:9856
#28 0xffffffff935e6330 in early_trace_init () at kernel/trace/trace.c:9946
#29 0xffffffff9353b5e8 in start_kernel () at init/main.c:939
#30 0xffffffff810000f5 in secondary_startup_64 () at arch/x86/kernel/head_64.S:283
#31 0x0000000000000000 in ?? ()
I'll leave the bug open, because the output of kmsan_internal_return_address()
still differs for ORC and FP unwinders, and one of the tests does not pass. But at least KMSAN doesn't hang anymore.
Should be fixed now.
$SUBJ When built with UNWINDER_ORC, the kernel freezes after the line "Starting KernelMemorySanitizer".