From owner-freebsd-stable@FreeBSD.ORG Mon Apr 14 07:55:52 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 417551065686; Mon, 14 Apr 2008 07:55:52 +0000 (UTC) (envelope-from dfr@rabson.org) Received: from itchy.rabson.org (mail.rabson.org [IPv6:2002:50b1:e8f2:1::143]) by mx1.freebsd.org (Postfix) with ESMTP id A3EBA8FC14; Mon, 14 Apr 2008 07:55:51 +0000 (UTC) (envelope-from dfr@rabson.org) Received: from [IPv6:2002:50b1:e8f2:1:21b:63ff:feb8:5abc] (unknown [IPv6:2002:50b1:e8f2:1:21b:63ff:feb8:5abc]) by itchy.rabson.org (Postfix) with ESMTP id CEA673FB4; Mon, 14 Apr 2008 08:55:49 +0100 (BST) Message-Id: From: Doug Rabson To: Oliver Brandmueller In-Reply-To: <20080414071957.GJ37437@e-Gitt.NET> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Mon, 14 Apr 2008 08:55:49 +0100 References: <20080414071957.GJ37437@e-Gitt.NET> X-Mailer: Apple Mail (2.919.2) Cc: Doug Rabson , freebsd-stable@freebsd.org Subject: Re: panic with smbfs after MFC of kernel space locking X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2008 07:55:52 -0000 On 14 Apr 2008, at 08:19, Oliver Brandmueller wrote: > Hello and good morning, > > I upgraded to 7-STABLE after the MFC of the kernel space locking. > Since > then I experience panics with programs that strongly rely in file > locking on CIFS (smbfs) mounts: > > Fatal trap 12: page fault while in kernel mode > cpuid = 0; apic id = 00 > fault virtual address = 0x13bf2a8 > fault code = supervisor read data, page not present > instruction pointer = 0x8:0xffffffff8023305a > stack pointer = 0x10:0xffffffffc72d7920 > frame pointer = 0x10:0xffffffffc72d7950 > code segment = base 0x0, limit 0xfffff, type 0x1b > = DPL 0, pres 1, long 1, def32 0, gran 1 > processor eflags = interrupt enabled, resume, IOPL = 0 > current process = 42037 (perl) > [thread pid 42037 tid 100124 ] > Stopped at lf_getblock+0x2a: cmpq %r12,0x8(%rbx) > db> bt > Tracing pid 42037 tid 100124 td 0xffffff00037dc350 > lf_getblock() at lf_getblock+0x2a > lf_advlockasync() at lf_advlockasync+0x4f5 > lf_advlock() at lf_advlock+0x47 > smbfs_advlock() at smbfs_advlock+0x19a > flock() at flock+0x150 > syscall() at syscall+0x256 > Xfast_syscall() at Xfast_syscall+0xab > --- syscall (131, FreeBSD ELF64, flock), rip = 0x800c0a3fc, rsp = > 0x7fffffffecc8, rbp = 0x8325e8 --- > > As far as I can see there were changes for all kinds of file systems > with the MFC, but no change in the smbfs filesystem. I also couldn't > find any change in HEAD's smbfs, so it was not a missing MFC, but > probably the fs was missed in the changes at all. > > Could anyone with a little better programming skills than me probably > have a look at it? From the diffs of the other filesystems it seems > like > it's not a real big change, but mainly adding the function. I added a new vnode operation to support the new lock manager but this operation only needs to be implemented on filesystems that can be exported via NFS. I assumed that this was not the case for SMBFS. Could you find me a line number for lf_getblock+0x2a - something like this should do it: # gdb /boot/kernel/kernel (gdb) l *(lf_getblock+0x2a)