Panic using geom_mirror after "WARNING: Device name truncated!..."

From: Simon L. Nielsen <simon_at_FreeBSD.org>
Date: Sat, 4 Sep 2004 18:22:06 +0200
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=2639492630).
GEOM_MIRROR[0]: Device boot created (id=2639492630).
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=22).
GEOM_MIRROR[0]: Device boot destroyed.
GEOM_MIRROR[1]: Creating device boot (id=2639492630).
GEOM_MIRROR[0]: Device boot created (id=2639492630).
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=22).
GEOM_MIRROR[0]: Device boot destroyed.
GEOM_MIRROR[1]: Creating device boot (id=2639492630).
GEOM_MIRROR[0]: Device boot created (id=2639492630).
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=2151593843) already exists, skipping.
GEOM_MIRROR[0]: Cannot add disk ad1s1 to boot (error=17).
GEOM_MIRROR[1]: Adding disk ad1s1c to boot.
GEOM_MIRROR[1]: Disk ad1s1c (id=2151593843) already exists, skipping.
GEOM_MIRROR[0]: Cannot add disk ad1s1c to boot (error=17).
WARNING: Device name truncated! (mirror/boots1cccccccccccccccccccccccccccccccccccccccccccccccccc)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_provider_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 = 0, esp = 0xcbd43d7c, ebp = 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=2639492630).
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=17).
GEOM_MIRROR: Cannot add disk ad1s1c to boot (error=17).
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 = 0xc0795732
esp = 0xcbd42000
ebp = 0xcbd42010
cpuid = 0; apic id = 00
panic: double fault
cpuid = 0; 
KDB: enter: panic

The backtrace of the panic :

#0  doadump () at pcpu.h:159
#1  0xc0460102 in db_fncall (dummy1=0, dummy2=0, dummy3=-1065942185, 
    dummy4=0xc09087e4 "XXX" at /FreeBSD/5-STABLE/sys/ddb/db_command.c:531
#2  0xc045ff10 in db_command (last_cmdp=0xc0896f44, cmd_table=0x0, aux_cmd_tablep=0xc0817988, 
    aux_cmd_tablep_end=0xc08179a4) at /FreeBSD/5-STABLE/sys/ddb/db_command.c:349
#3  0xc045ffd8 in db_command_loop () at /FreeBSD/5-STABLE/sys/ddb/db_command.c:455
#4  0xc0461b3d in db_trap (type=3, code=0) at /FreeBSD/5-STABLE/sys/ddb/db_main.c:221
#5  0xc0616c43 in kdb_trap (type=3, code=0, tf=0x1) at /FreeBSD/5-STABLE/sys/kern/subr_kdb.c:417
#6  0xc07893e4 in trap (frame=
      {tf_fs = 24, tf_es = 16, tf_ds = 16, tf_edi = -1065279731, tf_esi = 1, tf_ebp = -1064269468, tf_isp = -1064269488, tf_ebx = -1064269424, tf_edx = 0, tf_ecx = -1056882688, tf_eax = 18, tf_trapno = 3, tf_err = 0, tf_eip = -1067357785, tf_cs = 8, tf_eflags = 16530, tf_esp = -1064269436, tf_ss = -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=0x0) at cpufunc.h:56
#22 0xc0600005 in panic (fmt=0xc0811f0d "double fault") at /FreeBSD/5-STABLE/sys/kern/kern_shutdown.c:542
#23 0xc0789986 in dblfault_handler () at /FreeBSD/5-STABLE/sys/i386/i386/trap.c:841
#24 0x00000000 in ?? ()

[simon_at_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 
  b:   524288   409600      swap                    
  c: 19792017        0    unused        0     0         # "raw" part, don't edit
  e:  1048576   933888    4.2BSD     2048 16384    89 
  f: 17809553  1982464    4.2BSD     2048 16384    89 
[simon_at_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?

-- 
Simon L. Nielsen
FreeBSD Documentation Team

Received on Sat Sep 04 2004 - 14:22:10 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:10 UTC