0

I'm having problems when using Btrfs for my rootfs. I'm generatig my image with Yocto and as far as I know U-Boot support it. My zImage and my dts are located at boot and I already enabled Btrfs configs on menuconfig.

At boot process I'm getting: [ 3.454910] Btrfs loaded, crc32c=crc32c-generic, debug=on, assert=on, integrity-checker=on, ref-verify=on, zoned=no, fsverity=no

[ 3.474101] BTRFS: selftest: sectorsize: 4096 nodesize: 4096

[ 3.483631] BTRFS: selftest: running btrfs free space cache tests

[ 3.493717] BTRFS: selftest: running extent only tests

[ 3.502896] BTRFS: selftest: running bitmap only tests

[ 3.511818] BTRFS: selftest: running bitmap and extent tests

[ 3.521211] BTRFS: selftest: running space stealing from bitmap to extent tests

[ 3.533998] BTRFS: selftest: running bytes index tests

[ 3.542886] BTRFS: selftest: running extent buffer operation tests

[ 3.552374] BTRFS: selftest: running btrfs_split_item tests

[ 3.561499] BTRFS: selftest: running extent I/O tests

[ 3.569740] BTRFS: selftest: running find delalloc tests

[ 7.330520] swapper/0 invoked oom-killer: gfp_mask=0x40cc0(GFP_KERNEL|__GFP_COMP), order=0, oom_score_adj=0

[ 7.346872] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.1.27-6.3.0-devel+git.ca48fc16c493 #1

[ 7.358831] Hardware name: Freescale i.MX6 Ultralite (Device Tree)

[ 7.368548] unwind_backtrace from show_stack+0x10/0x14

[ 7.377364] show_stack from dump_stack_lvl+0x40/0x4c

[ 7.386016] dump_stack_lvl from dump_header+0x48/0x250

[ 7.394861] dump_header from out_of_memory+0x420/0x494

[ 7.403714] out_of_memory from __alloc_pages+0xa60/0xd54

[ 7.412785] __alloc_pages from __filemap_get_folio+0x154/0x47c

[ 7.422398] __filemap_get_folio from pagecache_get_page+0x10/0x48

[ 7.432303] pagecache_get_page from btrfs_test_extent_io+0x90/0xcd4

[ 7.442297] btrfs_test_extent_io from btrfs_run_sanity_tests+0xa0/0x130

[ 7.452565] btrfs_run_sanity_tests from init_btrfs_fs+0xb8/0x120

[ 7.462189] init_btrfs_fs from do_one_initcall+0x3c/0x220

[ 7.471229] do_one_initcall from kernel_init_freeable+0x178/0x204

[ 7.481057] kernel_init_freeable from kernel_init+0x14/0x130

[ 7.490542] kernel_init from ret_from_fork+0x14/0x2c

[ 7.499343] Exception stack(0xd083dfb0 to 0xd083dff8)

[ 7.508120] dfa0: 00000000 00000000 00000000 00000000

[ 7.520207] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

[ 7.532314] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000

[ 7.542954] Mem-Info:

[ 7.549158] active_anon:0 inactive_anon:0 isolated_anon:0

[ 7.549158] active_file:11594 inactive_file:11590 isolated_file:0

[ 7.549158] unevictable:0 dirty:0 writeback:0

[ 7.549158] slab_reclaimable:197 slab_unreclaimable:2284

[ 7.549158] mapped:0 shmem:0 pagetables:0

[ 7.549158] sec_pagetables:0 bounce:0

[ 7.549158] kernel_misc_reclaimable:0

[ 7.549158] free:32770 free_pcp:55 free_cma:24094

[ 7.615591] Node 0 active_anon:0kB inactive_anon:0kB active_file:46376kB inactive_file:46360kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:0kB dirty:0kB writeback:0kB shmem:0kB writes

[ 7.652154] Normal free:131080kB boost:32768kB min:34724kB low:35212kB high:35700kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:46376kB inactive_file:46360kB unevictable:0kBB

[ 7.696715] lowmem_reserve[]: 0 0 0

[ 7.704283] Normal: 24kB (C) 48kB (UMC) 216kB (M) 232kB (MC) 464kB (UMC) 1128kB (M) 2256kB (M) 4512kB (UMC) 31024kB (UMC) 12048kB (M) 24096kB (UC) 28192kB (MC) 216384kB (UC) 232768kB (CB

[ 7.736312] 23188 total pagecache pages

[ 7.744571] 65536 pages RAM

[ 7.751627] 0 pages HighMem/MovableOnly

[ 7.759736] 5745 pages reserved

[ 7.767141] 24576 pages cma reserved

[ 7.774874] Tasks state (memory values in pages):

[ 7.783782] [ pid ] uid tgid total_vm rss pgtables_bytes swapents oom_score_adj name

[ 7.796844] Out of memory and no killable processes...

[ 7.806356] Kernel panic - not syncing: System is deadlocked on memory

[ 7.817350] ---[ end Kernel panic - not syncing: System is deadlocked on memory ]---

Have you ever faced something like that?

Bjlli
  • 1
  • 1
  • This panic comes after u-boot has loaded the kernel, and handed over the system also to it. What's the full log? What is the system doing right before the panic? – skandigraun Jul 05 '23 at 13:41
  • Right before the panic the system gets stuck at boot, nothing else happens. I will edit the question with the full log. – Bjlli Jul 05 '23 at 14:02
  • It seems that it dies during sanity checks... have you enabled `CONFIG_BTRFS_FS_RUN_SANITY_TESTS` [kernel config](https://cateee.net/lkddb/web-lkddb/BTRFS_FS_RUN_SANITY_TESTS.html)? If yes, what happens if you disable it? – skandigraun Jul 05 '23 at 14:16
  • Thank you! I had to disable all BTRFS options in menuconfig, only letting the basic support. – Bjlli Jul 05 '23 at 14:45

0 Answers0