From nobody@FreeBSD.ORG  Thu Nov 16 23:36:14 2000
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id 4479F37B479; Thu, 16 Nov 2000 23:36:14 -0800 (PST)
Message-Id: <20001117073614.4479F37B479@hub.freebsd.org>
Date: Thu, 16 Nov 2000 23:36:14 -0800 (PST)
From: rexluo@synology.com
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@FreeBSD.org
Subject: Vinum RAID5 degraded write not consistency 
X-Send-Pr-Version: www-1.0

>Number:         22909
>Category:       kern
>Synopsis:       Vinum RAID5 degraded write not consistency
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    grog
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 16 23:40:10 PST 2000
>Closed-Date:    Wed May 30 02:08:01 PDT 2001
>Last-Modified:  Wed May 30 02:12:05 PDT 2001
>Originator:     Rex Luo
>Release:        4.1-20000812-STABLE
>Organization:
Synology Inc
>Environment:
FreeBSD xxxxx 4.1-20000812-STABLE FreeBSD 4.1-20000812-STABLE #205:Fri
Nov 17 23:23:05 CST 2000 root@RexLuo-Dev.synology.com:/usr/src/sys/
compile/MyKernel i386
>Description:


  If you copy one file(over 10Mb is better) to several copies at the 
same time(over 10 is better) on vinum raid5 drive in degraded mode(my 
configuration is 4 disks orignally, now degraded mode is 3 disks), them 
compare each copies with the original file. You will find some files are
different, and differences are not only one or two bytes. If you format
drive, and repeat again, number of wrong files and places are different.
That means the symptom are random case.

  If you copy and compare sequentially, everything is fine. If you do
the test during normal condition(4 disks from configuration), everything
is ok too. 


  My machine is Celeron 500 with 64M ram, my test script is like

#!/bin/sh
exec cp $1 1&
exec cp $1 2&
..
..
..

then you can compare the original file with 1, 2, 3, ....
(cmp file 1)




>How-To-Repeat:

Run the vinum raid5 less 1 disk than your configuration.
for example: configuration is 4 disk, you stop one sd,

write a script like
#!/bin/sh
exec cp $1 1&
exec cp $1 2&
...
...

copy more than 10 copies is better, and file size more than 10 Mb
is easier to hit.

cmp $1 1
cmp $1 2
..
..
..


the symptom is 
different file xxxx pace xxxxx
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->grog 
Responsible-Changed-By: sos 
Responsible-Changed-When: Wed May 30 01:23:46 PDT 2001 
Responsible-Changed-Why:  
Vinum is groggy's baby. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=22909 
State-Changed-From-To: open->closed 
State-Changed-By: grog 
State-Changed-When: Wed May 30 02:08:01 PDT 2001 
State-Changed-Why:  
Problem has been fixed. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=22909 
>Unformatted:

Greg Lehey, 30 May 2001

Yes, there were a number of race conditions in RAID-[45] in versions
of -STABLE sys/dev/vinum/vinumlock.c before 1.18.2.3 (4 April 2001).
You should upgrade to 4.3-STABLE; this should then no longer occur.

PR closed

