Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kernel Panic when using modesetting driver on 762b75d(drm-next-4.6) #60

Closed
nomadlogic opened this issue Aug 11, 2016 · 7 comments
Closed

Comments

@nomadlogic
Copy link

nomadlogic commented Aug 11, 2016

$ sysctl hw.model
hw.model: Intel(R) Core(TM) i7-6700T CPU @ 2.80GHz
$ uname -ar
FreeBSD boomers 12.0-CURRENT FreeBSD 12.0-CURRENT #0 762b75d(drm-next-4.6): Wed Aug 10 09:04:48 PDT 2016 root@boomers:/usr/obj/usr/home/pwright/git/freebsd-base-graphics/sys/GENERIC amd64

I've been able to reproduce a panic when starting Xorg on my skylake system using 762b75d. Here is the output of /var/crash/core.txt.0:

boomers dumped core - see /var/crash/vmcore.0

Wed Aug 10 19:47:31 PDT 2016

FreeBSD boomers 12.0-CURRENT FreeBSD 12.0-CURRENT #0 762b75d(drm-next-4.6): Wed Aug 10 09:04:48 PDT 2016     root@boomers:/usr/obj/usr/home/pwright/git/freebsd-base-graphics/sys/GENERIC  amd64

panic: mtx_trylock() of spin mutex 128 @ /usr/home/pwright/git/freebsd-base-graphics/sys/vm/uma_core.c:2754

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:
[drm:intel_hdmi_detect] HDMI live status down
[drm:drm_helper_probe_single_connector_modes] [CONNECTOR:56:HDMI-A-3] disconnected
[drm:drm_ioctl] pid=101368, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETCONNECTOR
[drm:drm_mode_getconnector] [CONNECTOR:56:?]
[drm:drm_ioctl] pid=101368, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETCONNECTOR
[drm:drm_mode_getconnector] [CONNECTOR:37:?]
[drm:drm_helper_probe_single_connector_modes] [CONNECTOR:37:DP-1]
[drm:intel_dp_detect] [CONNECTOR:37:DP-1]
[drm:intel_dp_get_dpcd] DPCD: fffff80057505106h
[drm:intel_dp_get_dpcd] Display Port TPS3 support: source yes, sink no
[drm:intel_dp_print_rates] source rates: 162000, 216000, 270000, 324000, 432000, 540000
[drm:intel_dp_print_rates] sink rates: 162000, 270000
[drm:intel_dp_print_rates] common rates: 162000, 270000
[drm:intel_dp_probe_oui] Sink OUI: 4ce000
[drm:intel_dp_probe_oui] Branch OUI: 000000
vt_kms_postswitch() at vt_kms_postswitch+0x48/frame 0xfffffe0232228fe0
vt_window_switch() at vt_window_switch+0xdb/frame 0xfffffe0232229020
vtterm_cngrab() at vtterm_cngrab+0x20/frame 0xfffffe0232229040
cngrab() at cngrab+0x32/frame 0xfffffe0232229060
vpanic() at vpanic+0x106/frame 0xfffffe02322290e0
kassert_panic() at kassert_panic+0x126/frame 0xfffffe0232229150
_mtx_trylock_flags_() at _mtx_trylock_flags_+0x158/frame 0xfffffe0232229190
uma_zfree_arg() at uma_zfree_arg+0x155/frame 0xfffffe02322291e0
free() at free+0xab/frame 0xfffffe0232229220
realloc() at realloc+0xf4/frame 0xfffffe0232229260
Dumping 500 out of 8047 MB:..4%..13%..23%..32%..42%..52%..61%..71%..84%..93%
<snip>
(kgdb) #0  doadump (textdump=0) at pcpu.h:221
#1  0xffffffff82ddd699 in vt_kms_postswitch (arg=<value optimized out>)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/modules/drm/drm/../../../dev/drm/linux_fb.c:82
#2  0xffffffff808d455b in vt_window_switch (vw=0xffffffff8170e450)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/dev/vt/vt_core.c:540
#3  0xffffffff808d2020 in vtterm_cngrab (tm=<value optimized out>)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/dev/vt/vt_core.c:1465
#4  0xffffffff809eb212 in cngrab ()
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/kern_cons.c:368
#5  0xffffffff80a452d6 in vpanic (
    fmt=0xffffffff8138f8f1 "mtx_trylock() of spin mutex %s @ %s:%d", 
    ap=0xfffffe0232229120)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/kern_shutdown.c:745
#6  0xffffffff80a451c6 in kassert_panic (fmt=<value optimized out>)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/kern_shutdown.c:649
#7  0xffffffff80a27508 in _mtx_trylock_flags_ (c=0xfffffe0004684a98, opts=0, 
    file=<value optimized out>, line=<value optimized out>)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/kern_mutex.c:412
#8  0xffffffff80d237d5 in uma_zfree_arg (zone=<value optimized out>, 
    item=<value optimized out>, udata=0xfffff80057405f90)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/vm/uma_core.c:2754
#9  0xffffffff80a21f5b in free (addr=0xfffff80057405780, 
    mtp=0xffffffff82c319c0)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/kern_malloc.c:588
#10 0xffffffff80a220f4 in realloc (addr=0xfffff80057405780, size=256, 
    mtp=0xffffffff82c319c0, flags=<value optimized out>)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/kern_malloc.c:653
#11 0xffffffff82dbc67d in drm_do_get_edid (connector=0xfffff800574fd800, 
    get_edid_block=<value optimized out>, data=0xfffff80057505150)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/modules/drm/drm/../../../dev/drm/drm_edid.c:1305
#12 0xffffffff82dbcb96 in drm_get_edid (connector=0xfffff800574fd800, 
    adapter=0xfffff80057505150)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/modules/drm/drm/../../../dev/drm/drm_edid.c:1391
#13 0xffffffff82cee221 in intel_dp_detect (connector=<value optimized out>, 
    force=<value optimized out>)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/modules/drm/i915/i915kms/../../../../dev/drm/i915/intel_dp.c:4586
#14 0xffffffff82dd94fd in drm_helper_probe_single_connector_modes (
    connector=<value optimized out>, maxX=8192, maxY=8192)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/modules/drm/drm/../../../dev/drm/drm_probe_helper.c:220
#15 0xffffffff82da7c8b in drm_mode_getconnector (dev=0xfffff800574bb000, 
    data=<value optimized out>, file_priv=0xfffff80057713400)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/modules/drm/drm/../../../dev/drm/drm_crtc.c:2143
#16 0xffffffff82dcb121 in drm_ioctl (filp=<value optimized out>, 
    cmd=3226494119, arg=<value optimized out>)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/modules/drm/drm/../../../dev/drm/drm_ioctl.c:766
#17 0xffffffff82c14cba in linux_dev_ioctl (dev=<value optimized out>, 
    cmd=3226494119, data=0x0, fflag=<value optimized out>, td=0x0)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/modules/linuxkpi/../../compat/linuxkpi/common/src/linux_compat.c:862
#18 0xffffffff8091a603 in devfs_ioctl (ap=<value optimized out>)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/fs/devfs/devfs_vnops.c:831
#19 0xffffffff80fc5bc0 in VOP_IOCTL_APV (vop=<value optimized out>, 
    a=<value optimized out>) at vnode_if.c:1067
#20 0xffffffff80b14bbc in vn_ioctl (fp=0xfffff80012230550, 
    com=<value optimized out>, data=0xfffffe02322297f0, 
    active_cred=0xfffff800126ece00, td=0x0) at vnode_if.h:448
#21 0xffffffff8091ad1f in devfs_ioctl_f (fp=0x0, com=0, data=0x0, cred=0x0, 
    td=0xfffff800124d7a20)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/fs/devfs/devfs_vnops.c:789
#22 0xffffffff80aaa496 in kern_ioctl (td=<value optimized out>, 
    fd=<value optimized out>, com=<value optimized out>, 
    data=<value optimized out>) at file.h:328
#23 0xffffffff80aaa1e1 in sys_ioctl (td=<value optimized out>, 
    uap=0xfffffe0232229940)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/sys_generic.c:748
#24 0xffffffff80eb9b7b in amd64_syscall (td=0xfffff800124d7a20, traced=0)
    at subr_syscall.c:135
#25 0xffffffff80e99c2b in Xfast_syscall ()
    at /usr/home/pwright/git/freebsd-base-graphics/sys/amd64/amd64/exception.S:396
#26 0x000000080250074a in ?? ()
Previous frame inner to this frame (corrupt stack?)
Current language:  auto; currently minimal
(kgdb) 

@mattmacy
Copy link
Member

I updated krealloc. Try again.

@nomadlogic
Copy link
Author

update has fixed the panic when modesetting Xorg driver loads. but i am running into a new issue. i was getting lots of artifacts in chrome then my xsession hung. there was a ring hang which the system semi-recovered from. here's the message:

hdacc1: Unexpected unsolicited response with tag 63: ffffffff
hdacc1: Unexpected unsolicited response with tag 63: ffffffff
[drm] stuck on render ring
[drm] GPU HANG: ecode 9:0:0x00547276, reason: Ring hung, action: reset
[drm] GPU hangs can indicate a bug anywhere in the entire gfx stack, including userspace.
[drm] Please file a _new_ bug report on bugs.freedesktop.org against DRI -> DRM/Intel
[drm] drm/i915 developers can then reassign to the right component if it's not a kernel issue.
[drm] The gpu crash dump is required to analyze gpu hangs, so please always attach it.
[drm] GPU crash dump saved to /sys/class/drm/card0/error
[drm:0xffffffff82d4dafas] *ERROR* render ring: reset request timeout
drm/i915: Resetting chip after gpu hang
[drm:0xffffffff82c86a01s] *ERROR* Failed to reset chip: -5
[drm:0xffffffff82d13431s] *ERROR* ring create req: -5
[drm:0xffffffff82d13431s] *ERROR* ring create req: -5
[drm:0xffffffff82d13431s] *ERROR* ring create req: -5
[drm:0xffffffff82d13431s] *ERROR* ring create req: -5
[drm:0xffffffff82d13431s] *ERROR* ring create req: -5

unfortunately i have not been able to capture debugging information under /compat/linux/sys/class/drm/card0/error as of yet.

@nomadlogic
Copy link
Author

I have done more testing here - I am observing the following:

  • using modesetting driver. artifacts in chrome and eventually characters start missing in dialog windows when using mate. i am getting these errors from stdout when chrome is launched in xterm:

[1550:415326208:0811/203721:ERROR:command_buffer_proxy_impl.cc(194)] Could not send GpuCommandBufferMsg_Initialize.
[1550:415326208:0811/203721:ERROR:webgraphicscontext3d_command_buffer_impl.cc(199)] CommandBufferProxy::Initialize failed.
[1550:415326208:0811/203721:ERROR:webgraphicscontext3d_command_buffer_impl.cc(218)] Failed to initialize command buffer.
[1550:415326208:0811/203721:ERROR:gpu_channel_host.cc(228)] Failed to send GpuChannelMsg_CreateCommandBuffer.
[1550:415326208:0811/203721:ERROR:webgraphicscontext3d_command_buffer_impl.cc(218)] Failed to initialize command buffer.
Received signal 11 SEGV_MAPERR 000000000200
#0 0x0000008770ba <unknown>
#1 0x00080ae3079d <unknown>
[end of stack trace]
[1600:415326208:0811/203722:ERROR:command_buffer_proxy_impl.cc(194)] Could not send GpuCommandBufferMsg_Initialize.
[1600:415326208:0811/203722:ERROR:webgraphicscontext3d_command_buffer_impl.cc(199)] CommandBufferProxy::Initialize failed.
[1600:415326208:0811/203722:ERROR:webgraphicscontext3d_command_buffer_impl.cc(218)] Failed to initialize command buffer.
[1550:415326208:0811/203722:ERROR:command_buffer_proxy_impl.cc(194)] Could not send GpuCommandBufferMsg_Initialize.
[1550:415326208:0811/203722:ERROR:webgraphicscontext3d_command_buffer_impl.cc(199)] CommandBufferProxy::Initialize failed.
[1550:415326208:0811/203722:ERROR:webgraphicscontext3d_command_buffer_impl.cc(218)] Failed to initialize command buffer.
[1550:415326208:0811/203722:ERROR:gpu_channel_host.cc(228)] Failed to send GpuChannelMsg_CreateCommandBuffer.
[1550:415326208:0811/203722:ERROR:webgraphicscontext3d_command_buffer_impl.cc(218)] Failed to initialize command buffer.
[1550:415326208:0811/203722:ERROR:battery_status_manager_default.cc(27)] Not implemented reached in virtual void device::(anonymous namespace)::BatteryStatusManagerDefault::StopListeningBatteryChange()

  • intel driver does now show the rendering artifacts, but i believe this will eventually trigger the previous gpu ring hang that i reported.

@mattmacy
Copy link
Member

It would be helpful if you could identify what kernel / driver calls were failing that triggered those messages.

@mattmacy
Copy link
Member

truss or ktrace might be sufficient - otherwise dtrace

@mattmacy
Copy link
Member

Does this still happen?

@nomadlogic
Copy link
Author

kernel panic is not reproducible on 3bb585c so closing this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants