Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jun 2015 21:09:25 +0200
From:      Mateusz Guzik <mjguzik@gmail.com>
To:        Ivan Klymenko <fidaj@ukr.net>
Cc:        Mateusz Guzik <mjg@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r284215 - in head/sys: amd64/linux32 compat/linux compat/svr4 dev/drm2/i915 fs/fdescfs i386/ibcs2 i386/linux kern ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mthca sys vm
Message-ID:  <20150610190925.GD23380@dft-labs.eu>
In-Reply-To: <20150610214757.59a4b2d0@nonamehost.local>
References:  <201506101048.t5AAmD1O029382@svn.freebsd.org> <20150610214757.59a4b2d0@nonamehost.local>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 10, 2015 at 09:47:57PM +0300, Ivan Klymenko wrote:
> Wed, 10 Jun 2015 10:48:13 +0000 (UTC)
> Mateusz Guzik <mjg@FreeBSD.org> написав:
> 
> > kern_resource.c
> 
> I get another panic - this time with VirtualBox:
> 
> nonamehost.local dumped core - see /var/crash/vmcore.0
> 
> Wed Jun 10 21:38:13 EEST 2015
> 
> FreeBSD nonamehost.local 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r284222M: Wed Jun 10 17:58:54 EEST 2015     ivan@nonamehost.local:/media/da0s1/obj/usr/src/sys/mk11  amd64
> 
> panic: page fault
> 
> GNU gdb 6.1.1 [FreeBSD]
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "amd64-marcel-freebsd"...
> 
> Unread portion of the kernel message buffer:
> 
> 
> Fatal trap 12: page fault while in kernel mode
> cpuid = 3; apic id = 03
> fault virtual address	= 0x20030020
> fault code		= supervisor read data, page not present
> instruction pointer	= 0x20:0xffffffff809cfb1a
> stack pointer	        = 0x28:0xfffffe01aa0f95c0
> frame pointer	        = 0x28:0xfffffe01aa0f95e0
> 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		= 8647 (VirtualBox)
> trap number		= 12
> panic: page fault
> cpuid = 3
> KDB: stack backtrace:
> #0 0xffffffff80a17c27 at kdb_backtrace+0x67
> #1 0xffffffff809d3f79 at vpanic+0x189
> #2 0xffffffff809d3de3 at panic+0x43
> #3 0xffffffff80e73b35 at trap_fatal+0x355
> #4 0xffffffff80e73e6e at trap_pfault+0x31e
> #5 0xffffffff80e734d4 at trap+0x464
> #6 0xffffffff80e57422 at calltrap+0x8
> #7 0xffffffff8244eb94 at rtR0MemObjNativeMapUser+0xa4
> #8 0xffffffff8244d935 at RTR0MemObjMapUserTag+0x135
> #9 0xffffffff82435382 at SUPR0GipMap+0x152
> #10 0xffffffff82431311 at supdrvIOCtlInnerUnrestricted+0xa11
> #11 0xffffffff8243b515 at VBoxDrvFreeBSDIOCtl+0x1b5
> #12 0xffffffff80897dab at devfs_ioctl_f+0x13b
> #13 0xffffffff80a35ee1 at kern_ioctl+0x401
> #14 0xffffffff80a35a33 at sys_ioctl+0x153
> #15 0xffffffff80e74579 at amd64_syscall+0x3e9
> #16 0xffffffff80e5770b at Xfast_syscall+0xfb
> Uptime: 3h23m47s
> Dumping 998 out of 6047 MB:..2%..12%..21%..31%..41%..52%..61%..71%..81%..92%
> 
> 221	pcpu.h: No such file or directory.
> 	in pcpu.h
> (kgdb) #0  doadump (textdump=<value optimized out>) at pcpu.h:221
> #1  0xffffffff809d3a7d in kern_reboot (howto=260)
>     at /usr/src/sys/kern/kern_shutdown.c:447
> #2  0xffffffff809d3fb8 in vpanic (fmt=<value optimized out>, 
>     ap=<value optimized out>) at /usr/src/sys/kern/kern_shutdown.c:744
> #3  0xffffffff809d3de3 in panic (fmt=0x0)
>     at /usr/src/sys/kern/kern_shutdown.c:675
> #4  0xffffffff80e73b35 in trap_fatal (frame=<value optimized out>, 
>     eva=<value optimized out>) at /usr/src/sys/amd64/amd64/trap.c:853
> #5  0xffffffff80e73e6e in trap_pfault (frame=0xfffffe01aa0f9510, 
>     usermode=<value optimized out>) at /usr/src/sys/amd64/amd64/trap.c:676
> #6  0xffffffff80e734d4 in trap (frame=0xfffffe01aa0f9510)
>     at /usr/src/sys/amd64/amd64/trap.c:426
> #7  0xffffffff80e57422 in calltrap ()
>     at /usr/src/sys/amd64/amd64/exception.S:235
> #8  0xffffffff809cfb1a in lim_max (td=0xfffff8008e3b4a70, which=2)
>     at /usr/src/sys/kern/kern_resource.c:1209
> #9  0xffffffff8244eb94 in rtR0MemObjNativeMapUser ()
>    from /boot/modules/vboxdrv.ko
> #10 0xffffffff8244d935 in RTR0MemObjMapUserTag ()
>    from /boot/modules/vboxdrv.ko
> #11 0xffffffff82435382 in SUPR0GipMap () from /boot/modules/vboxdrv.ko
> #12 0xffffffff82431311 in supdrvIOCtlInnerUnrestricted ()
>    from /boot/modules/vboxdrv.ko
> #13 0xffffffff8243b515 in VBoxDrvFreeBSDIOCtl () from /boot/modules/vboxdrv.ko
> #14 0xffffffff80897dab in devfs_ioctl_f (fp=0xfffff8008e3b4a70, 
>     com=18446744073709551615, data=0x1, cred=<value optimized out>, 
>     td=0xfffff80027d64000) at /usr/src/sys/fs/devfs/devfs_vnops.c:806
> #15 0xffffffff80a35ee1 in kern_ioctl (td=0xfffff8005dedc980, 
>     fd=<value optimized out>, com=2, data=<value optimized out>) at file.h:326
> #16 0xffffffff80a35a33 in sys_ioctl (td=0xfffff8005dedc980, 
>     uap=0xfffffe01aa0f9a40) at /usr/src/sys/kern/sys_generic.c:722
> #17 0xffffffff80e74579 in amd64_syscall (td=0xfffff8005dedc980, traced=0)
>     at subr_syscall.c:133
> #18 0xffffffff80e5770b in Xfast_syscall ()
>     at /usr/src/sys/amd64/amd64/exception.S:395
> #19 0x000000080129b6ca in ?? ()
> Previous frame inner to this frame (corrupt stack?)
> Current language:  auto; currently minimal
> (kgdb) 

Have you recompiled the module after you updated the kernel?

Quick guess suggests that the passed pointer is to struct proc, while
the function in question now expects struct thread.

lim_max_proc can be used instead if thread pointer is not suitable.

-- 
Mateusz Guzik <mjguzik gmail.com>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150610190925.GD23380>