Subject: kern/36705: fast vnconfig/mount/umount/vnconfig -u panics NetBSD
To: None <email@example.com, firstname.lastname@example.org,>
From: None <email@example.com>
Date: 07/30/2007 09:30:00
>Synopsis: fast vnconfig/mount/umount/vnconfig -u panics NetBSD
>Arrival-Date: Mon Jul 30 09:30:00 +0000 2007
>Originator: Jan Danielsson
>Release: NetBSD/amd64 3.1
La Cosa Nostra
NetBSD nl102-238-202.student.uu.se 3.1 NetBSD 3.1 (ANCA) #4: Tue Jul 17 18:57:21 CEST 2007 firstname.lastname@example.org:/usr/src/sys/arch/amd64/compile/ANCA amd64
I have a script which builds a custom boot image. It runs:
# vnconfig -c vnd0 boot.img
[..initialize boot record and file system..]
# mount /dev/vnd0a /mnt/img
[..copy stuff to image..]
# umount /mnt/img
# vnconfig -u vnd0
When this script is run, it may cause the system to panic. I have seen this problem before (under 3.0 I blieve), and thought it was just some random behavior. But it turns out it's pretty reproducible. When it hangs, I just have time to read that vnconfig -c can not run, because the device already exists. Though I believe that it only panics on the "vnconfig -u" or the "umount".
It doesn't happen every time.
Unfortunately, I currently don't have the time to provoke the reaction to diagnose it further, but I will when I have more spare time in case someone needs be to.
Apparently configure a vnd, mount, copy stuff to, unmount, and unconfigure it.
Not a fix, but adding a bunch of "sleep 1" makes the panics go away. I suspect that's just makes it less likely for the problem to appear though.