Re: repeatable panic on pageout with 945GM

From: Matthew Macy <mmacy_at_nextbsd.org>
Date: Thu, 02 Jun 2016 19:31:12 -0700
Tell me if that makes any difference.

-M


 ---- On Thu, 02 Jun 2016 16:55:53 -0700 K. Macy <kmacy_at_freebsd.org> wrote ---- 
 > It looks like it might be trying to remove mappings for a page that doesn't 
 > have any. It's a bit odd. Likely a bug in cdev_pager_free_page or gem 
 > release mmap. Compile the kernel and driver with -O0 and look at the page. 
 > It's too bad I don't support AGP yet with DRM 4.6. Maybe in a week or two. 



 diff --git a/sys/vm/device_pager.c b/sys/vm/device_pager.c
index 013f0d5..917ece7 100644
--- a/sys/vm/device_pager.c
+++ b/sys/vm/device_pager.c
_at__at_ -211,7 +211,8 _at__at_ cdev_pager_free_page(vm_object_t object, vm_page_t m)
        VM_OBJECT_ASSERT_WLOCKED(object);
        if (object->type == OBJT_MGTDEVICE) {
                KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("unmanaged %p", m));
-               pmap_remove_all(m);
+               if (pmap_page_is_mapped(page))
+                       pmap_remove_all(m);
                vm_page_lock(m);
                vm_page_remove(m);
                vm_page_unlock(m);



>  
 > -M 
 >  
 > On Thursday, June 2, 2016, Michael Butler <imb_at_protected-networks.net> 
 > wrote: 
 >  
 > > On 05/23/16 21:10, Michael Butler wrote: 
 > > > On 05/22/16 09:58, Michael Butler wrote: 
 > > >> With KDE and compositing enabled, I randomly get the following: 
 > > >> 
 > > >> (kgdb) info stack 
 > > >> #0  doadump (textdump=<value optimized out>) at pcpu.h:221 
 > > >> #1  0xffffffff8064e98e in kern_reboot (howto=260) at 
 > > >> /usr/src/sys/kern/kern_shutdown.c:366 
 > > >> #2  0xffffffff8064eea1 in vpanic (fmt=<value optimized out>, ap=<value 
 > > >> optimized out>) at /usr/src/sys/kern/kern_shutdown.c:759 
 > > >> #3  0xffffffff8064ed13 in panic (fmt=0x0) at 
 > > >> /usr/src/sys/kern/kern_shutdown.c:690 
 > > >> #4  0xffffffff809d18ed in vm_fault_hold (map=<value optimized out>, 
 > > >> vaddr=<value optimized out>, fault_type=<value optimized out>, 
 > > >>     fault_flags=<value optimized out>, m_hold=<value optimized out>) at 
 > > >> /usr/src/sys/vm/vm_fault.c:327 
 > > >> #5  0xffffffff809cf548 in vm_fault (map=0xfffff80002000000, vaddr=<value 
 > > >> optimized out>, fault_type=1 '\001', fault_flags=<value optimized out>) 
 > > >>     at /usr/src/sys/vm/vm_fault.c:273 
 > > >> #6  0xffffffff80a1849f in trap_pfault (frame=<value optimized out>, 
 > > >> usermode=0) at /usr/src/sys/amd64/amd64/trap.c:741 
 > > >> #7  0xffffffff80a17b30 in trap (frame=0xfffffe00dbec5830) at 
 > > >> /usr/src/sys/amd64/amd64/trap.c:442 
 > > >> #8  0xffffffff809fd5a1 in calltrap () at 
 > > >> /usr/src/sys/amd64/amd64/exception.S:236 
 > > >> #9  0xffffffff80a0a3bb in pmap_remove_all (m=<value optimized out>) at 
 > > >> /usr/src/sys/amd64/amd64/pmap.c:3950 
 > > >> #10 0xffffffff809c0c57 in cdev_pager_free_page (object=<value optimized 
 > > >> out>, m=0xfffffe0001e410d0) at /usr/src/sys/vm/device_pager.c:214 
 > > >> #11 0xffffffff816aff33 in i915_gem_release_mmap (obj=<value optimized 
 > > 
 > > [ .. snip .. ] 
 > > 
 > > Even with the most recent mesa update - something is upsetting this 
 > > device :-( 
 > > 
 > > (kgdb) bt 
 > > #0  doadump (textdump=<value optimized out>) at pcpu.h:221 
 > > #1  0xffffffff805cfe9a in kern_reboot (howto=260) at 
 > > /usr/src/sys/kern/kern_shutdown.c:366 
 > > #2  0xffffffff805d03e1 in vpanic (fmt=<value optimized out>, ap=<value 
 > > optimized out>) at /usr/src/sys/kern/kern_shutdown.c:759 
 > > #3  0xffffffff805d0253 in panic (fmt=0x0) at 
 > > /usr/src/sys/kern/kern_shutdown.c:690 
 > > #4  0xffffffff8096c56e in vm_fault_hold (map=<value optimized out>, 
 > > vaddr=<value optimized out>, fault_type=<value optimized out>, 
 > >     fault_flags=<value optimized out>, m_hold=<value optimized out>) at 
 > > /usr/src/sys/vm/vm_fault.c:327 
 > > #5  0xffffffff80969f78 in vm_fault (map=0xfffff80002000000, vaddr=<value 
 > > optimized out>, fault_type=1 '\001', fault_flags=<value optimized out>) 
 > >     at /usr/src/sys/vm/vm_fault.c:273 
 > > #6  0xffffffff809b556f in trap_pfault (frame=<value optimized out>, 
 > > usermode=0) at /usr/src/sys/amd64/amd64/trap.c:741 
 > > #7  0xffffffff809b4c00 in trap (frame=0xfffffe00dc0ef310) at 
 > > /usr/src/sys/amd64/amd64/trap.c:442 
 > > #8  0xffffffff80999d81 in calltrap () at 
 > > /usr/src/sys/amd64/amd64/exception.S:236 
 > > #9  0xffffffff809a6d4e in pmap_remove_all (m=<value optimized out>) at 
 > > /usr/src/sys/amd64/amd64/pmap.c:3950 
 > > #10 0xffffffff8095ab7b in cdev_pager_free_page (object=<value optimized 
 > > out>, m=0xfffffe0001e2c270) at /usr/src/sys/vm/device_pager.c:214 
 > > #11 0xffffffff816aff33 in i915_gem_release_mmap (obj=<value optimized 
 > > out>) at 
 > > /usr/src/sys/modules/drm2/i915kms/../../../dev/drm2/i915/i915_gem.c:1691 
 > > #12 0xffffffff816b15ba in i915_gem_object_get_fence (obj=<value 
 > > optimized out>) at 
 > > /usr/src/sys/modules/drm2/i915kms/../../../dev/drm2/i915/i915_gem.c:105 
 > > #13 0xffffffff816b7f2e in i915_gem_execbuffer_reserve_object 
 > > (obj=0xfffff8009858f200, ring=<value optimized out>) 
 > >     at 
 > > 
 > > /usr/src/sys/modules/drm2/i915kms/../../../dev/drm2/i915/i915_gem_execbuffer.c:368 
 > > #14 0xffffffff816b7d8f in i915_gem_execbuffer_reserve () at 
 > > 
 > > /usr/src/sys/modules/drm2/i915kms/../../../dev/drm2/i915/i915_gem_execbuffer.c:491 
 > > #15 0xffffffff816b6bb5 in i915_gem_do_execbuffer () at 
 > > 
 > > /usr/src/sys/modules/drm2/i915kms/../../../dev/drm2/i915/i915_gem_execbuffer.c:1036 
 > > #16 0xffffffff816b7ad1 in i915_gem_execbuffer2 (dev=0xfffff800059e9000, 
 > > data=0xfffffe00dc0efa20, file=0xfffff80005db4a00) 
 > >     at 
 > > 
 > > /usr/src/sys/modules/drm2/i915kms/../../../dev/drm2/i915/i915_gem_execbuffer.c:1273 
 > > #17 0xffffffff812c7eae in drm_ioctl (kdev=<value optimized out>, 
 > > cmd=<value optimized out>, data=0xfffffe00dc0efa20 "", flags=<value 
 > > optimized out>, 
 > >     p=<value optimized out>) at 
 > > /usr/src/sys/modules/drm2/drm2/../../../dev/drm2/drm_drv.c:467 
 > > #18 0xffffffff804c721f in devfs_ioctl_f (fp=0xfffff800afba1550, 
 > > com=2151703657, data=0xfffffe00dc0efa20, cred=0xfffff800af2dc800, 
 > > td=0xfffff80005e2ca00) 
 > >     at /usr/src/sys/fs/devfs/devfs_vnops.c:815 
 > > #19 0xffffffff806377fe in kern_ioctl (td=<value optimized out>, 
 > > fd=<value optimized out>, com=<value optimized out>, 
 > > data=0xfffffe00dc0efa20 "") at file.h:327 
 > > #20 0xffffffff80637481 in sys_ioctl (td=0xfffff80005e2ca00, 
 > > uap=0xfffffe00dc0efb80) at /usr/src/sys/kern/sys_generic.c:743 
 > > #21 0xffffffff809b5e79 in amd64_syscall (td=<value optimized out>, 
 > > traced=0) at subr_syscall.c:135 
 > > #22 0xffffffff8099a06b in Xfast_syscall () at 
 > > /usr/src/sys/amd64/amd64/exception.S:396 
 > > #23 0x00000008024f57ca in ?? () 
 > > Previous frame inner to this frame (corrupt stack?) 
 > > Current language:  auto; currently minimal 
 > > 
 > > Any hints welcome, 
 > > 
 > >         imb 
 > > 
 > > 
 > > 
 > > _______________________________________________ 
 > > freebsd-current_at_freebsd.org <javascript:;> mailing list 
 > > https://lists.freebsd.org/mailman/listinfo/freebsd-current 
 > > To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org 
 > > <javascript:;>" 
 > > 
 > _______________________________________________ 
 > freebsd-current_at_freebsd.org mailing list 
 > https://lists.freebsd.org/mailman/listinfo/freebsd-current 
 > To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org" 
 > 
Received on Fri Jun 03 2016 - 00:31:19 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:05 UTC