R: [Netkit.users] Problem with script
maxonthenet a tiscali.it
Sab 23 Ott 2004 13:36:29 CEST
first of all, I want to thank you for pointing out this bug.
I've been investigating in this, and what has come out is that this behavior
seems to be due to kernel issues: the scripts are indeed correct.
The problem arises when writing to the host filesystem from inside a virtual
machine. What happens is the following: some of the lab scripts use
temporary files (*.booting, *.ready or similar) to detect the end of the
boot phase of a virtual machine. These files are stored on the real host
filesystem, and are created and deleted dinamically by the virtual machines
while the lab starts. This makes the kernel crash with a nasty "kernel BUG
at fs/inode.c" message.
By further investigating, I have discovered that the following interactions
with the host filesystem (i.e. the /hosthome directory inside the virtual
machines) DO NOT cause the crash:
- file creation (e.g., 'touch /hosthome/delme')
- file renaming (e.g., 'mv /hosthome/delme /hosthome/delme2')
- file creation and subsequent deletion (e.g., 'touch /hosthome/delme; rm
while the following actually bring the virtual machine down:
- writing to file (e.g., 'echo text > /hosthome/delme')
- existing file deletion (e.g., 'rm /hosthome/delme')
The problem is not bound to the specific host filesystem being used: I am
running Netkit over an ext3 partition, and this happens nevertheless.
We are currently working on a fix for this bug. However, this may take some
In the meantime, we suggest to have a look at the lab scripts before
starting them: if you find any of the "dangerous" commands listed above, we
suggest to replace them with the "safer" ones (mv, etc.), like Arpeda has
explained. This should not be too difficult, since most scripts have the
same structure (i.e., a function called "notifyfinish" which removes a
file), and hence can be fixed by replacing "rm" with "mv" as shown by
Other lab scripts do not write files at all, but just prompt the user for
pressing Enter when ready to start the next machine. These scripts do not
need any fix.
Sorry for the inconvenience.
# -----Messaggio originale-----
# Da: netkit.users-admin a dia.uniroma3.it
# [mailto:netkit.users-admin a dia.uniroma3.it]Per conto di Arpeda
# Inviato: venerd́ 22 ottobre 2004 17.15
# A: netkit.users a dia.uniroma3.it
# Oggetto: [Netkit.users] Problem with script
# Hi to all,
# sorry for my bad english.
# I have download some scripts from www.netkit.org, but i have some
# problem. If I launch one oh these script, all virtual machine that are
# created die. I have noticed that vm crashes when attempt to remove file
# on really partition (i use reiserfs as main filesystem)
# I have found a solution:
# in notifyfinish() use mv insted of rm
# rm $1.booting
# mv $1.booting mv $1.started
# I'll try to recompile a personal uml-kernel to add reiserfs support
# I use gentoo on reiserfs-3.6
# best regards
# Daniele Antonini alias "Arpeda"
# Netkit.users mailing list
# Netkit.users a pop.dia.uniroma3.it
Maggiori informazioni sulla lista