Bug 258815 - Boot panics when KMSAN enabled after 6687410af7d..d3a8f98acbf
Summary: Boot panics when KMSAN enabled after 6687410af7d..d3a8f98acbf
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Mark Johnston
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2021-09-30 17:06 UTC by Li-Wen Hsu
Modified: 2021-10-04 19:00 UTC (History)
4 users (show)

See Also:


Attachments
verbose boot message (19.36 KB, text/plain)
2021-09-30 17:06 UTC, Li-Wen Hsu
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Li-Wen Hsu freebsd_committer 2021-09-30 17:06:54 UTC
Created attachment 228294 [details]
verbose boot message

After 6687410af7d..d3a8f98acbf , kernel with KMSAN enabled panics on boot.

https://ci.freebsd.org/job/FreeBSD-main-amd64-KMSAN_test/55/console

panic: MSan: Uninitialized malloc memory from g_read_data+0x26f
cpuid = 1
time = 2
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x9b/frame 0xfffffe000779a600
vpanic() at vpanic+0x567/frame 0xfffffe000779a6a0
panic() at panic+0x1b3/frame 0xfffffe000779a7b0
__msan_warning() at __msan_warning+0x255/frame 0xfffffe000779a900
readsuper() at readsuper+0x5f6/frame 0xfffffe000779a9b0
ffs_sbget() at ffs_sbget+0x2c7/frame 0xfffffe000779aac0
g_label_ufs_taste_common() at g_label_ufs_taste_common+0x1e8/frame 0xfffffe000779abe0
g_label_taste() at g_label_taste+0x5ed/frame 0xfffffe000779ad60
g_new_provider_event() at g_new_provider_event+0x5c4/frame 0xfffffe000779ade0
g_run_events() at g_run_events+0x6d3/frame 0xfffffe000779aea0
fork_exit() at fork_exit+0x1c9/frame 0xfffffe000779af30
fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe000779af30
--- trap 0x800001, rip = 0, rsp = 0, rbp = 0xfffffe0000000000 ---
??() at 0/frame 0xfffffe0000000000
KDB: enter: panic
[ thread pid 13 tid 100037 ]
Stopped at      kdb_enter+0x15f:        movq    $0x863a5890,%rdi
db>

The commits included in this build are:
base d3a8f98acbf51e728411f10c5f179a30b9ca683c                                        
base 0a35c4b3cab563e3ab1bf5b7b49bf26e0bb7cb04                                        
base 242923eb848a94d657344c2ff45c4f15433cdf3c
Comment 1 Mark Johnston freebsd_committer 2021-09-30 17:14:15 UTC
I suspect this is not related to recent commits.  I note that the CI VMs are using virtual SATA disks, while most of the initial KMSAN work was done using virtio devices.  So this is likely a preexisting driver problem or a false positive (i.e., KMSAN bug) of some kind.
Comment 2 Li-Wen Hsu freebsd_committer 2021-09-30 17:32:00 UTC
(In reply to Mark Johnston from comment #1)
I was also suspecting this, and did a bisect for this. The build for base 6687410af7dba54e19b773684a969e9c590999e4 doesn't have this message:

https://ci.freebsd.org/job/FreeBSD-main-amd64-KMSAN_test/57/console