[Unionfs] Oops when inserting rw branch with unionfs on root filesystem

Klaus Fuerstberger info at expires-20080606.gate.mooo.com
Wed Mar 26 06:40:59 EDT 2008


Erez Zadok said the following on 25.03.2008 22:50:
>> I have a unionfs root filesystem. Sometimes I want to sync the unionfs 
>> changes in ram back to the CF card. This is done with rsync and ist no 
>> problem. But now I want to free the used ram of the unionfs. Mostly it 
>> works, if I simlpe delete the /ram/changes/*, but sometimes the system 
>> freezes.

Answering to my own posting:
I noticed that this *always* works fine, when I did a "mount -t unionfs
-o remount,incgen none /" just after deleting the contents of the rw
branch with unionfs 2.2.4. With the new 2.3.1 this does not work
anymore. More below.

>> Now I thought it would be the cleanest to insert another leftmost 
>> read-write branch at highest priority and delete the old read-write 
>> branch with the used memory. This resulted in the crash below.
>> Is there any clean method, beside a reboot, to free the used memory of 
>> the union after the rsync?

This works now with 2.3.1 I'm able to insert a topleft rw branch. 
Although I'm not able to delete the old rw branch because it is mounted 
on the root filesystem and busy.

But originally I wanted the following:
#########################
mount -t ext3 -o remount,rw /dev/hda1 /ram/rootfs
rsync -av --exclude=/tmp/ --exclude=/ram/ --exclude=/proc/
--exclude=/sys/ --exclude=/dev/ --delete / /ram/rootfs/
mount -t ext3 -o remount,ro /dev/hda1 /ram/rootfs
sync
rm -r /ram/changes/*
mount -t unionfs -o remount,incgen none /
#########################

As I said above, this works with unionfs 2.2.4 and kernel 2.6.24.3

Now with unionfs 2.3.1 and kernel 2.6.24.4 I got this oops just after
"rm -r /ram/changes/*". This is mostly reproducable.

#########################
alixtest login: BUG: unable to handle kernel NULL pointer dereference at 
virtual address 00000018
printing eip: e0833eb7 *pde = 00000000
Oops: 0000 [#1]
Modules linked in: ipv6 dm_snapshot dm_mirror dm_mod ipt_MASQUERADE 
iptable_nat xt_mac xt_limit ipt_REJECT xt_TCPMSS xt_tcpudp ipt_LOG 
nf_conntrack_ipv4 xt_state iptable_filter ip_tables x_tables nf_nat_ftp 
nf_nat nf_conntrack_ftp nf_conntrack parport_pc parport serio_raw pcspkr 
psmouse i2c_piix4 i2c_core button evdev ext3 jbd ide_cd cdrom ide_disk 
8139cp generic floppy 8139too mii uhci_hcd piix usbcore ide_core unionfs

Pid: 1720, comm: syslogd Not tainted (2.6.24.4-alixtest #1)
EIP: 0060:[<e0833eb7>] EFLAGS: 00010202 CPU: 0
EIP is at unionfs_file_revalidate+0x5eb/0xa85 [unionfs]
EAX: 00000000 EBX: 00000004 ECX: df13dee8 EDX: dea9ea00
ESI: de651200 EDI: 00000005 EBP: debedec0 ESP: dea9dec0
  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
Process syslogd (pid: 1720, ti=dea9c000 task=de6bcab0 task.ti=dea9c000)
Stack: 00000001 dea9df04 c01590d9 de8bd000 de8bd000 00000286 01a9df34 
de684400
        df151e14 00000005 00000005 c015e88d 0000000f 08052698 dea9df34 
00000006
        0000000f 00000000 c01510bd dea9dfa0 debedec0 debedec0 00000001 
00000001
Call Trace:
  [<c01590d9>] do_path_lookup+0x131/0x14c
  [<c015e88d>] dput+0x15/0xcb
  [<c01510bd>] do_loop_readv_writev+0x29/0x4c
  [<c0151968>] do_readv_writev+0xcd/0x18c
  [<e082c1bf>] unionfs_write+0x0/0xf5 [unionfs]
  [<e0834399>] unionfs_flush+0x48/0xdc [unionfs]
  [<c014fd18>] filp_close+0x32/0x58
  [<c0150f30>] sys_close+0x54/0x83
  [<c0103bc2>] syscall_call+0x7/0xb
  =======================
Code: 1b 00 0f 84 15 04 00 00 f7 45 18 03 04 00 00 0f 84 08 04 00 00 8b 
45 6c 8b 18 89 5c 24 5c c1 e3 02 89 5c 24 70 8b 40 10 8b 04 18 <f7> 40 
18 03 04 00 00 0f 85 e5 03 00 00 8b 7c 24 20 8b 47 50 8b
EIP: [<e0833eb7>] unionfs_file_revalidate+0x5eb/0xa85 [unionfs] SS:ESP 
0068:dea9dec0
Kernel panic - not syncing: Fatal exception
#########################

~# cat /proc/mounts
rootfs / rootfs rw 0 0
none /sys sysfs rw,nosuid,nodev,noexec 0 0
none /proc proc rw,nosuid,nodev,noexec 0 0
udev /dev tmpfs rw 0 0
tmpfs /ram tmpfs rw 0 0
/dev/hda1 /ram/rootfs ext3 ro,data=ordered 0 0
unionfs / unionfs rw,dirs=/ram/changes=rw:/ram/rootfs=ro 0 0
unionfs /dev/.static/dev unionfs rw,dirs=/ram/changes=rw:/ram/rootfs=ro 0 0
tmpfs /lib/init/rw tmpfs rw,nosuid 0 0
usbfs /proc/bus/usb usbfs rw,nosuid,nodev,noexec 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,nosuid,noexec 0 0


Bye Klaus


More information about the unionfs mailing list