From nobody@FreeBSD.org  Thu Jun 23 18:48:26 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 76BC6106567C
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 23 Jun 2011 18:48:26 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [69.147.83.34])
	by mx1.freebsd.org (Postfix) with ESMTP id 62E528FC18
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 23 Jun 2011 18:48:26 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p5NImPJ8083698
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 23 Jun 2011 18:48:25 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p5NImP5B083697;
	Thu, 23 Jun 2011 18:48:25 GMT
	(envelope-from nobody)
Message-Id: <201106231848.p5NImP5B083697@red.freebsd.org>
Date: Thu, 23 Jun 2011 18:48:25 GMT
From: Patrick Lamaiziere <patfbsd@davenulle.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: libdisk(3) segfault in Open_Disk() with "ada0"
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         158230
>Category:       kern
>Synopsis:       libdisk(3) segfault in Open_Disk() with "ada0"
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 23 18:50:12 UTC 2011
>Closed-Date:    
>Last-Modified:  Sun Jun 26 09:20:01 UTC 2011
>Originator:     Patrick Lamaiziere
>Release:        8.2-STABLE / i386
>Organization:
>Environment:
FreeBSD roxette.lamaiziere.net 8.2-STABLE FreeBSD 8.2-STABLE #1: Wed Jun  1 20:18:11 CEST 2011     patrick@roxette.lamaiziere.net:/usr/obj/usr/src/sys/ROXETTE  i386

>Description:
When using sysintall(8), it crashes while "probing devices".

I've tracked down the problem to libdisk(3) and it appears that it crashes while getting disk info on my ada0 disk.

This is reproductible by using the libdisk test suite in /usr/src/lib/libdisk (tst01.c).

tst01 ada0
Gdb:
Starting program: /usr/src/lib/libdisk/tst01 ada0

Program received signal SIGSEGV, Segmentation fault.
0x08063032 in L1 ()
(gdb) bt
#0  0x08063032 in L1 ()
#1  0x28405400 in ?? ()
#2  0x0804bd8c in Int_Open_Disk (name=0xbfbfea1b "ada0", conftxt=Variable "conftxt" is not available.
)
    at open_disk.c:55
#3  0x08049dcd in Open_Disk (name=0xbfbfea1b "ada0") at disk.c:106
#4  0x08048438 in main (argc=Variable "argc" is not available.
) at tst01.c:140

Please tell me if you need more information.
Thanks, regards.

>How-To-Repeat:
# cd /usr/src/lib/libdisk
# tst01 ada0


>Fix:


>Release-Note:
>Audit-Trail:

From: Patrick Lamaiziere <patfbsd@davenulle.org>
To: bug-followup@FreeBSD.org <bug-followup@FreeBSD.org>
Cc:  
Subject: Re: bin/158230: libdisk(3) segfault in Open_Disk() with "ada0"
Date: Sun, 26 Jun 2011 11:11:47 +0200

 Le Thu, 23 Jun 2011 18:48:25 GMT,
 Patrick Lamaiziere <patfbsd@davenulle.org> a crit :
 
 Hello,
 
 > >Description:
 > When using sysintall(8), it crashes while "probing devices".
 > 
 > I've tracked down the problem to libdisk(3) and it appears that it
 > crashes while getting disk info on my ada0 disk.
 > 
 > This is reproductible by using the libdisk test suite
 > in /usr/src/lib/libdisk (tst01.c).
 
 This is because I use gsched(8) on ada0. Without that works fine.
 
 Regards.
>Unformatted:
