F2FS filesystems from latest Linux kernels crash XA2 Android kernel

This should more be an informal bug report for others runnign into the issue, to make their life easier.
The XA2 Kernel (4.4) will crash with f2fs filesystems from the latest kernel releases ( at least 6.1, but last time I formatted the sdcard was with 5.2 or so). Formatting on the device itself will solve the issue of your crashes. Appending the kernel log from the crash.

[   82.040503] type=1131 audit(1676974809.699:213): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-hostnamed comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   82.040659] type=1131 audit(1676974825.038:214): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=dbus-org.nemomobile.provisioning comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   85.794157] Unhandled fault: alignment fault (0x96000021) at 0xffffffdda6bfd16c
[   85.794485] ------------[ cut here ]------------
[   85.794566] Kernel BUG at ffffff8ccb3ec288 [verbose debug info unavailable]
[   85.794705] Internal error: Oops - BUG: 96000021 [#1] PREEMPT SMP
[   85.794781] Modules linked in:
[   85.794977] CPU: 6 PID: 7069 Comm: Binder:11_4 Tainted: G        W       4.4.194 #1
[   85.795056] Hardware name: Qualcomm Technologies, Inc. SDM 630 PM660 + PM660L MTP (DT)
[   85.795187] task: ffffffddaa5e2940 ti: ffffffde00e28000 task.ti: ffffffde00e28000
[   85.795325] PC is at test_and_set_bit+0x18/0x40
[   85.795399] LR is at f2fs_update_dentry+0xb4/0xd4
[   85.795469] pc : [<ffffff8ccb3ec288>] lr : [<ffffff8ccb31b2a4>] pstate: 80400145
[   85.795594] sp : ffffffde00e2bc50
[   85.795660] x29: ffffffde00e2bc50 x28: ffffffbe37c06300
[   85.795897] x27: ffffffde0e508528 x26: 00000000000041c0
[   85.796070] x25: 00000000000038e0 x24: 0000000000000004
[   85.796251] x23: ffffffdda6bfd1a0 x22: 0000000000000001
[   85.796396] x21: 0000000000000003 x20: ffffffde00e2bd38
[   85.796538] x19: 0000000000000003 x18: 0000000000000000
[   85.796681] x17: 0000000000000000 x16: ffffff8ccb01f730
[   85.796861] x15: ffffffde00e2bca4 x14: 000000006d656469
[   85.797000] x13: 0000000005050561 x12: 0000000005050505
[   85.797179] x11: 0000000005050505 x10: 0000000000000010
[   85.797319] x9 : 00000000b4c8a73b x8 : 0000000000000005
[   85.797459] x7 : 00000000000000b6 x6 : ffffffdda6bfd971
[   85.797638] x5 : 0000000000000002 x4 : 0000000000000004
[   85.797777] x3 : 0000000000000002 x2 : 0000000000000001
[   85.797956] x1 : ffffffdda6bfd16c x0 : 0000000000000000
[   85.798098]
               PC: 0xffffff8ccb3ec248:
[   85.798196] c248  c85f7c22 9ac32440 8a240042 c805fc22 35ffff85 d5033bbf 92400000 d65f03c0
[   85.798698] c268  d503201f d503201f 12001403 4a030000 d2800022 8b400c21 f9800031 9ac32044
[   85.799158] c288  c85f7c22 9ac32440 aa040042 c805fc22 35ffff85 d5033bbf 92400000 d65f03c0
[   85.799662] c2a8  d503201f d503201f d53b00e1 12000c21 d2800082 9ac12041 d50b7420 8b010000
[   85.800178]
               LR: 0xffffff8ccb31b264:
[   85.800237] b264  0b1600b5 f9400461 b9400462 f9400e80 8b254c00 94034692 b90006f9 b0008020
[   85.800716] b284  911f0000 38786800 39002ae0 340000f6 f9400681 2a1303e0 11000673 940343f4
[   85.801222] b2a4  6b15027f 54ffff61 a94153f3 a9425bf5 a94363f7 f94023f9 a8c77bfd d65f03c0
[   85.801683] b2c4  a9b47bfd 910003fd a90153f3 a9025bf5 a90363f7 a9046bf9 a90573fb aa0103f3
[   85.802192]
               SP: 0xffffffde00e2bc10:
[   85.802251] bc10  cb31b2a4 ffffff8c 00e2bc50 ffffffde cb3ec288 ffffff8c 80400145 00000000
[   85.802755] bc30  0e5082d8 ffffffde 00e2bdb0 ffffffde 00000000 00000080 cb32b48c ffffff8c
[   85.803260] bc50  00e2bcc0 ffffffde cb32b4f4 ffffff8c a6bfd95c ffffffdd 369aff40 ffffffbe
[   85.803727] bc70  823742d8 ffffffdd 0e5082d8 ffffffde 00e2bdb0 ffffffde a6bfd16c ffffffdd

[   85.804250] Process Binder:11_4 (pid: 7069, stack limit = 0xffffffde00e28028)
[   85.804310] Call trace:
[   85.804366] Exception stack(0xffffffde00e2ba80 to 0xffffffde00e2bbb0)
[   85.804464] ba80: 0000000000000003 0000008000000000 0000000082c07000 ffffff8ccb3ec288
[   85.804564] baa0: 0000000000000007 0000000000030001 ffffffdda6bfd16c 0000000000000000
[   85.804624] bac0: ffffffde00e2bb10 ffffff8ccafcef6c ffffffde00ac4000 ffffffde00ac4000
[   85.804723] bae0: ffffffdd823742d8 0000000000000003 0000000000000000 0000000000000000
[   85.804825] bb00: ffffffde00e28000 ffffffde00ac4000 ffffffde00e2bb30 ffffff8ccb347260
[   85.804886] bb20: 0000000000000000 ffffffdda6bfd16c 0000000000000001 0000000000000002
[   85.804986] bb40: 0000000000000004 0000000000000002 ffffffdda6bfd971 00000000000000b6
[   85.805100] bb60: 0000000000000005 00000000b4c8a73b 0000000000000010 0000000005050505
[   85.805173] bb80: 0000000005050505 0000000005050561 000000006d656469 ffffffde00e2bca4
[   85.805285] bba0: ffffff8ccb01f730 0000000000000000
[   85.805396] [<ffffff8ccb3ec288>] test_and_set_bit+0x18/0x40
[   85.805464] [<ffffff8ccb32b4f4>] f2fs_add_inline_entry+0x140/0x91c
[   85.805591] [<ffffff8ccb31b7cc>] __f2fs_add_link+0xa4/0xc0
[   85.805668] [<ffffff8ccb321f8c>] f2fs_mkdir+0xd4/0x194
[   85.805797] [<ffffff8ccb019560>] vfs_mkdir2+0xcc/0x11c
[   85.805869] [<ffffff8ccb01f770>] SyS_mkdirat+0x40/0x110
[   85.805941] [<ffffff8ccae83130>] el0_svc_naked+0x24/0x28
[   85.806057] Code: d2800022 8b400c21 f9800031 9ac32044 (c85f7c22)
[   85.806554] ---[ end trace 0edafcd2ce1daf63 ]---
1 Like

The solution is to format the card on the device itself or with an older kernel version, as already told above.

1 Like