[U-Boot] ext4: crash when writing a file
Sébastien Szymanski
sebastien.szymanski at armadeus.com
Tue Nov 29 10:50:45 CET 2016
Hello,
I am working on a i.MX6UL based board with a 4GB eMMC partitioned as
following:
Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 264191 262144 128M 83 Linux
/dev/sdb2 264192 4458495 4194304 2G 83 Linux
/dev/sdb3 4458496 7634943 3176448 1.5G 83 Linux
On the 2nd partition, I write this ext4 filesystem file generated by
Buildroot:
Filesystem volume name: "ROOTFS"
Last mounted on: <not available>
Filesystem UUID: b9833a36-e89d-429a-b120-c3b00bcb7785
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal dir_index filetype extent
sparse_super uninit_bg
Filesystem flags: signed_directory_hash
Default mount options: (none)
Filesystem state: clean
Errors behavior: Unknown (continue)
Filesystem OS type: Linux
Inode count: 3456
Block count: 91756
Reserved block count: 4587
Free blocks: 13458
Free inodes: 488
First block: 1
Block size: 1024
Fragment size: 1024
Blocks per group: 7648
Fragments per group: 7648
Inodes per group: 288
Inode blocks per group: 36
Last mount time: n/a
Last write time: Tue Nov 29 09:44:52 2016
Mount count: 0
Maximum mount count: -1
Last checked: Tue Nov 29 09:44:52 2016
Check interval: 0 (<none>)
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 128
Journal inode: 8
Default directory hash: half_md4
Directory Hash Seed: a583a07f-6b59-442d-8e08-9be305f78d17
Journal backup: inode blocks
This filesystem is written with the following commands:
BIOS> setexpr nbblocks ${filesize} / 0x200
BIOS> setexpr nbblocks ${nbblocks} + 1
BIOS> mmc write ${loadaddr} 0x40800 ${nbblocks}
MMC write: dev # 0, block # 264192, count 183513 ... 183513 blocks
written: OK
I can boot Linux with it without any issues, however if I try to write a
file in it I get the following crash:
BIOS> ext4write mmc 0:2 ${loadaddr} /boot/${kernelimg} ${filesize}
File System is consistent
file found, deleting
update journal finished
File System is consistent
update journal finished
data abort
pc : [<8ff783ac>] lr : [<8ff86c95>]
reloc pc : [<8780e3ac>] lr : [<8781cc95>]
sp : 8ef696b8 ip : 00000000 fp : 8ffbc6d8
r10: 00000200 r9 : 8ef69ee8 r8 : 8ffbc744
r7 : 8ef9f600 r6 : 8ef999b6 r5 : 00000003 r4 : 8ffa35fc
r3 : 8ef999b8 r2 : 00000001 r1 : fffffffe r0 : 8ef999c0
Flags: NzCv IRQs off FIQs off Mode SVC_32
Resetting CPU ...
resetting ...
I have investigated a bit and I found that the crash is in the
ext4fs_deinit() function provoked by the free() call at line 722
(fs/ext4/ext4_write.c) and the ext4fs_deinit() is called in
ext4fs_write() at line 980.
If I resize the filesystem under Linux, I don't get the crash but the
following error:
ext4fs_devread read outside partition 4294967294
error in File System init
** Error ext4fs_write() **
** Unable to write file /boot/opos6ul-linux.bin **
Any idea ?
Regards,
--
Sébastien Szymanski
Software Engineer, Armadeus Systems
sebastien.szymanski at armadeus.com
Tel: +33 (0)9 72 29 41 44
Fax: +33 (0)9 72 28 79 26
More information about the U-Boot
mailing list