PDA

View Full Version : Another bug in UnionFS (in knoppix 4.0.2)



Josh Yelon
12-16-2005, 01:43 AM
Here's how you can see the bug.

1. Boot a clean copy of Knoppix 4.0.2 CD English
2. Type "apt-get remove mozilla-thunderbird-locale-de"

UnionFS is now in an inconsistent state. To see the problem, type this:

% ls -al /ramdisk/var/lib/mozilla-thunderbird/
total 8
drwxr-xr-x 7 root root 220 Dec 15 19:28 .
drwxr-xr-x 7 root root 140 Dec 15 19:28 ..
-rwxr-xr-x 1 root root 0 Dec 15 19:28 .wh.components.ini
-rwxr-xr-x 1 root root 0 Dec 15 19:28 .wh.defaults.ini
drwxr-xr-x 3 root root 140 Dec 15 19:28 chrome
drwxr-xr-x 2 root root 140 Dec 15 19:28 components
-rw-r--r-- 1 root root 24 Dec 15 19:28 components.ini
-rw-r--r-- 1 root root 48 Dec 15 19:28 defaults.ini
drwxr-xr-x 2 root root 100 Dec 15 19:28 extensions
drwxr-xr-x 2 root root 60 Dec 15 19:28 extensions.d
drwxr-xr-x 2 root root 60 Dec 15 19:28 locales.d

As you can see, the directory listing contains both "components.ini" and its whiteout, ".wh.components.ini". After some testing, I have discovered that when both the file and the whiteout are present, the results are unpredictable - sometimes the file is there, sometimes it's not.

The reason I noticed this is that I was trying to remaster knoppix, but the remastering howto suggests this step:

cp -Rp /KNOPPIX/* /mnt/hda1/knx/source/KNOPPIX

But I thought, instead of copying the CD to a read-write partition, why not just use unionfs to merge /KNOPPIX with an empty read-write directory? But of course, it didn't work right, and this UnionFS bug is the reason.

- Josh

Josh Yelon
12-16-2005, 07:07 PM
Can anybody confirm that this is doing the same thing on their system? I'm wondering if this has anything to do with hyperthreading (it has that feel of being a race condition).

Dave_Bechtel
12-16-2005, 10:25 PM
IIWY, I'd send an email to Klaus Knopper and inform him of the problem.


Can anybody confirm that this is doing the same thing on their system? I'm wondering if this has anything to do with hyperthreading (it has that feel of being a race condition).