Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Sep 2004 18:22:06 +0200
From:      "Simon L. Nielsen" <simon@FreeBSD.org>
To:        freebsd-current@freebsd.org
Cc:        Pawel Jakub Dawidek <pjd@FreeBSD.org>
Subject:   Panic using geom_mirror after "WARNING: Device name truncated!..."
Message-ID:  <20040904162206.GD759@zaphod.nitro.dk>

next in thread | raw e-mail | index | archive | help

--PHCdUe6m4AxPMzOu
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hello

[To Pawel: this mail contain more information than my original private
mail to you]

I stumbled into an slightly odd error/panic using geom_mirror(4).
While I think the main problem here is somewhere in geom_mirror (and
probably related to the current content on the disks I mirror) it
looks like the one problem triggers other problems.

I have two 10GB disks (ad0 and ad1) that I want to do a mirror on
called "boot".  ad0 contains a full old FreeBSD install (4.9 AFAIR).
ad1 just contains a slice table with one slice, and is otherwise clean
(bsdlabel for both are included).

The system is running RELENG_5 and the problem happens on a August 21
and on a September 3 kernel.  On the September 3 kernel I upgraded to
geom_mirror from -CURRENT (from today).

When I label them and load geom_mirror the systems panics very shortly
after with a double fault if I don't stop the mirror first..  The
console shows (from sep 4 kernel with debug set to 1):

GEOM_MIRROR[1]: Creating device boot (id=3D2639492630).
GEOM_MIRROR[0]: Device boot created (id=3D2639492630).
GEOM_MIRROR[1]: Adding disk ad1s1 to boot.
GEOM_MIRROR[1]: Invalid size of disk ad1s1 (device boot), skipping.
GEOM_MIRROR[0]: Cannot add disk ad1s1 to boot (error=3D22).
GEOM_MIRROR[0]: Device boot destroyed.
GEOM_MIRROR[1]: Creating device boot (id=3D2639492630).
GEOM_MIRROR[0]: Device boot created (id=3D2639492630).
GEOM_MIRROR[1]: Adding disk ad1s1c to boot.
GEOM_MIRROR[1]: Invalid size of disk ad1s1c (device boot), skipping.
GEOM_MIRROR[0]: Cannot add disk ad1s1c to boot (error=3D22).
GEOM_MIRROR[0]: Device boot destroyed.
GEOM_MIRROR[1]: Creating device boot (id=3D2639492630).
GEOM_MIRROR[0]: Device boot created (id=3D2639492630).
GEOM_MIRROR[1]: Adding disk ad1 to boot.
GEOM_MIRROR[1]: Disk ad1 state changed from NONE to NEW (device boot).
GEOM_MIRROR[0]: Device boot: provider ad1 detected.
GEOM_MIRROR[1]: Adding disk ad0 to boot.
GEOM_MIRROR[1]: Disk ad0 state changed from NONE to NEW (device boot).
GEOM_MIRROR[0]: Device boot: provider ad0 detected.
GEOM_MIRROR[1]: Device boot state changed from STARTING to RUNNING.
GEOM_MIRROR[1]: Disk ad1 state changed from NEW to ACTIVE (device boot).
GEOM_MIRROR[0]: Device boot: provider ad1 activated.
GEOM_MIRROR[1]: Disk ad0 state changed from NEW to ACTIVE (device boot).
GEOM_MIRROR[0]: Device boot: provider ad0 activated.
GEOM_MIRROR[0]: Device boot: provider mirror/boot launched.
GEOM_MIRROR[1]: Adding disk ad1s1 to boot.
GEOM_MIRROR[1]: Disk ad1s1 (id=3D2151593843) already exists, skipping.
GEOM_MIRROR[0]: Cannot add disk ad1s1 to boot (error=3D17).
GEOM_MIRROR[1]: Adding disk ad1s1c to boot.
GEOM_MIRROR[1]: Disk ad1s1c (id=3D2151593843) already exists, skipping.
GEOM_MIRROR[0]: Cannot add disk ad1s1c to boot (error=3D17).
WARNING: Device name truncated! (mirror/boots1ccccccccccccccccccccccccccccc=
ccccccccccccccccccccc)KDB: stack backtrace:
kdb_backtrace(c07ed998,c1d148a4) at kdb_backtrace+0x29
make_dev(c0847e20,bc,0,5,1a0) at make_dev+0xb7
g_dev_taste(c0847e80,c1d15300,0,c1d0f980,64) at g_dev_taste+0xe2
g_new_provider_event(c1d15300,0,66666667,cbd43d04,c05cff09) at g_new_provid=
er_event+0x6e
one_event(cbd43d1c,c05d12e5,3c,28,c15368c0) at one_event+0x14f
g_run_events(3c,28,c15368c0,c05d12a8,cbd43d34) at g_run_events+0x9
g_event_procbody(0,cbd43d48,0,c05d12a8,0) at g_event_procbody+0x3d
fork_exit(c05d12a8,0,cbd43d48) at fork_exit+0xa4
fork_trampoline() at fork_trampoline+0x8
--- trap 0x1, eip =3D 0, esp =3D 0xcbd43d7c, ebp =3D 0 ---

I added a call to kdb_backtrace after the warning in make_dev to get
an idea whats going on...

And it writes _a lot_ of the "WARNIG: Device name..." messages before
it crashes like below.

The console from August where it actually panics:

GEOM_MIRROR: Device boot created (id=3D2639492630).
GEOM_MIRROR: Device boot: provider ad0 detected.
GEOM_MIRROR: Device boot: provider ad1 detected.
GEOM_MIRROR: Device boot: provider ad1 activated.
GEOM_MIRROR: Device boot: provider ad0 activated.
GEOM_MIRROR: Device boot: provider mirror/boot launched.
GEOM_MIRROR: Cannot add disk ad1s1 to boot (error=3D17).
GEOM_MIRROR: Cannot add disk ad1s1c to boot (error=3D17).
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")=
WARNING: Device name truncated! (mirror/boots1", 'c' <repeats 50 times>, ")
Fatal double fault:
eip =3D 0xc0795732
esp =3D 0xcbd42000
ebp =3D 0xcbd42010
cpuid =3D 0; apic id =3D 00
panic: double fault
cpuid =3D 0;=20
KDB: enter: panic

The backtrace of the panic :

#0  doadump () at pcpu.h:159
#1  0xc0460102 in db_fncall (dummy1=3D0, dummy2=3D0, dummy3=3D-1065942185,=
=20
    dummy4=3D0xc09087e4 "XXX" at /FreeBSD/5-STABLE/sys/ddb/db_command.c:531
#2  0xc045ff10 in db_command (last_cmdp=3D0xc0896f44, cmd_table=3D0x0, aux_=
cmd_tablep=3D0xc0817988,=20
    aux_cmd_tablep_end=3D0xc08179a4) at /FreeBSD/5-STABLE/sys/ddb/db_comman=
d.c:349
#3  0xc045ffd8 in db_command_loop () at /FreeBSD/5-STABLE/sys/ddb/db_comman=
d.c:455
#4  0xc0461b3d in db_trap (type=3D3, code=3D0) at /FreeBSD/5-STABLE/sys/ddb=
/db_main.c:221
#5  0xc0616c43 in kdb_trap (type=3D3, code=3D0, tf=3D0x1) at /FreeBSD/5-STA=
BLE/sys/kern/subr_kdb.c:417
#6  0xc07893e4 in trap (frame=3D
      {tf_fs =3D 24, tf_es =3D 16, tf_ds =3D 16, tf_edi =3D -1065279731, tf=
_esi =3D 1, tf_ebp =3D -1064269468, tf_isp =3D -1064269488, tf_ebx =3D -106=
4269424, tf_edx =3D 0, tf_ecx =3D -1056882688, tf_eax =3D 18, tf_trapno =3D=
 3, tf_err =3D 0, tf_eip =3D -1067357785, tf_cs =3D 8, tf_eflags =3D 16530,=
 tf_esp =3D -1064269436, tf_ss =3D -1067450363})
    at /FreeBSD/5-STABLE/sys/i386/i386/trap.c:576
#7  0xc0777cda in calltrap () at /FreeBSD/5-STABLE/sys/i386/i386/exception.=
s:140
#8  0x00000018 in ?? ()
#9  0x00000010 in ?? ()
#10 0x00000010 in ?? ()
#11 0xc0811f0d in ?? ()
#12 0x00000001 in ?? ()
#13 0xc0908964 in dblfault_stack ()
#14 0xc0908950 in dblfault_stack ()
#15 0xc0908990 in dblfault_stack ()
#16 0x00000000 in ?? ()
#17 0xc1014000 in ?? ()
#18 0x00000012 in ?? ()
#19 0x00000003 in ?? ()
#20 0x00000000 in ?? ()
#21 0xc06169a7 in kdb_enter (msg=3D0x0) at cpufunc.h:56
#22 0xc0600005 in panic (fmt=3D0xc0811f0d "double fault") at /FreeBSD/5-STA=
BLE/sys/kern/kern_shutdown.c:542
#23 0xc0789986 in dblfault_handler () at /FreeBSD/5-STABLE/sys/i386/i386/tr=
ap.c:841
#24 0x00000000 in ?? ()

[simon@eddie:geom_mirror] sudo bsdlabel ad0s1
# /dev/ad0s1:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:   409600        0    4.2BSD     2048 16384    97=20
  b:   524288   409600      swap                   =20
  c: 19792017        0    unused        0     0         # "raw" part, don't=
 edit
  e:  1048576   933888    4.2BSD     2048 16384    89=20
  f: 17809553  1982464    4.2BSD     2048 16384    89=20
[simon@eddie:geom_mirror] sudo bsdlabel ad1s1
# /dev/ad1s1:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  c: 19807137        0    unused        0     0         # "raw" part, don't=
 edit

Anybody get a clue about what's really going wrong here?

--=20
Simon L. Nielsen
FreeBSD Documentation Team

--PHCdUe6m4AxPMzOu
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (FreeBSD)

iD8DBQFBOeuuh9pcDSc1mlERAvZeAJ4tN2muSg2V7NAK0kPAQDMQo3S6qgCeJ3+F
yUx6fBntp6gJ6MjSUqTWrvQ=
=uq4Z
-----END PGP SIGNATURE-----

--PHCdUe6m4AxPMzOu--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040904162206.GD759>