Re: lots of "exclusive sleep mutex"

From: YONETANI Tomokazu <t-yonetani_at_ergobrains.co.jp>
Date: Fri, 31 Oct 2003 10:09:04 +0900
On 2003/10/30 00:16:47, Clive Lin wrote:
> On Sat, Oct 04, 2003 at 02:00:33AM +0800, Clive Lin wrote:
> > Hi,
> > 
> >     I've seen lots of messages on rescent -CURRENT
> > 
> > malloc() of "16" with the following non-sleepable locks held:
> > exclusive sleep mutex g_xdown r = 0 (0xe044eca8) locked _at_ /usr/src/sys/geom/geom_io.c:351
> > malloc() of "16" with the following non-sleepable locks held:
> > exclusive sleep mutex g_xdown r = 0 (0xe044eca8) locked _at_ /usr/src/sys/geom/geom_io.c:351
> 
> Many of above are still seen on the latest current.
> malloc() of "16" with the following non-sleepable locks held:
> exclusive sleep mutex g_xdown r = 0 (0xe044eca8) locked _at_ /usr/src/sys/geom/geom_io.c:355
> malloc() of "16" with the following non-sleepable locks held:
> exclusive sleep mutex g_xdown r = 0 (0xe044eca8) locked _at_ /usr/src/sys/geom/geom_io.c:355
> 
> Perhaps it's a ServeRAID specific glitch?
> > dmesg|grep ips
> ips0: <IBM ServeRAID Adapter> mem 0xf0000000-0xf3ffffff irq 16 at device 1.0 on pci4
> ips0: logical drives: 1
> ipsd0: <Logical Drive> on ips0
> GEOM: create disk ipsd0 dp=0xc6b25310
> ipsd0: Logical Drive  (69430MB)

Does this fix?

Index: ips.c
===================================================================
RCS file: /home/cvs/freebsd/src/sys/dev/ips/ips.c,v
retrieving revision 1.5
diff -u -6 -r1.5 ips.c
--- ips.c	24 Aug 2003 17:49:13 -0000	1.5
+++ ips.c	30 Oct 2003 08:45:32 -0000
_at__at_ -147,12 +147,13 _at__at_
 	waiter = malloc(sizeof(ips_wait_list_t), M_DEVBUF, memflags);
 	if(!waiter)
 		return ENOMEM;
 	mask = splbio();
 	if(sc->state & IPS_OFFLINE){
 		splx(mask);
+		free(waiter, M_DEVBUF);
 		return EIO;
 	}
 	command = SLIST_FIRST(&sc->free_cmd_list);
 	if(command && !(sc->state & IPS_TIMEOUT)){
 		SLIST_REMOVE_HEAD(&sc->free_cmd_list, next);
 		(sc->used_commands)++;


By the way, does this panic your machine?

$ exec sh
$ mkdir foo
$ i=0; while :; do echo $i > foo/$i; i=$(($i+1)); done

Regards.
-- 
YONETANI Tomokazu / Ergo-Brains Inc.
Received on Thu Oct 30 2003 - 16:09:08 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:27 UTC