We have a problem with our jffs2 mount.
We've mounted a single partition from a nandflash to jffs2. It seems to be really unstable however. We're using the 2010 uclinux and u-boot on our custom bf526-ezbrd.
We often get jffs2 errors during boot. Different kind of errors. Rarely the same.
Could be something like:
====================================================================================
...
It could be due to the "reboot" command which is a rather cruel reset. But "reboot" or "power shortage" the hw have to be able to handle both.
The nand is attached to the async mem interface and we've experimented with different timings and settings, both in linux and u-boot. We've also tried different mount options like eg. "-o sync". Nothing helps.
Also sometimes we even get kernel panics. After which the hw needs to be reset by hand. *Very critical*!
NULL pointer access
Kernel OOPS in progress
Deferred Exception context
CURRENT PROCESS:
COMM=opcd PID=147 CPU=0
TEXT = 0x01880040-0x018c83e0 DATA = 0x018c8400-0x018d5918
BSS = 0x018d5918-0x018dc0b0 USER-STACK = 0x018e0fa0
return address: [0x006829c0]; contents of:
0x006829a0: 3007 0127 05b4 0010 e14a 0008 e10a 7cf0
0x006829b0: 3045 0062 9162 3208 6019 a050 5608 b050
0x006829c0: [acca] 0c42 1807 0000 0000 9152 a050 5608
0x006829d0: b050 a169 2fc1 6007 2fc6 63a7 2fc4 0000
ADSP-BF526-0.2 400(MHz CCLK) 100(MHz SCLK) (mpu off)
Linux version 2.6.34.7-ADI-2010R1-svn5314 (mk@PCHe-Ubuntu) (gcc version 4.3.5 (ADI-2010R1-RC4) ) #640 Thu Dec 22 16:10:34 CET 2011
SEQUENCER STATUS: Not tainted
SEQSTAT: 00002027 IPEND: 8008 IMASK: ffff SYSCFG: 0006
EXCAUSE : 0x27
physical IVG3 asserted : <0xffa00744> { _trap + 0x0 }
physical IVG15 asserted : <0xffa00f80> { _evt_system_call + 0x0 }
logical irq 6 mapped : <0xffa00380> { _bfin_coretmr_interrupt + 0x0 }
logical irq 27 mapped : <0x000b37b8> { _bfin_twi_interrupt_entry + 0x0 }
logical irq 31 mapped : <0x0009c9a0> { _bfin_serial_dma_rx_int + 0x0 }
logical irq 32 mapped : <0x0009cdd4> { _bfin_serial_dma_tx_int + 0x0 }
logical irq 35 mapped : <0x000b0e64> { _bfin_mac_interrupt + 0x0 }
RETE: <0x00000000> /* Maybe null pointer? */
RETN: <0x01827c10> /* kernel dynamic memory (maybe user-space) */
RETX: <0x00000480> /* Maybe fixed code section */
RETS: <0x006829b4> { :jffs2:_jffs2_add_full_dnode_to_inode + 0xb8 }
PC : <0x006829c0> { :jffs2:_jffs2_add_full_dnode_to_inode + 0xc4 }
DCPLB_FAULT_ADDR: <0x0000000c> /* Maybe null pointer? */
ICPLB_FAULT_ADDR: <0x006829c0> { :jffs2:_jffs2_add_full_dnode_to_inode + 0xc4 }
PROCESSOR STATE:
R0 : 01369603 R1 : 00000003 R2 : 007b4368 R3 : 00000000
R4 : 006a6200 R5 : 000000f8 R6 : 006a6200 R7 : 00000000
P0 : 007b4368 P1 : 00000000 P2 : 007b1dec P3 : 004680f8
P4 : 007b3408 P5 : 007b4368 FP : 0008d658 SP : 01827b34
LB0: 0008a854 LT0: 0008a852 LC0: 00000000
LB1: 0008d71a LT1: 0008d70a LC1: 00000000
B0 : 00000000 L0 : 00000000 M0 : 00000000 I0 : 00468100
B1 : 00000000 L1 : 00000000 M1 : 00000000 I1 : 007b66a4
B2 : 00000000 L2 : 00000000 M2 : 00000000 I2 : 00000000
B3 : 00000000 L3 : 00000000 M3 : 00000000 I3 : 00000000
A0.w: 00006666 A0.x: 00000000 A1.w: 0000234b A1.x: 00000000
USP : 018e0d10 ASTAT: 02002060
Hardware Trace:
0 Target : <0x00003ef4> { _trap_c + 0x0 }
Source : <0xffa006d8> { _exception_to_level5 + 0xa4 } JUMP.L
1 Target : <0xffa00634> { _exception_to_level5 + 0x0 }
Source : <0xffa004e8> { _bfin_return_from_exception + 0x18 } RTX
2 Target : <0xffa004d0> { _bfin_return_from_exception + 0x0 }
Source : <0xffa0058c> { _ex_trap_c + 0x74 } JUMP.S
3 Target : <0xffa00518> { _ex_trap_c + 0x0 }
Source : <0xffa0079e> { _trap + 0x5a } JUMP (P4)
4 Target : <0xffa00744> { _trap + 0x0 }
FAULT : <0x006829c0> { :jffs2:_jffs2_add_full_dnode_to_inode + 0xc4 } R2 = W[P1 + 3](X)
Source : <0x006829be> { :jffs2:_jffs2_add_full_dnode_to_inode + 0xc2 } [P2 + 1] = R0
5 Target : <0x006829b4> { :jffs2:_jffs2_add_full_dnode_to_inode + 0xb8 }
Source : <0x00087d1a> { _rb_prev + 0x2a } RTS
6 Target : <0x00087d18> { _rb_prev + 0x28 }
Source : <0x00087d30> { _rb_prev + 0x40 } IF CC JUMP pcrel
7 Target : <0x00087d2a> { _rb_prev + 0x3a }
Source : <0x00087d24> { _rb_prev + 0x34 } JUMP.S
8 Target : <0x00087d22> { _rb_prev + 0x32 }
Source : <0x00087d08> { _rb_prev + 0x18 } IF CC JUMP pcrel
9 Target : <0x00087cf0> { _rb_prev + 0x0 }
Source : <0x006829b2> { :jffs2:_jffs2_add_full_dnode_to_inode + 0xb6 } CALL (P2)
10 Target : <0x006829a8> { :jffs2:_jffs2_add_full_dnode_to_inode + 0xac }
Source : <0x0068294e> { :jffs2:_jffs2_add_full_dnode_to_inode + 0x52 } IF !CC JUMP pcrel
11 Target : <0x0068293a> { :jffs2:_jffs2_add_full_dnode_to_inode + 0x3e }
Source : <0x00682710> { :jffs2:_jffs2_set_inocache_state + 0x170 } RTS
12 Target : <0x00682700> { :jffs2:_jffs2_set_inocache_state + 0x160 }
Source : <0x00087cce> { _rb_next + 0x2a } RTS
13 Target : <0x00087ccc> { _rb_next + 0x28 }
Source : <0x00087ce4> { _rb_next + 0x40 } IF CC JUMP pcrel
14 Target : <0x00087cde> { _rb_next + 0x3a }
Source : <0x00087cd8> { _rb_next + 0x34 } JUMP.S
15 Target : <0x00087cd6> { _rb_next + 0x32 }
Source : <0x00087cbc> { _rb_next + 0x18 } IF CC JUMP pcrel
Kernel Stack
Stack info:
SP: [0x01827f24] <0x01827f24> /* kernel dynamic memory (maybe user-space) */
Memory from 0x01827f20 to 01828000
01827f20: 7fffffff [018bd14a] 00008000 00002000 00000000 01828000 018bd14a 018bd14a
01827f40: 018c1f92 ffa00fe4 02001044 018bec35 018bf891 018bec34 018bf88e 00000000
01827f60: 00000000 0000234b 00000000 00006666 00000000 00000000 00000000 00000000
01827f80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
01827fa0: 00000000 00000000 00000000 00000001 018d4424 018e0d10 018e0d1c 006ca190
01827fc0: 006ca1ac 0000002d 000000f8 018d0edf 00000004 0000000a 0000000a 7fffffff
01827fe0: 00000000 00000003 0000000a 006ca190 00000004 00000004 00000004 00000006
Return addresses in stack:
Modules linked in: jffs2 zlib_deflate
Kernel panic - not syncing: Kernel exception
SP: [0x01827a58] <0x01827a58> /* kernel dynamic memory (maybe user-space) */
FP: (0x01827cb8)
Memory from 0x01827a50 to 01828000
01827a50: 01827a58 00000013 [0012f928] 0010646e 01827b34 0012f928 001604be 001604be
01827a70: 001604be 01827a88 00004330 01827b34 00008008 01827b34 0000003f 0000003f
01827a90: 00000000 00000000 0003000b 00000000 00000000 00020000 00000000 00030005
01827ab0: 00000000 00000000 00000000 00040000 00000000 00000000 00000000 00000000
01827ad0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
01827af0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
01827b10: ffa006dc 0015d000 00008008 00002027 000000f8 006a6200 00000000 00000000
01827b30: 00000480 00000480 00008008 00002027 00000000 01827c10 00000480 006829c0
01827b50:<006829b4> 01369603 02002060 0008d71a 0008a854 0008d70a 0008a852 00000000
01827b70: 00000000 0000234b 00000000 00006666 00000000 00000000 00000000 00000000
01827b90: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
01827bb0: 00000000 00000000 00000000 007b66a4 00468100 018e0d10 0008d658 007b4368
01827bd0: 007b3408 004680f8 007b1dec 00000000 007b4368 00000000 006a6200 000000f8
01827bf0: 006a6200 00000000 007b4368 00000003 01369603 01369603 007b4368 00000006
01827c10:<00687366> 007b6660 007a7a8c <006873c4> 007b6660 007a7a8c 007b3408 00000000
01827c30: 00174b0c 01827cb8 004680f8 004680f8 0000000a 00000003 00000000 00000000
01827c50: 000000f8 00000f08 00000000 00000000 0000000a 0000000a 00002a00 004680f8
01827c70: 000000f8 <00681a74> 007b6660 007a7ab4 007f3d00 006a6200 000000f8 000000f8
01827c90: 00000102 00000000 00000000 0000db4a 004680f8 000000f8 0000000a 01827cb4
01827cb0: 00000000 00000000 (00000000)<0003196e> 01826000 001667c0 007a7b4c 0000000a
01827cd0: 0000000a 000000f8 00000f08 <0068df3a> 0004046c 000000f8 00000000 0000000a
01827cf0: 0000000a 007f3d00 006a6000 0068ed90 00000000 00000000 000000f8 006a6000
01827d10: 007f3d00 007a7b4c 00031ab0 01827e54 0104b920 000000f8 01827d4c 00000000
01827d30: 00000000 000000f8 0104b920 01827d4c 000000f8 00000000 0104b920 01827e90
01827d50: 00000001 00000000 0000000a 00033232 007a7ab4 0000000a 01827e90 00000000
01827d70: 00000000 00000241 00000022 01827e90 000000f8 00000000 01827e54 0000000a
01827d90: 00000000 0104b920 0000000a 00000000 000000f8 00000000 45984f02 00000000
01827db0: 0000000a 018e0d1c 0003342c 01827e20 0104b920 00000001 007a7b20 01827e90
01827dd0: 000000f8 00000000 01827e20 01827e90 00000001 01827e54 00000000 <00042e22>
01827df0: 01827e20 0104b920 01827ef0 01827e90 006ca190 0000000a 0000000a 000001b6
01827e10: 0104a000 0000003f 000000f8 00000000 01826000 00000000 00000000 00000001
01827e30: ffffffff 0104b920 00000000 00000000 00000000 00000000 01045920 00000000
01827e50: 00000000 000000f8 00000000 01827db8 0016a588 0000000a 00000802 0000000a
01827e70: 018e0e88 00040aea 00000000 00000002 007a7ab4 0104b920 018e0ce0 00043684
01827e90: 006ca190 0000000a <00043628> 0104b920 00000004 0000002d 01827ef0 0004cf72
01827eb0: 0104b920 00000036 01827ef0 00000000 00000000 0004374c 0104b920 00000004
01827ed0: 006ca190 0000000a 7fffffff 00000000 00000004 00000241 ffffe000 01827ef0
01827ef0: 000000f8 00000000 00000000 <ffa008d6> 0004371c 00000000 ffffe000 ffffe000
01827f10: 000003e0 0000fffe 00000003 00000000 7fffffff 018bd14a 00008000 00002000
01827f30: 00000000 01828000 018bd14a 018bd14a 018c1f92 ffa00fe4 02001044 018bec35
01827f50: 018bf891 018bec34 018bf88e 00000000 00000000 0000234b 00000000 00006666
01827f70: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
01827f90: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000001
01827fb0: 018d4424 018e0d10 018e0d1c 006ca190 006ca1ac 0000002d 000000f8 018d0edf
01827fd0: 00000004 0000000a 0000000a 7fffffff 00000000 00000003 0000000a 006ca190
01827ff0: 00000004 00000004 00000004 00000006
address : <0x006829b4> { :jffs2:_jffs2_add_full_dnode_to_inode + 0xb8 }
address : <0x00687366> { :jffs2:_jffs2_write_inode_range + 0x276 }
address : <0x006873c4> { :jffs2:_jffs2_write_inode_range + 0x2d4 }
address : <0x00681a74> { :jffs2:_jffs2_compress + 0x1890 }
frame 1 : <0x0003196e> { _generic_perform_write + 0x9e }
address : <0x0068df3a> { :jffs2:_jffs2_flash_read + 0xbee }
address : <0x00042e22> { _do_sync_write + 0x8e }
address : <0x00043628> { _vfs_write + 0x68 }
address : <0xffa008d6> { _system_call + 0x6a }
Can you help us?
We're not dealing with a root filesystem or a linux boot partition. So the image erase size shouldn't be a problem. (We don't have a jffs2 image.) We're just mounting a jffs2 filesystem for generic storage.
It has been erased first with "flash_eraseall -j /dev/mtd4".
And afterwards mounted with "mount -t jffs2 /dev/mtdblock4 /mnt/nand"
Also it seems to have a lot of bad blocks: (It doesn't seem likely?)
NAND device: Manufacturer ID: 0x20, Chip ID: 0x75 (ST Micro NAND 32MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 0 at 0x000000000000
Bad eraseblock 513 at 0x000000804000
Bad eraseblock 555 at 0x0000008ac000
Bad eraseblock 556 at 0x0000008b0000
Bad eraseblock 609 at 0x000000984000
Bad eraseblock 629 at 0x0000009d4000
Bad eraseblock 744 at 0x000000ba0000
Bad eraseblock 756 at 0x000000bd0000
Bad eraseblock 759 at 0x000000bdc000
Bad eraseblock 781 at 0x000000c34000
Bad eraseblock 840 at 0x000000d20000
Bad eraseblock 889 at 0x000000de4000
Bad eraseblock 940 at 0x000000eb0000
Bad eraseblock 955 at 0x000000eec000
Bad eraseblock 981 at 0x000000f54000
Bad eraseblock 1053 at 0x000001074000
Bad eraseblock 1104 at 0x000001140000
Bad eraseblock 1155 at 0x00000120c000
Bad eraseblock 1345 at 0x000001504000
Bad eraseblock 1562 at 0x000001868000
Bad eraseblock 1563 at 0x00000186c000
Bad eraseblock 1575 at 0x00000189c000
Bad eraseblock 1587 at 0x0000018cc000
Bad eraseblock 1588 at 0x0000018d0000
Bad eraseblock 1611 at 0x00000192c000
Bad eraseblock 1671 at 0x000001a1c000
Bad eraseblock 1731 at 0x000001b0c000
Bad eraseblock 1870 at 0x000001d38000
Bad eraseblock 1934 at 0x000001e38000
Bad eraseblock 1971 at 0x000001ecc000
Bad eraseblock 2045 at 0x000001ff4000