[Yaffs] mv problem
Sergey Kubushyn
ksi at koi8.net
Wed Sep 21 00:44:07 BST 2005
On Wed, 21 Sep 2005, Charles Manning wrote:
> Sergey
>
> Please try to keep your comments constructive.
I'd like to... You can not imagine how angry I am...
> On Wednesday 21 September 2005 08:51, Sergey Kubushyn wrote:
> > On Tue, 20 Sep 2005, Timofei V. Bondarenko wrote:
> >
> > It does NOT. Now it crashes the kernel. When using it as a root FS
> the very
> > first ldconfig bombs out on rename.
> sys_rename->vfs_rename->yaffs_rename
> > and KABOOM!!! -- kernel's dead with sefgault and the filesystem is
> trashed.
>
> Can you please provide a stack dump. That would be constructive.
Here is the ksymoops output. 100% reproducible - mount that fs, copy any
file to anywhere, make an "mv filename filename.old" and KABOOM! you're
dead. On a next mount "filename" is missing, "filename.old" is in place i.e.
it DOES rename files but each rename is accompanied with a kernel crash...
=== Cut ===
ksymoops 2.4.11 on i686 2.6.12-1.1398_FC4. Options used
-v /tmp/vmlinux (specified)
-K (specified)
-L (specified)
-O (specified)
-m /tmp/System.map (specified)
-t elf32-littlearm -a arm
-I- AT91F_LowLevelInit(): Debug channel initialized
100BaseTX and Full Duplex
arm.vadatech.com login: Unable to handle kernel NULL pointer dereference at virtual address 0000002c
Internal error: Oops: 17 [#1]
CPU: 0
pc : [<c00e0ad8>] lr : [<00000001>] Not tainted
sp : c1b8be98 ip : 60000013 fp : c1b8bec0
r10: c16ac4cc r9 : 00000001 r8 : c14d6000
r7 : c1532538 r6 : c1532538 r5 : c02153d4 r4 : c16ac334
r3 : c14d6070 r2 : 00000000 r1 : 00000007 r0 : c01e8af8
Flags: nZCv IRQs on FIQs on Mode SVC_32 Segment user
Control: 317F Table: 216B4000 DAC: 00000015
Stack: (0xc1b8be98 to 0xc1b8c000)
be80: 00000000 0000000a
bea0: c16ac334 c16ac530 c16ac4cc c1532538 c1532538 c1b8bef4 c1b8bec4 c008a998
bec0: c00e0a18 c167c420 00000000 ffffffd9 c16ac334 c16ac4cc c16acdd4 c16acdd4
bee0: 00000000 c1be5000 c1b8bfa4 c1b8bef8 c008ac0c c008a4dc c16a5000 c16acdd4
bf00: c02c2780 a63a6f54 0000000d c16a5000 00000010 00000000 00000000 c0067f30
bf20: c0067888 c151a8f4 c16b4000 c1bb9d80 c1f75060 bed77a3c c1b8bf4c c16acdd4
bf40: c02c2780 d87eaff8 00000009 c1be5000 00000010 00000000 00000000 c1ecf2e0
bf60: c1bb9d80 c1b8bfac c1b8bf74 c00238d0 c00f85c0 00000000 bed77b04 bed77c22
bf80: bed77b0c bed77b04 00000026 c001cee4 c1b8a000 00000002 00000000 c1b8bfa8
bfa0: c001cd60 c008aab4 bed77c22 c00237a4 bed77c18 bed77c22 401cf71c 00000000
bfc0: bed77c22 bed77b0c bed77b04 00000000 bed77c22 00000000 00000002 00000000
bfe0: 401107f0 bed779dc 0001c5cc 401107f4 60000010 bed77c18 e3530002 1a000026
Backtrace:
[<c00e0a08>] (yaffs_rename+0x0/0xfc) from [<c008a998>] (vfs_rename+0x4cc/0x5d8)
[<c008a4cc>] (vfs_rename+0x0/0x5d8) from [<c008ac0c>] (sys_rename+0x168/0x1cc)
[<c008aaa4>] (sys_rename+0x0/0x1cc) from [<c001cd60>] (ret_fast_syscall+0x0/0x2c)
Code: 13e00026 189daff0 e5942008 e3a01007 (e592302c)
>>PC; c00e0ad8 <yaffs_rename+d0/fc> <=====
>>r5; c02153d4 <yaffs_traceMask+0/4>
>>r0; c01e8af8 <__func__.0+9b3c/1c154>
Code; c00e0ac8 <yaffs_rename+c0/fc>
00000000 <_PC>:
Code; c00e0ac8 <yaffs_rename+c0/fc>
0: 13e00026 mvnne r0, #38 ; 0x26
Code; c00e0acc <yaffs_rename+c4/fc>
4: 189daff0 ldmneia sp, {r4, r5, r6, r7, r8, r9, sl, fp, sp, pc}
Code; c00e0ad0 <yaffs_rename+c8/fc>
8: e5942008 ldr r2, [r4, #8]
Code; c00e0ad4 <yaffs_rename+cc/fc>
c: e3a01007 mov r1, #7 ; 0x7
Code; c00e0ad8 <yaffs_rename+d0/fc>
10: e592302c ldr r3, [r2, #44]
=== Cut ===
This is the entire capture file (kernel messages might be of some help):
=== Cut ===
DataFlash loader 1.0 (Aug 29 2005 - 16:26:43)
*--------------------------------------*
DataFlash:AT45DB321
Nb pages: 8192
Page Size: 528
Size= 4325376 bytes
Logical address: 0xC0000000
*--------------------------------------*
1: Download Dataflash [addr]
2: Read Dataflash [addr]
3: Start U-BOOT [C0008000 => 21F00000]
*--------------------------------------*
Enter: Load U-BOOT from dataflash to SDRAM
Set PLLA to 180Mhz and Master clock to 60Mhz and start U-BOOT
U-Boot 1.1.2(Vadatech Release) (Sep 19 2005 - 17:50:14)
U-Boot code: 21F00000 -> 21F19D9C BSS: -> 21F1E728
RAM Configuration:
Bank #0: 20000000 32 MB
Flash: 0 kB
NAND:Flash chip found:
Manufacturer ID: 0x20, Chip ID: 0x36 (STMicro Nand512R3A)
1 flash chips found. Total nand_chip size: 64 MB
64 MB
DataFlash:AT45DB321
Nb pages: 8192
Page Size: 528
Size= 4325376 bytes
Logical address: 0xC0000000
Area 0: C0000000 to C0007FFF (RO)
Area 1: C0008000 to C0027FFF (RO)
Area 2: C0028000 to C002FFFF
Area 3: C0030000 to C041FFFF
In: serial
Out: serial
Err: serial
PHY-ID1=2000, PHY-ID2=5c90
Status1 = 786d, Status = 115
100BaseTX and Full Duplex
Hit any key to stop autoboot: 3 2 1 0
## Booting image at 21000000 ...
Image Name: Linux Kernel Image
Image Type: ARM Linux Kernel Image (gzip compressed)
Data Size: 1121959 Bytes = 1.1 MB
Load Address: 20008000
Entry Point: 20008000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting kernel ...
Linux version 2.6.12-vadatech (root at nomad.vadatech.com) (gcc version 3.4.4) #1 Tue Sep 20 14:17:58 PDT 2005
CPU: ARM920Tid(wb) [41129200] revision 0 (ARMv4T)
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Machine: VadaTech VT001
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists
Kernel command line: console=ttyS0,115200n8 mem=32M root=/dev/nfs nfsroot=192.168.20.1:/home/nfs/Vadatech/fs ip=192.168.20.21:192.168.20.1::::eth0
AT91: 128 gpio irqs in 4 banks
PID hash table entries: 256 (order: 8, 4096 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 32MB = 32MB total
Memory: 29952KB available (1971K code, 373K data, 80K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
usbcore: registered new driver usbfs
usbcore: registered new driver hub
NetWinder Floating Point Emulator V0.97 (extended precision)
audit: initializing netlink socket (disabled)
audit(0.360:0): initialized
inotify device minor=63
yaffs Sep 20 2005 14:15:24 Installing.
Initializing Cryptographic API
AT91 Real Time Clock driver.
AT91 SPI driver loaded
AT91 Watchdog Timer enabled (5 seconds)
ttyS0 at MMIO 0xfefff200 (irq = 1) is a AT91_SERIAL
ttyS1 at MMIO 0xfefc4000 (irq = 7) is a AT91_SERIAL
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
loop: loaded (max 8 devices)
eth0: Link now 100-FullDuplex
eth0: AT91 ethernet at 0xfefbc000 int=24 100-FullDuplex (00:04:9f:22:22:25)
eth0: National Semiconductor DP83848 PHY
at91_dataflash: AT45DB321B detected [spi0] (4325376 bytes)
Creating 1 MTD partitions on "AT45DB321B.spi0":
0x00000000-0x00420000 : "The entire DataFlash"
NAND device: Manufacturer ID: 0x20, Chip ID: 0x36 (ST Micro NAND 64MiB 1,8V 8-bit)
Scanning device for bad blocks
Creating 2 MTD partitions on "NAND 64MiB 1,8V 8-bit":
0x00000000-0x00c00000 : "Application Software"
0x00c00000-0x04000000 : "Root FS (Linux)"
usbmon: debugs is not available
at91rm9200-ohci at91rm9200-ohci: AT91RM9200 OHCI
at91rm9200-ohci at91rm9200-ohci: new USB bus registered, assigned bus number 1
at91rm9200-ohci at91rm9200-ohci: irq 23, io base 0x00300000
usb usb1: Product: AT91RM9200 OHCI
usb usb1: Manufacturer: Linux 2.6.12-vadatech ohci_hcd
usb usb1: SerialNumber: at91rm9200
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
pegasus: v0.6.12 (2005/01/13), Pegasus/Pegasus II USB Ethernet driver
usb 1-2: new full speed USB device using at91rm9200-ohci and address 2
usb 1-2: Product: USB To LAN Converter
usb 1-2: Manufacturer: ADMtek
usb 1-2: SerialNumber: 0001
pegasus 1-2:1.0: setup Pegasus II specific registers
pegasus 1-2:1.0: eth1, ADMtek ADM8515 "Pegasus II" USB-2.0 Ethernet, 00:00:e8:00:02:2c
usbcore: registered new driver pegasus
usbcore: registered new driver usbnet
mice: PS/2 mouse device common for all mice
i2c /dev entries driver
Found AT91 i2c
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
NET: Registered protocol family 1
NET: Registered protocol family 17
NET: Registered protocol family 15
eth0: Link now 100-FullDuplex
eth0: Link now 100-FullDuplex
IP-Config: Guessing netmask 255.255.255.0
IP-Config: Complete:
device=eth0, addr=192.168.20.21, mask=255.255.255.0, gw=255.255.255.255,
host=192.168.20.21, domain=, nis-domain=(none),
bootserver=192.168.20.1, rootserver=192.168.20.1, rootpath=
Looking up port of RPC 100003/2 on 192.168.20.1
Looking up port of RPC 100005/1 on 192.168.20.1
VFS: Mounted root (nfs filesystem).
Freeing init memory: 80K
INIT: version 2.85 booting
Welcome to Vadatech Core 1.0
Starting udev:[ OK ]
Setting clock (utc): Wed Dec 31 16:00:53 PST 1997 [ OK ]
Setting hostname arm.vadatech.com: [ OK ]
Remounting root filesystem in read-write mode: [ OK ]
Mounting local filesystems: [ OK ]
Enabling swap space: [ OK ]
INIT: Entering runlevel: 3
Entering non-interactive startup
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
Bringing up interface eth1: [ OK ]
Starting system logger: [ OK ]
Starting kernel logger: [ OK ]
Starting portmap: [ OK ]
Mounting other filesystems: [ OK ]
Starting sshd:[ OK ]
Starting xinetd: [ OK ]
Vadatech Core release 1 (Nostromo)
Kernel 2.6.12-vadatech on an armv4tl
arm.vadatech.com login: Unable to handle kernel NULL pointer dereference at virtual address 0000002c
pgd = c16b4000
[0000002c] *pgd=2151a031, *pte=00000000, *ppte=00000000
Internal error: Oops: 17 [#1]
Modules linked in:
CPU: 0
PC is at yaffs_rename+0xd0/0xfc
LR is at 0x1
pc : [<c00e0ad8>] lr : [<00000001>] Not tainted
sp : c1b8be98 ip : 60000013 fp : c1b8bec0
r10: c16ac4cc r9 : 00000001 r8 : c14d6000
r7 : c1532538 r6 : c1532538 r5 : c02153d4 r4 : c16ac334
r3 : c14d6070 r2 : 00000000 r1 : 00000007 r0 : c01e8af8
Flags: nZCv IRQs on FIQs on Mode SVC_32 Segment user
Control: 317F Table: 216B4000 DAC: 00000015
Process mv (pid: 768, stack limit = 0xc1b8a194)
Stack: (0xc1b8be98 to 0xc1b8c000)
be80: 00000000 0000000a
bea0: c16ac334 c16ac530 c16ac4cc c1532538 c1532538 c1b8bef4 c1b8bec4 c008a998
bec0: c00e0a18 c167c420 00000000 ffffffd9 c16ac334 c16ac4cc c16acdd4 c16acdd4
bee0: 00000000 c1be5000 c1b8bfa4 c1b8bef8 c008ac0c c008a4dc c16a5000 c16acdd4
bf00: c02c2780 a63a6f54 0000000d c16a5000 00000010 00000000 00000000 c0067f30
bf20: c0067888 c151a8f4 c16b4000 c1bb9d80 c1f75060 bed77a3c c1b8bf4c c16acdd4
bf40: c02c2780 d87eaff8 00000009 c1be5000 00000010 00000000 00000000 c1ecf2e0
bf60: c1bb9d80 c1b8bfac c1b8bf74 c00238d0 c00f85c0 00000000 bed77b04 bed77c22
bf80: bed77b0c bed77b04 00000026 c001cee4 c1b8a000 00000002 00000000 c1b8bfa8
bfa0: c001cd60 c008aab4 bed77c22 c00237a4 bed77c18 bed77c22 401cf71c 00000000
bfc0: bed77c22 bed77b0c bed77b04 00000000 bed77c22 00000000 00000002 00000000
bfe0: 401107f0 bed779dc 0001c5cc 401107f4 60000010 bed77c18 e3530002 1a000026
Backtrace:
[<c00e0a08>] (yaffs_rename+0x0/0xfc) from [<c008a998>] (vfs_rename+0x4cc/0x5d8)
[<c008a4cc>] (vfs_rename+0x0/0x5d8) from [<c008ac0c>] (sys_rename+0x168/0x1cc)
[<c008aaa4>] (sys_rename+0x0/0x1cc) from [<c001cd60>] (ret_fast_syscall+0x0/0x2c)
Code: 13e00026 189daff0 e5942008 e3a01007 (e592302c)
=== Cut ===
> I don't see how the whole filesystem could be trashed.
Easy.
> > Next mount attempt results in syslog full of "kernel: yaffs tragedy:
> > attempting to use non-directory as a directory in scan. Put in
> lost+found."
> > messages.
>
> Can you give more details on this?
There is a pre-built root fs. Image is generated with mkyaffsimage. On a
first boot it executes ldconfig, pwconv, chkconfig on several services and
generates ssh keys on its first startup. Somewhere in the process it crashes
and I have a totally botched fs that gives me those messages when I'm trying
to mount it somewhere (this time I'm running NFS root.)
---
******************************************************************
* KSI at home KOI8 Net < > The impossible we do immediately. *
* Las Vegas NV, USA < > Miracles require 24-hour notice. *
******************************************************************
More information about the yaffs
mailing list