kern/52916: vinum causes panic after start/stop/... cycle, easy
to reproduce
Greg 'groggy' Lehey
grog at FreeBSD.org
Thu Jun 5 22:30:15 PDT 2003
The following reply was made to PR kern/52916; it has been noted by GNATS.
From: Greg 'groggy' Lehey <grog at FreeBSD.org>
To: Pawel Malachowski <pawmal at unia.3lo.lublin.pl>
Cc: FreeBSD-gnats-submit at FreeBSD.org
Subject: Re: kern/52916: vinum causes panic after start/stop/... cycle, easy to reproduce
Date: Fri, 6 Jun 2003 14:52:05 +0930
--lrZ03NoBR/3+SXJZ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Wednesday, 4 June 2003 at 21:00:24 +0200, Pawel Malachowski wrote:
> On 4 Jun 2003 at 16:57, Greg 'groggy' Lehey wrote:
>
>>>> Description:
>>> Both 4.8-RELEASE and fresh 4.8-STABLE (on two different machines) catch
>>> kernel panic when I try something like:
>>> vinum start;vinum stop;vinum start;vinum stop;vinum start;vinum stop
>>>
>>> It is very easy to reproduce.
>>
>> I was not able to reproduce it.
>
> I've published this script on Polish FreeBSD users group, people confirm
> their machines are crashing too (about 20-60 start/stop cycles):
>
>
>>> 4.8-STABLE was compiled with debug symbols, unfortunately there is
>>> no crashdump.
>>
>> What's the problem? Do you have crash dumps enabled?
>
> Yes.
>
>> grep dump /etc/rc.conf
> dumpdev=3D"/dev/ad0s2b"
>> swapinfo
> Device 1K-blocks Used Avail Capacity Type
> /dev/ad0s2b 1048448 0 1048448 0% Interleaved
>> sysctl kern.dumpdev
> kern.dumpdev: { major =3D 116, minor =3D 0x30001 }
>
> Swap is big enough.
Hmm. =20
>>> fault virtual address =3D 0xb7
>>> fault code =3D supervisor read, page not present
>>> instruction pointer =3D 0x8:0xc01bedc8
>>
>> This one.
>
> `x $eip' shows dscheck+0x104 b8968b
OK, this might give us a clue.
>>> So I compiled vinum statically into kernel,
>>>
>>> # vinum start;vinum stop;vinum start;vinum stop;
>>> ** no drives found: No such file or directory
>>> Can't unload vinum: No such file or directory
>>> ** no drives found: No such file or directory
>>> Can't unload vinum: No such file or directory
>>>
>>> and it crashed again with message like this:
>>>
>>> vinum: no drives found
>>> vinum: no drives found
No, that's not a crash message. That's normal.
I'm guessing this has something to do with md devices. Do you use
any? I don't, and every 'vinum start' created one. I've committed a
fix to vinum(8) (revision 1.31.2.6 of src/sbin/vinum/commands.c).
Please try it and tell me if it fixes the problem. Here it is again
to save you cvsupping:
diff -w -u -r1.31.2.5 commands.c
--- commands.c 4 May 2002 05:04:14 -0000 1.31.2.5
+++ commands.c 6 Jun 2003 05:08:43 -0000
@@ -275,6 +275,10 @@
char reply[32];
int error;
=20
+ if (! isatty (STDIN_FILENO)) {
+ fprintf (stderr, "Please enter this command from a tty device\n");
+ return;
+ }
printf(" WARNING! This command will completely wipe out your vinum co=
nfiguration.\n"
" All data will be lost. If you really want to do this, enter the =
text\n\n"
" NO FUTURE\n"
@@ -544,6 +548,7 @@
=20
if ((((stat->device_type & DEVSTAT_TYPE_MASK) =3D=3D DEVSTAT_TY=
PE_DIRECT) /* disk device */
|| ((stat->device_type & DEVSTAT_TYPE_MASK) =3D=3D DEVSTAT=
_TYPE_STORARRAY)) /* storage array */
+ &&((stat->device_type & DEVSTAT_TYPE_IF_MASK) !=3D DEVSTAT_TYPE=
_IF_OTHER) /* and not md */
&&((stat->device_type & DEVSTAT_TYPE_PASS) =3D=3D 0) /* and not=
passthrough */
&&((stat->device_name[0] !=3D '\0'))) { /* and it has=
a name */
sprintf(enamelist, "%s%s%d", _PATH_DEV, stat->device_name, =
stat->unit_number);
Greg
--
See complete headers for address and phone numbers
--lrZ03NoBR/3+SXJZ
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (FreeBSD)
iD8DBQE+4CT9IubykFB6QiMRAtPeAKCYfaIlE20BClGuEIU3Jg5b/wszKgCeMlB1
HMmTlyd/mnfnY4Jlqnt82rc=
=pmOV
-----END PGP SIGNATURE-----
--lrZ03NoBR/3+SXJZ--
More information about the freebsd-bugs
mailing list