From owner-freebsd-ia64 Mon Oct 15 14:35:54 2001 Delivered-To: freebsd-ia64@freebsd.org Received: from femail28.sdc1.sfba.home.com (femail28.sdc1.sfba.home.com [24.254.60.18]) by hub.freebsd.org (Postfix) with ESMTP id 94FA337B409; Mon, 15 Oct 2001 14:35:49 -0700 (PDT) Received: from laptop.baldwin.cx ([24.2.39.156]) by femail28.sdc1.sfba.home.com (InterMail vM.4.01.03.20 201-229-121-120-20010223) with ESMTP id <20011015213549.TOXI22390.femail28.sdc1.sfba.home.com@laptop.baldwin.cx>; Mon, 15 Oct 2001 14:35:49 -0700 Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20011013085449.E26933808@overcee.netplex.com.au> Date: Mon, 15 Oct 2001 14:35:48 -0700 (PDT) From: John Baldwin To: Peter Wemm Subject: Re: non recursive lock reaquired.. Cc: ia64@FreeBSD.ORG, dfr@FreeBSD.ORG Sender: owner-freebsd-ia64@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On 13-Oct-01 Peter Wemm wrote: > Peter Wemm wrote: >> This doesn't look too healthy. I wonder if this is what caused my >> zone allocation panic before: > > Actually I take this back.. it seems witness is upset about having > two different mutexes with the same *name*... > > zinitna(vm_zone_t z, vm_object_t obj, char *name, int size, > { > mtx_init(&(z)->zmtx, "zone", MTX_DEF); > } > > zbootinit(vm_zone_t z, char *name, int size, void *item, int nitems) > { > mtx_init(&(z)->zmtx, "zone", MTX_DEF); > } > > Should "zone" be added here in subr_witness.c? > > static const char *dup_list[] = { > "process lock", > NULL > }; Not unless you have a well defined order for zone locks. For processes we always lock child processes then parent processes. Do you have an order in mind for zone locks? If not, then how are you going to ensure two threads won't lock the zones in the opposite order? >> acquiring duplicate lock of same type: "zone" >> 1st @ ../../../vm/vm_zone.c:473 >> 2nd @ ../../../vm/vm_zone.c:473 >> witness_lock >> Stopped at Debugger+0x31: mov sp=r33 >> db> trace >> Debugger(0xe000000000a1b6a8, 0xe0000000011135a0, 0xe0000000007b5930, 0xa9a, >> 0 > xe000000000a2ad98) at Debugger+0x30 >> witness_lock(0xe000000000b69bb8, 0x8, 0xe000000000a27910, 0x1d9) at >> witness_l > ock+0x1000 >> _mtx_lock_flags(0xe000000000b69bb8, 0x0, 0xe000000000a27910, 0x1d9) at >> _mtx_l > ock_flags+0x170 >> zalloc(0xe000000000b69bb8) at zalloc+0x80 >> ^^^^^ >> get_pv_entry(0xe0000000011135f0, 0xe0000000011135e0) at get_pv_entry+0x190 >> pmap_make_pv(0xe000000000b69b78, 0xa00000001315c000, 0xe0000000011135f0, >> 0xe0 > 00000000cc8000, 0xa00000001315c000) at pmap_make_pv+0x30 >> pmap_kenter(0xa00000001315c000, 0x11d8000, 0xe000000000cc8000, >> 0xe000000000ad > a6d8) at pmap_kenter+0x80 >> _zget(0xa00000000135ff00, 0xa00000001315c000, 0xe000000000cc8000, >> 0xa00000000 > 135ff80) at _zget+0x1b0 >> zalloc(0xa00000000135ff00, 0xa00000000135ff00) at zalloc+0xc0 >> ^^^^ >> soalloc(0x1, 0xe000000000cc8000, 0xe000000000ada288) at soalloc+0x40 >> socreate(0x2, 0xe000000001113658, 0x2, 0x0, 0xa0000000133886e0) at >> socreate+0 > x200 >> socket(0xa0000000133886e0, 0xe000000001113690, 0xe000000001113690, >> 0xe0000000 > 00cc8000) at socket+0x120 >> syscall(0x61, 0xe000000001113690, 0xe0000000011136d0) at syscall+0x4e0 >> do_syscall(0x61, 0xe0000000011136d0, 0x600000000000e3e0, 0x61, >> 0xe00000000111 > 3690, 0xe0000000011136d0, 0xe000000000cc8000, 0xe000000000cc8000, > 0xa000000 > 013388540, 0xe0000000011136d0, 0xe000000000a97210, 0xa0000000133886e0, > 0x61 > , 0xe000000001113690, 0x4000000000010ff0, 0x20000000000, 0x1, > 0xe0000000011 > 13680, 0xe0000000009540d0, 0x186, 0xa0000000133886e0, 0xe000000001113690, > 0 > xe000000001113690, 0xe000000000cc8000, 0x0) at do_syscall+0x260 >> __gp() at 0xe0000000011136d0 >> db> >> db> show locks >> exclusive (sleep mutex) zone (0xa00000000135ff00) locked @ >> ../../../vm/vm_zon > e.c:473 >> exclusive (sleep mutex) Giant (0xe000000000b71058) locked @ >> ../../../kern/uip > c_syscalls.c:129 >> db> >> >> Cheers, >> -Peter >> -- >> Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au >> "All of this is for nothing if we don't go to the stars" - JMS/B5 >> >> >> To Unsubscribe: send mail to majordomo@FreeBSD.org >> with "unsubscribe freebsd-ia64" in the body of the message >> >> > > Cheers, > -Peter > -- > Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au > "All of this is for nothing if we don't go to the stars" - JMS/B5 > -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ia64" in the body of the message