From owner-freebsd-bugs Fri Aug 16 18:10: 9 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3B48C37B400 for ; Fri, 16 Aug 2002 18:10:04 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 82F4943E7B for ; Fri, 16 Aug 2002 18:10:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g7H1A3JU011805 for ; Fri, 16 Aug 2002 18:10:03 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g7H1A3of011804; Fri, 16 Aug 2002 18:10:03 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8E49437B400 for ; Fri, 16 Aug 2002 18:06:51 -0700 (PDT) Received: from www.freebsd.org (www.FreeBSD.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4B5E943E65 for ; Fri, 16 Aug 2002 18:06:51 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.4/8.12.4) with ESMTP id g7H16pOT086208 for ; Fri, 16 Aug 2002 18:06:51 -0700 (PDT) (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.4/8.12.4/Submit) id g7H16p2D086207; Fri, 16 Aug 2002 18:06:51 -0700 (PDT) Message-Id: <200208170106.g7H16p2D086207@www.freebsd.org> Date: Fri, 16 Aug 2002 18:06:51 -0700 (PDT) From: Doug Swarin To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: kern/41740: vinum issues: page fault while rebuilding; inability to hot-rebuild striped plexes Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 41740 >Category: kern >Synopsis: vinum issues: page fault while rebuilding; inability to hot-rebuild striped plexes >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Aug 16 18:10:03 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Doug Swarin >Release: 4-STABLE >Organization: >Environment: FreeBSD vmware.localdomain 4.6-STABLE #12: Fri Aug 16 16:29:37 CDT 2002 root@vmware.localdomain:/usr/obj/usr/src/sys/VMWARE i386 >Description: 1. The launch_requests() function in vinumrequest.c needs splbio() protection around the lower loop. Without splbio(), complete_rqe() may be called at splx() in BUF_STRATEGY(). If there are inactive rqgs in rq (for example, with XFR_BAD_SUBDISK), rq may be deallocated before the loop completes walking the rqg queue in rq, causing either a page fault or an infinite loop. 2. A striped plex cannot be safely hot-rebuilt, and there is no warning as such in the documentation. Because all requests to the rebuilding plex return REQUEST_DOWN, the two plexes will be inconsistent after the rebuild finishes since writes to the already-rebuilt region of the rebuilding plex will only be written to the good plex. >How-To-Repeat: 1. Create a pair of striped plexes as a single volume. 'vinum stop' one plex, then 'vinum start' it to start it rebuilding. Run postmark or perform other heavy activity against the mounted filesystem while the rebuild takes place. 2. After the above hot-rebuild, demount it, fsck, and watch the errors fly. The splbio() fix will probably need to be applied before the hot-rebuild will succeed. >Fix: 1. Add 'int s;' to the top of launch_requests() and 's = splbio();' at line 395 and 'splx(s);' at line 439. I apologize for not providing an actual diff, because I am using the web form to submit this. 2. Add a mention to the documentation not to hot-rebuild a striped plex. The long-term fix would be to do the missing code in checksdstate() in vinumstate.c to return the proper result for a striped plex. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message