AR# 71439

2017.1-2018.2: Zynq UltraScale+ MPSoC: Linux kernel panic for JFFS2 filesystem on POR or reboot

説明

In the 2017.x and 2018.x releases, when you boot Linux with a JFFS2 file system on a ZCU102 board, it crashes with a kernel panic on POR or reboot cycle.

If you erase the JFFS2 Partition and then boot successfully for the first time, on the next boot cycle with POR or reboot, it crashes with kernel panic errors. 

For more details, see the attached boot log.

[    4.916930] ALSA device list:
[    4.919837]   #0: DisplayPort monitor
[    5.043030] random: crng init done
[    5.460283] [drm] Cannot find any crtc or sizes
[    5.690018] jffs2: error: (1) jffs2_link_node_ref: Adding new ref ffffffc87a0276a0 at (0x007ce000-0x007ce070) not immediately after previous (0x007ce000-0x007ce000)
[    5.704654] ------------[ cut here ]------------
[    5.709221] kernel BUG at /kernel-source//fs/jffs2/nodelist.c:622!
[    5.715386] Internal error: Oops - BUG: 0 [#1] SMP
[    5.720159] Modules linked in:
[    5.723199] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.14.0-xilinx-v2018.1 #1
[    5.730404] Hardware name: ZynqMP ZCU102 Rev1.0 (DT)
[    5.735350] task: ffffffc87b846d00 task.stack: ffffff8008038000
[    5.741261] PC is at jffs2_link_node_ref+0x1c0/0x1c8
[    5.746203] LR is at jffs2_link_node_ref+0x1c0/0x1c8
[    5.751150] pc : [<ffffff80082e67e0>] lr : [<ffffff80082e67e0>] pstate: 60000045
[    5.758530] sp : ffffff800803b870
[    5.761826] x29: ffffff800803b870 x28: 0000000000000000
[    5.767122] x27: ffffffc87b04aada x26: 0000000000000000
[    5.772417] x25: 000000000000e002 x24: 000000000000e002
[    5.777712] x23: ffffffc87b04aaa8 x22: ffffff8008e73218
[    5.783008] x21: 0000000000000070 x20: ffffff800c93e8f8
[    5.788303] x19: ffffffc87a0276a0 x18: 0000000000000010
[    5.793598] x17: 0000000000001800 x16: 0000000000001400
[    5.798894] x15: ffffffffffffffff x14: 0720072007200720
[    5.804189] x13: 0720072007200720 x12: 0720072007200720
[    5.809484] x11: 0720072007200720 x10: 0720072007200720
[    5.814780] x9 : 0720072007200720 x8 : 0720072007200720
[    5.820075] x7 : 0720072007200720 x6 : 000000000000019b
[    5.825370] x5 : ffffff800849d3b8 x4 : 0000000000000000
[    5.830665] x3 : 0000000000000000 x2 : ffffffffffffffff
[    5.835961] x1 : ffffff8008dbce68 x0 : 0000000000000098
[    5.841257] Process swapper/0 (pid: 1, stack limit = 0xffffff8008038000)
[    5.847941] Call trace:
[    5.850372] Exception stack(0xffffff800803b730 to 0xffffff800803b870)
[    5.856797] b720:                                   0000000000000098 ffffff8008dbce68
[    5.864612] b740: ffffffffffffffff 0000000000000000 0000000000000000 ffffff800849d3b8
[    5.872425] b760: 000000000000019b 0720072007200720 0720072007200720 0720072007200720
[    5.880238] b780: 0720072007200720 0720072007200720 0720072007200720 0720072007200720
[    5.888051] b7a0: 0720072007200720 ffffffffffffffff 0000000000001400 0000000000001800
[    5.895863] b7c0: 0000000000000010 ffffffc87a0276a0 ffffff800c93e8f8 0000000000000070
[    5.903676] b7e0: ffffff8008e73218 ffffffc87b04aaa8 000000000000e002 000000000000e002
[    5.911489] b800: 0000000000000000 ffffffc87b04aada 0000000000000000 ffffff800803b870
[    5.919302] b820: ffffff80082e67e0 ffffff800803b870 ffffff80082e67e0 0000000060000045
[    5.927115] b840: ffffff8008a5f998 ffffffc87a0276a0 ffffffffffffffff 00000000007ce070
[    5.934926] b860: ffffff800803b870 ffffff80082e67e0
[    5.939788] [<ffffff80082e67e0>] jffs2_link_node_ref+0x1c0/0x1c8
[    5.945778] [<ffffff80082f778c>] sum_link_node_ref+0x64/0x78
[    5.951420] [<ffffff80082f8224>] jffs2_sum_scan_sumnode+0x31c/0x6b8
[    5.957671] [<ffffff80082eb6c8>] jffs2_scan_eraseblock+0x3e0/0x1198
[    5.963920] [<ffffff80082ec604>] jffs2_scan_medium+0x184/0x4d0
[    5.969735] [<ffffff80082eea3c>] jffs2_do_mount_fs+0x17c/0x728
[    5.975552] [<ffffff80082f0e5c>] jffs2_do_fill_super+0xec/0x270
[    5.981455] [<ffffff80082f1630>] jffs2_fill_super+0x108/0x140
[    5.987185] [<ffffff80085ea000>] mount_mtd_aux.isra.0+0x60/0x100
[    5.993174] [<ffffff80085ea1d4>] mount_mtd+0x134/0x1a8
[    5.998295] [<ffffff80082f1114>] jffs2_mount+0x14/0x20
[    6.003418] [<ffffff800819eb98>] mount_fs+0x18/0xa8
[    6.008280] [<ffffff80081bd5cc>] vfs_kern_mount.part.7+0x4c/0x120
[    6.014356] [<ffffff80081c00b0>] do_mount+0x4b8/0xc20
[    6.019390] [<ffffff80081c0be0>] SyS_mount+0x68/0x108
[    6.024426] [<ffffff8008d210a0>] mount_block_root+0x124/0x27c
[    6.030154] [<ffffff8008d214e0>] prepare_namespace+0x98/0x1b4
[    6.035883] [<ffffff8008d20d44>] kernel_init_freeable+0x1b8/0x1d8
[    6.041963] [<ffffff8008a1c560>] kernel_init+0x10/0x100
[    6.047170] [<ffffff8008084a90>] ret_from_fork+0x10/0x18
[    6.052465] Code: 0b150085 0b0000c7 91302100 97f7d32f (d4210000)
[    6.058541] ---[ end trace aa92c78c5b1c894d ]---
[    6.063187] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[    6.063187]
[    6.072261] SMP: stopping secondary CPUs
[    6.076222] Kernel Offset: disabled
[    6.079634] CPU features: 0x002004
[    6.083018] Memory Limit: none
[    6.086058] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[    6.086058]

ソリューション

To fix this issue in the kernel, disable CONFIG_JFFS2_SUMMARY from the menuconfig as follows:

$ petalinux-config -c kernel

Then disable the following kernel config:

File systems ---> Miscellaneous filesystems ---> [ ]JFFS2 summary support

This is enabled by default in the xilinx_zynqmp_defconfig.

As a result, when mtd_writev() returns a length of 0 (even though the node space is not reserved as dirty but is re-used), the extra summary entry will point into the space of the next node.

添付ファイル

関連添付ファイル

タイトル サイズ ファイルタイプ
JFFS2-kernel-panic-log.txt 160 KB TXT

アンサー レコード リファレンス

関連アンサー レコード

AR# 71439
日付 01/31/2020
ステータス アクティブ
種類 一般
デバイス
ツール
Boards & Kits