Subject: kern/32257: vinum crashes on writing larger files
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Lasse Kliemann <lasse-send-pr-2005@plastictree.net>
List: netbsd-bugs
Date: 12/05/2005 21:30:01
>Number:         32257
>Category:       kern
>Synopsis:       vinum crashes on writing larger files
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 05 21:30:00 +0000 2005
>Originator:     Lasse Kliemann
>Release:        NetBSD 3.0_RC5
>Organization:
>Environment:
Architecture: i386
Machine: i386
>Description:
Writing a file from /dev/zero with approx. more than 420 megabytes leads to a crash:

uvm_fault(0xcaec8a80, 0, 0, 2) -> 0xe
kernel: page fault trap, code=0
Stopped in pid 115.1 (dd) at  netbsd:memcpy+0x15:  repe movsl  (%esi),%es:(%edi)
db>

>How-To-Repeat:
I had several crashes with vinum on two different machines (never used vinum 
before). It always happened when doing large writing operations.
I then systematically reproduced the problem doing the following:

Label /dev/sd0a (USB drive) as type 'vinum' with approx 4 GB of space.

# vinum create vconfig1

--[ begin vconfig1 ]--
drive a device /dev/sd0a
volume myvol
plex org concat
sd length 0 drive a
--[ end vconfig1 ]--

# newfs /dev/vinum/myvol
# mount /dev/vinum/myvol /mnt
# cd /mnt
# dd if=/dev/zero of=zero bs=10m progress=1

Stops with the above error message.

After reboot:

# fsck_ffs /dev/vinum/myvol
Can't open /dev/vinum/rmyvol: Device not configured
# vinum read /dev/sd0

Now fsck works. The file 'zero' on the volume has 0 size.
Trying again, dd stops at the same position (I think, which is about 42 dots). 
The error message is the same, only the pid has changed.

>Fix:
No idea.