koverstreet / bcachefs

Other
662 stars 70 forks source link

kernel errors when only single root [bca2ade] #591

Closed Madouura closed 11 months ago

Madouura commented 12 months ago

bcachefs kernel errors when only single root. Does not occur when multi-device root. Related: https://github.com/NixOS/nixpkgs/pull/252348

Version bca2ade8e1aa696330df88146f5a4d7ccfbb92cb

Generic info https://github.com/NixOS/nixpkgs/blob/f58e6874f3f06d4e5cdea58bec5da33f8b2f8ad3/nixos/tests/installer.nix#L880-L970

Kernel bugs Compile the kernel with these flags: (Done using variation of build script in nixpkgs)

CONFIG_PREEMPT=y
CONFIG_BCACHEFS_DEBUG=y
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_ALL=y
CONFIG_DEBUG_FS=y
CONFIG_DYNAMIC_FTRACE=y
CONFIG_FTRACE=y

Test VM log: test-vm.txt

Mic92 commented 12 months ago

For context we do not carry around weird patches in NixOS kernels: https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/kernel/patches.nix (it's mostly to patch paths to userspace programs if they are in /usr/bin or similar by default). The crash seems to often happen before it starts the initrd, also I don't know yet how verify that.

koverstreet commented 11 months ago

I don't see anything pertaining to bcachefs in the log - if it is in fact bcachefs that's somehow at fault here, you're going to have to do some digging before I have anything to go on

Mic92 commented 11 months ago

The problem was that bcachefs needs special UUID handling now: https://github.com/NixOS/nixpkgs/pull/256638 and a trunk version of util-linux (latest release won't work).

Mic92 commented 11 months ago

Is there a place where this could be documented for other packagers?