From owner-freebsd-current@FreeBSD.ORG Fri Nov 14 08:30:21 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4C0AE16A4F3 for ; Fri, 14 Nov 2003 08:30:21 -0800 (PST) Received: from mail.speakeasy.net (mail7.speakeasy.net [216.254.0.207]) by mx1.FreeBSD.org (Postfix) with ESMTP id 61FAF43FCB for ; Fri, 14 Nov 2003 08:30:20 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 29666 invoked from network); 14 Nov 2003 16:30:19 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender )encrypted SMTP for ; 14 Nov 2003 16:30:19 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.9/8.12.9) with ESMTP id hAEGUGEW006476; Fri, 14 Nov 2003 11:30:16 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <3FB4C690.2080607@openet-telecom.com> Date: Fri, 14 Nov 2003 11:30:13 -0500 (EST) From: John Baldwin To: Peter Edwards X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: current@freebsd.org Subject: RE: Fwd: propgagate_priority() crashes: recursive msleep() ?? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2003 16:30:21 -0000 On 14-Nov-2003 Peter Edwards wrote: > (Aplogies if this message is a duplicate: The original is AWOL for quite > a while now) > > Hi, > I'm getting a crash in propagate priority, as mentioned by a few people recently. Bug reports and > comments about it seemed to have dropped off, so given that I can reliably reproduce it, I was > trying to work out why it's going on. > > One thing I found quite odd was the following stack trace. It appears that msleep() is being > called recursively via cursig() calling stopevent. When msleep calls cursig(), it has temporarily > dropped Giant. Surely this is bogus? (This is from a a kernel updated in the last few hours) > >#0 sched_switch (td=0xc4b30780) at /scratch/src/sys/kern/sched_4bsd.c:606 >#1 0xc050d8db in mi_switch () at /scratch/src/sys/kern/kern_synch.c:514 >#2 0xc050cf7f in msleep (ident=0xc4dc2bc8, mtx=0xc4dc2b04, priority=92, wmesg=0x0, > timo=0) at /scratch/src/sys/kern/kern_synch.c:255 >#3 0xc0534255 in stopevent (p=0xc4dc2a98, event=2, val=2) > at /scratch/src/sys/kern/sys_process.c:740 >#4 0xc0509362 in issignal (td=0xc4b30780) at /scratch/src/sys/kern/kern_sig.c:2082 >#5 0xc0504eb8 in cursig (td=0xc4b30780) at /scratch/src/sys/sys/signalvar.h:227 >#6 0xc050d0f2 in msleep (ident=0xc4dc2a98, mtx=0xc4dc2b04, priority=348, wmesg=0x0, > timo=0) at /scratch/src/sys/kern/kern_synch.c:294 >#7 0xc04eb82f in wait1 (td=0xc4b30780, uap=0xddcd6d10, compat=0) > at /scratch/src/sys/kern/kern_exit.c:766 >#8 0xc04eab90 in wait4 (td=0x0, uap=0x0) at /scratch/src/sys/kern/kern_exit.c:548 >#9 0xc06241d0 in syscall (frame= > {tf_fs = 47, tf_es = 47, tf_ds = 47, tf_edi = 134899628, tf_esi = 134912305, tf_ebp = > -1077943784, tf_isp = -573739660, tf_ebx = 772, tf_edx = 135012352, tf_ecx = 13, tf_eax = 7, > tf_trapno = 12, tf_err = 2, tf_eip = 134525375, tf_cs = 31, tf_eflags = 646, tf_esp = > -1077943812, tf_ss = 47}) at /scratch/src/sys/i386/i386/trap.c:1010 Are you using gdb or something else that does ptrace? Jeff has pointed out why pp panics here, because this thread owns the sigacts lock while asleep. However, doing a double sleep like this is very bogus and bad. Grrrr. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/