NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/52347: ww mutex class mismatch



>Number:         52347
>Category:       kern
>Synopsis:       ww mutex class mismatch
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 28 16:00:00 +0000 2017
>Originator:     Martin Husemann
>Release:        NetBSD 8.99.1
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD night-owl.duskware.de 8.99.1 NetBSD 8.99.1 (NIGHT-OWL) #516: Mon Jun 26 15:40:28 CEST 2017 martin%night-owl.duskware.de@localhost:/usr/src/sys/arch/amd64/compile/NIGHT-OWL amd64
Architecture: x86_64
Machine: amd64
>Description:

While using something that uses gtk3, I got this crash (seen it before, but
last time no crash dump):

 > fgrep "savecore:  reboot" /var/log/messages
Jun 28 17:42:32 night-owl savecore: reboot after panic: panic: kernel diagnostic assertion "(ctx->wwx_class == mutex->wwm_u.ctx->wwx_class)" failed: file "../../../../external/bsd/drm2/linux/linux_ww_mutex.c", line 304 ww mutex class mismatch: 0xffffffff812b6bc0 != 0x0
 > gdb netbsd.gdb 
[..]
Reading symbols from netbsd.gdb...done.
warning: ../../../../gdbscripts/kdump: No such file or directory
(gdb) target kvm /tmp/netbsd.core
0xffffffff80229485 in cpu_reboot (howto=howto@entry=256, 
    bootstr=bootstr@entry=0x0) at ../../../../arch/amd64/amd64/machdep.c:674
674			dumpsys();
(gdb) bt
#0  0xffffffff80229485 in cpu_reboot (howto=howto@entry=256, 
    bootstr=bootstr@entry=0x0) at ../../../../arch/amd64/amd64/machdep.c:674
#1  0xffffffff80632474 in db_sync_cmd (addr=<optimized out>, 
    have_addr=<optimized out>, count=<optimized out>, modif=<optimized out>)
    at ../../../../ddb/db_command.c:1380
#2  0xffffffff80632c3e in db_command (
    last_cmdp=last_cmdp@entry=0xffffffff812657a0 <db_last_command>)
    at ../../../../ddb/db_command.c:914
#3  0xffffffff80632fa5 in db_command_loop ()
    at ../../../../ddb/db_command.c:572
#4  0xffffffff806367be in db_trap (type=type@entry=1, code=code@entry=0)
    at ../../../../ddb/db_trap.c:90
#5  0xffffffff80225f32 in kdb_trap (type=type@entry=1, code=code@entry=0, 
    regs=regs@entry=0xffffe40041379670)
    at ../../../../arch/amd64/amd64/db_interface.c:234
#6  0xffffffff8022a80e in trap (frame=0xffffe40041379670)
    at ../../../../arch/amd64/amd64/trap.c:293
#7  0xffffffff8020108e in alltraps ()
#8  0xffffffff80224945 in breakpoint ()
#9  0xffffffff80814bc3 in vpanic (
    fmt=0xffffffff80f58218 "kernel %sassertion \"%s\" failed: file \"%s\", line %d ww mutex class mismatch: %p != %p", ap=ap@entry=0xffffe400413797a8)
    at ../../../../kern/subr_prf.c:340
#10 0xffffffff80ad9485 in kern_assert (
    fmt=fmt@entry=0xffffffff80f58218 "kernel %sassertion \"%s\" failed: file \"%s\", line %d ww mutex class mismatch: %p != %p")
    at ../../../../../../lib/libkern/kern_assert.c:51
#11 0xffffffff80aaaadc in ww_mutex_lock_wait_sig (
    mutex=mutex@entry=0xffffe4012d67b620, ctx=ctx@entry=0xffffe40041379af8)
    at ../../../../external/bsd/drm2/linux/linux_ww_mutex.c:302
#12 0xffffffff80aab9aa in linux_ww_mutex_lock_slow_interruptible (
    mutex=0xffffe4012d67b620, ctx=ctx@entry=0xffffe40041379af8)
    at ../../../../external/bsd/drm2/linux/linux_ww_mutex.c:732
#13 0xffffffff80ab2d86 in ttm_eu_reserve_buffers (
    ticket=ticket@entry=0xffffe40041379af8, list=list@entry=0xffffe40041379a20)
    at ../../../../external/bsd/drm2/dist/drm/ttm/ttm_execbuf_util.c:157
#14 0xffffffff8099ac53 in radeon_bo_list_validate (rdev=0xffff800007067000, 
    ticket=ticket@entry=0xffffe40041379af8, 
    head=head@entry=0xffffe40041379a20, ring=0)
    at ../../../../external/bsd/drm2/dist/drm/radeon/radeon_object.c:453
#15 0xffffffff80986231 in radeon_cs_parser_relocs (p=0xffffe400413799d0)
    at ../../../../external/bsd/drm2/dist/drm/radeon/radeon_cs.c:180
#16 radeon_cs_ioctl (dev=<optimized out>, data=<optimized out>, 
    filp=<optimized out>)
    at ../../../../external/bsd/drm2/dist/drm/radeon/radeon_cs.c:631
#17 0xffffffff806d8c13 in drm_ioctl (fp=<optimized out>, cmd=<optimized out>, 
    data=0xffffe40041379de0) at ../../../../external/bsd/drm2/drm/drm_drv.c:676
#18 0xffffffff80820311 in sys_ioctl (l=<optimized out>, 
    uap=0xffffe40041379f00, retval=<optimized out>)
    at ../../../../kern/sys_generic.c:671
#19 0xffffffff8024b2ac in sy_call (rval=0xffffe40041379eb0, 
    uap=0xffffe40041379f00, l=0xffffe40118907180, 
    sy=0xffffffff81272bd0 <sysent+1296>) at ../../../../sys/syscallvar.h:65
#20 sy_invoke (code=54, rval=0xffffe40041379eb0, uap=0xffffe40041379f00, 
    l=0xffffe40118907180, sy=0xffffffff81272bd0 <sysent+1296>)
    at ../../../../sys/syscallvar.h:94
#21 syscall (frame=0xffffe40041379f00)
    at ../../../../arch/x86/x86/syscall.c:144
#22 0xffffffff80200771 in Xsyscall ()
(gdb) up 11
#11 0xffffffff80aaaadc in ww_mutex_lock_wait_sig (
    mutex=mutex@entry=0xffffe4012d67b620, ctx=ctx@entry=0xffffe40041379af8)
    at ../../../../external/bsd/drm2/linux/linux_ww_mutex.c:302
302		KASSERTMSG((ctx->wwx_class == mutex->wwm_u.ctx->wwx_class),
(gdb) p *ctx
$1 = {wwx_class = 0xffffffff812b6bc0 <reservation_ww_class>, 
  wwx_owner = 0xffffe40118907180, wwx_ticket = 50953, wwx_acquired = 0, 
  wwx_acquire_done = false, wwx_rb_node = {rb_nodes = {0x0, 0x0}, rb_info = 0}}
(gdb) p *mutex
$2 = {wwm_state = WW_CTX, wwm_u = {owner = 0xffffe4004134faf8, 
    ctx = 0xffffe4004134faf8}, wwm_lock = {u = {mtxa_owner = 67073}}, 
  wwm_class = 0xffffffff812b6bc0 <reservation_ww_class>, wwm_waiters = {
    rbt_root = 0x0, rbt_ops = 0xffffffff80e91c00 <ww_acquire_ctx_rb_ops>, 
    rbt_minmax = {0xffffe4012d67b640, 0xffffe4012d67b640}}, wwm_cv = {
    cv_opaque = {0x0, 0xffffe4012d67b660, 0xffffffff80f587d5}}}
(gdb) p *mutex->wwm_u.ctx
$3 = {wwx_class = 0xffffe4004134fd60, wwx_owner = 0xffffe40107170940, 
  wwx_ticket = 18446713288477965536, wwx_acquired = 2149602382, 
  wwx_acquire_done = 255, wwx_rb_node = {rb_nodes = {0x0, 0xffffe400bcd5f284}, 
    rb_info = 88}}
(gdb) p *mutex->wwm_u.ctx->wwx_class
$4 = {wwc_ticket = 18446713288477949952}
(gdb) quit


>How-To-Repeat:
Just use gtk3 base stuff with a radeon on -current?

>Fix:
n/a



Home | Main Index | Thread Index | Old Index