From owner-freebsd-current@FreeBSD.ORG Tue Feb 1 10:59:14 2005 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 21F0A16A4CF for ; Tue, 1 Feb 2005 10:59:14 +0000 (GMT) Received: from whisker.bluecoat.com (whisker.bluecoat.com [216.52.23.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id C15DA43D45 for ; Tue, 1 Feb 2005 10:59:13 +0000 (GMT) (envelope-from qing.li@bluecoat.com) Received: from bcs-mail.bluecoat.com (bcs-mail.bluecoat.com [216.52.23.69]) by whisker.bluecoat.com (8.13.0/8.13.0) with ESMTP id j11AxCSi002377 for ; Tue, 1 Feb 2005 02:59:13 -0800 (PST) X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Tue, 1 Feb 2005 02:58:59 -0800 Message-ID: <00CDF9AA240E204FA6E923BD35BC643608503A1A@bcs-mail.internal.cacheflow.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: question on lock error Thread-Index: AcUITQaZ6NKgi//8R1qec6qaylFkhQ== From: "Li, Qing" To: X-Scanned-By: MIMEDefang 2.49 on 216.52.23.28 Subject: question on lock error 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: Tue, 01 Feb 2005 10:59:14 -0000 In my file if_llatbl.c, the entry and exit of function sysctl_dumparp is=20 guarded with IFNET_RLOCK() <<---- line 128 ... IFNET_RUNLOCK() dump_llcache is also my code. The modified "arp" and "ndp" commands will trigger the following messages, however, the output of the new L2/L3 cache table is correct. But later on a=20 userland application will get EPERM error. I think this is related to the=20 lock error. Could someone who is knowledgeable in the locking scheme give me a=20 pointer here, please ? TIA -- Qing Feb 1 10:02:19 heavygear kernel: --- syscall (202, FreeBSD ELF32, __sysctl), eip =3D 0x280b8ba3, esp =3D 0xbfbfe9bc, ebp =3D 0xbfbfe9f8 = --- Feb 1 10:02:19 heavygear kernel: sysctl_old_user() with the following non-sleepable locks held: Feb 1 10:02:19 heavygear kernel: exclusive sleep mutex ifnet r =3D 0 (0xc094bba0) locked @ /usr/src/sys/net/if_llatbl.c:128 Feb 1 10:02:19 heavygear kernel: KDB: stack backtrace: Feb 1 10:02:19 heavygear kernel: kdb_backtrace(1,1,1,b0,e4b7bc04) at kdb_backtrace+0x29 Feb 1 10:02:19 heavygear kernel: witness_warn(5,0,c0834d13) at witness_warn+0x19a Feb 1 10:02:19 heavygear kernel: sysctl_old_user(e4b7bc04,e4b7b9ec,b0,b0,e4b7b9ec) at sysctl_old_user+0x3d Feb 1 10:02:19 heavygear kernel: dump_llcache(c1fd842c,1c,c1fffd28,e4b7bc04,0) at dump_llcache+0x19e Feb 1 10:02:19 heavygear kernel: sysctl_dumparp(1c,e4b7bc04,1c0000bc,0,2) at sysctl_dumparp+0x5e Feb 1 10:02:19 heavygear kernel: sysctl_rtsock(c08a20c0,e4b7bc8c,4,e4b7bc04,c08a20c0) at sysctl_rtsock+0x10a Feb 1 10:02:19 heavygear kernel: sysctl_root(0,e4b7bc84,6,e4b7bc04,c247e450) at sysctl_root+0x11b Feb 1 10:02:19 heavygear kernel: userland_sysctl(c247e450,e4b7bc84,6,804f000,bfbfea7c) at userland_sysctl+0xf4 Feb 1 10:02:19 heavygear kernel: __sysctl(c247e450,e4b7bd14,6,1,10296) at __sysctl+0x77 Feb 1 10:02:19 heavygear kernel: syscall(2f,2f,2f,6,bfbfea7c) at syscall+0x213 Feb 1 10:02:19 heavygear kernel: Xint0x80_syscall() at Xint0x80_syscall+0x1f