Skip site navigation (1)Skip section navigation (2)
Date:      22 Feb 2001 13:39:26 +0100
From:      Dag-Erling Smorgrav <des@ofug.org>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        Maxim Sobolev <sobomax@FreeBSD.org>, "Alexander N. Kabaev" <ak03@gte.com>, current@FreeBSD.org
Subject:   Re: A possible bug in the interrupt thread preemption code [Was:
Message-ID:  <xzpelwqnb7l.fsf@flood.ping.uio.no>
In-Reply-To: John Baldwin's message of "Thu, 22 Feb 2001 04:20:56 -0800 (PST)"
References:  <XFMail.010222042056.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
John Baldwin <jhb@FreeBSD.org> writes:
> On 22-Feb-01 Maxim Sobolev wrote:
> > Dag-Erling Smorgrav wrote:
> > 
> >> Maxim Sobolev <sobomax@FreeBSD.ORG> writes:
> >> > It's not an ata specific problem, but rather a problem of all ISA
> >> > devices (I have an ISA based ata controller).
> >>
> >> I don't think it has anything to do with ISA. I've had similar
> >> problems on a PCI-only system (actually, PCI+EISA motherboard with no
> >> EISA cards) with no ATA devices (disks, CD-ROM and streamer are all
> >> SCSI).
> >>
> >> Considering that backing out rev 1.14 of ithread.c eliminates the
> >> panics, and that that revision is supposed to enable interrupt thread
> >> preemption, and that the crashed kernels show signs of stack smashing,
> >> I'd say the cause is probably a bug in the preemption code.
> > 
> > Update: the bug is still here, as of -current from 22 Feb. Hovewer, this time
> > it even doesn't let to boot into single-user with following panic message:
> > kernel trap 12 with interrupts disabled
> > panic: mutex sched lock recursed at ../../kern/kern_synch.c:872
> 
> Errrr.  That would be something that is leaking sched_lock.  Hmm...

I have another sched_lock-related problem which showed up over the
weekend. Starting StarOffice 5.2 invariably triggers the following
panic:

root@aes /var/crash# gdb -k
sGNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-unknown-freebsd".
(kgdb) source ~des/kgdb
(kgdb) kernel 0
IdlePTD 3526656
initial pcb at 2cb980
panicstr: from debugger
panic messages:
---
panic: mutex sched lock not owned at ../../posix4/ksched.c:215
panic: from debugger
Uptime: 3m37s

dumping to dev ad0b, offset 262528
dump ata0: resetting devices .. done
127 126 125 124 123 122 121 120 119 118 117 116 115 114 113 112 111 110 109 108 107 106 105 104 103 102 101 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
---
#0  dumpsys () at ../../kern/kern_shutdown.c:476
476             if (dumping++) {
(kgdb) where
#0  dumpsys () at ../../kern/kern_shutdown.c:476
#1  0xc0187a04 in boot (howto=260) at ../../kern/kern_shutdown.c:319
#2  0xc0187dd9 in panic (fmt=0xc02521b4 "from debugger")
    at ../../kern/kern_shutdown.c:569
#3  0xc011cdad in db_panic (addr=-1071459127, have_addr=0, count=-1,
    modif=0xc879cd9c "") at ../../ddb/db_command.c:433
#4  0xc011cd4b in db_command (last_cmdp=0xc0285420, cmd_table=0xc0285280,
    aux_cmd_tablep=0xc02b68bc) at ../../ddb/db_command.c:333
#5  0xc011ce12 in db_command_loop () at ../../ddb/db_command.c:455
#6  0xc011f07f in db_trap (type=3, code=0) at ../../ddb/db_trap.c:71
#7  0xc022d258 in kdb_trap (type=3, code=0, regs=0xc879ce9c)
    at ../../i386/i386/db_interface.c:164
#8  0xc023a098 in trap (frame={tf_fs = -1060962280, tf_es = -932118512,
      tf_ds = -1060962288, tf_edi = -1071197888, tf_esi = 256,
      tf_ebp = -931541272, tf_isp = -931541304, tf_ebx = 514,
      tf_edx = -1071149169, tf_ecx = -1070757120, tf_eax = 18, tf_trapno = 3,
      tf_err = 0, tf_eip = -1071459127, tf_cs = 8, tf_eflags = 70,
      tf_esp = -1071149185, tf_ss = -1071240285}) at ../../i386/i386/trap.c:615
#9  0xc022d4c9 in Debugger (msg=0xc0262ba3 "panic") at machine/cpufunc.h:60
#10 0xc0187dd0 in panic (fmt=0xc0261a48 "mutex %s not owned at %s:%d")
    at ../../kern/kern_shutdown.c:567
#11 0xc0180c89 in _mtx_assert (m=0xc02e3e20, what=1,
    file=0xc026d140 "../../posix4/ksched.c", line=215)
---Type <return> to continue, or q <return> to quit---
    at ../../kern/kern_mutex.c:611
#12 0xc01f0d51 in ksched_yield (ret=0xc8712f24, ksched=0xc0a97660)
    at ../../posix4/ksched.c:215
#13 0xc01f100b in sched_yield (p=0xc8712dc0, uap=0xc879cf80)
    at ../../posix4/p1003_1b.c:225
#14 0xc023b239 in syscall (frame={tf_fs = 47, tf_es = 47, tf_ds = 47,
      tf_edi = -1077939044, tf_esi = 706867048, tf_ebp = -1077939116,
      tf_isp = -931541036, tf_ebx = 714966384, tf_edx = 1, tf_ecx = 134979841,
      tf_eax = 158, tf_trapno = 22, tf_err = 2, tf_eip = 717073383,
      tf_cs = 31, tf_eflags = 514, tf_esp = -1077939144, tf_ss = 47})
    at ../../i386/i386/trap.c:1191
#15 0xc022dbe3 in Xint0x80_syscall ()
#16 0x2a182a9e in ?? ()
#17 0x2a18a328 in ?? ()
#18 0x2a057f6b in ?? ()
#19 0x2a057eb5 in ?? ()
#20 0x28f5e2a9 in ?? ()
#21 0x28191db5 in ?? ()
#22 0x80513a3 in ?? ()
#23 0x28f55eab in ?? ()
#24 0x80512da in ?? ()
#25 0x2a059cf1 in ?? ()
#26 0x2a181e35 in ?? ()
---Type <return> to continue, or q <return> to quit---
#27 0x2ab551eb in ?? ()
(kgdb)

DES
-- 
Dag-Erling Smorgrav - des@ofug.org

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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