From owner-freebsd-current Fri Oct 19 8: 0:46 2001 Delivered-To: freebsd-current@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by hub.freebsd.org (Postfix) with ESMTP id 796F037B405 for ; Fri, 19 Oct 2001 08:00:43 -0700 (PDT) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.6/8.11.6) with ESMTP id f9JF0GG16546; Fri, 19 Oct 2001 17:00:17 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Chad David Cc: freebsd-current@FreeBSD.ORG Subject: Re: disk_clone() bug In-Reply-To: Your message of "Fri, 19 Oct 2001 02:22:29 MDT." <20011019022229.A90892@colnta.internal> Date: Fri, 19 Oct 2001 17:00:16 +0200 Message-ID: <16544.1003503616@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Sounds like the bug is the md driver cloning "md10ec" which it shouldn't do. This bug must naturally be in md_clone(), but I don't have the minutes right now to hunt it down. Should be quite simple to nail, it's just some string handling code. Poul-Henning In message <20011019022229.A90892@colnta.internal>, Chad David writes: >I posted a bug report and patch in kern/29104 and Dima Dorfman also mentioned >this in July/August, but it still has not been resolved. The method of >triggering it that I detailed in my bug report no longer seems to work, >but I've managed to create another one. > ># mdconfig -a -t swap -s 32m -u 10 ># disklabel -r -w md10 auto ># disklabel -e md10e (copy c to e and set type to 4.2BSD) ># ls -l /dev/md10* >crw-r----- 1 root operator 95, 0x00010052 Oct 19 01:50 /dev/md10 >crw-r----- 1 root operator 95, 82 Oct 19 02:00 /dev/md10c >crw-r----- 1 root operator 95, 84 Oct 19 01:55 /dev/md10ec >crw------- 1 root wheel 95, 0xffff00ff Oct 19 01:50 /dev/mdctl > >Now if you access (open(2)) md10e the system will kill itself when you >run mdconfig -d. If I am doing something evil I'd like to know, but either >way the kernel should not enter an endless loop! > >I have not had time to determine why disklabel -e md10e will kill it, but >disklabel -e /dev/md10e will not. I think it has to do with how disklabel >appends the 'c'. > >The patch that I provided in 29104 is probably not the correct solution >(I like Dima's default better), and may not even be "fixing" the problem >in the correct place. Any advice would be very welcome. > >-- >Chad David davidc@acns.ab.ca >ACNS Inc. Calgary, Alberta Canada > >To Unsubscribe: send mail to majordomo@FreeBSD.org >with "unsubscribe freebsd-current" in the body of the message > -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message