From nobody Sun Sep 12 19:08:26 2021 X-Original-To: x11@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9497B17B5498 for ; Sun, 12 Sep 2021 19:08:36 +0000 (UTC) (envelope-from pete@nomadlogic.org) Received: from mail.nomadlogic.org (mail.nomadlogic.org [66.165.241.226]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.nomadlogic.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H6zfX27L3z3DYw; Sun, 12 Sep 2021 19:08:36 +0000 (UTC) (envelope-from pete@nomadlogic.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nomadlogic.org; s=04242021; t=1631473708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4uAT2FqeDqFnZpxKK0LQV/N6X4yT4qvAx6RGz016se8=; b=VzweK9SWX3ux5Nsira8rM8zr8V5el+AZfu7QPLt9KR/E0gSPeRc5B5rM/yy9jawlh5Oo0K JDwzsnB0zjmXXOSP8xcB7++Zuhqt3U61ARoUGUVmoMOBzoUSJhAQO7haE/M4ikly6MxxpB 1ks926BFWZHc/6n0ybOc3mxLQ6Labw4= Received: from [192.168.1.223] (cpe-24-24-163-126.socal.res.rr.com [24.24.163.126]) by mail.nomadlogic.org (OpenSMTPD) with ESMTPSA id bff5f3ca (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 12 Sep 2021 19:08:27 +0000 (UTC) Subject: Re: Panic on drm-devel v5.5.19.g20210909 To: Vladimir Kondratyev , x11@freebsd.org References: Message-ID: <2fcbea3c-ce7b-17ae-7018-ebda212ef186@nomadlogic.org> Date: Sun, 12 Sep 2021 12:08:26 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 List-Id: X11 List-Archive: https://lists.freebsd.org/archives/freebsd-x11 List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-x11@freebsd.org X-BeenThere: freebsd-x11@freebsd.org MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Rspamd-Queue-Id: 4H6zfX27L3z3DYw X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Reply-To: pete@nomadlogic.org From: Pete Wright via x11 X-Original-From: Pete Wright X-ThisMailContainsUnwantedMimeParts: N On 9/12/21 11:49 AM, Vladimir Kondratyev wrote: > On 12.09.2021 03:47, Pete Wright via x11 wrote: >> >> On 9/11/21 9:53 AM, Pete Wright via freebsd-x11 wrote: >>> >>> On 9/11/21 8:17 AM, Vladimir Kondratyev wrote: >>>> On 11.09.2021 02:53, Pete Wright via freebsd-x11 wrote: >>>>> hello, >>>>> i got the following panic after upgrading my current laptop to >>>>> drm-devel-v5.5.19.g20210909 (3df6598adf625a18a7c762b2d48b4c3dd7925838): >>>>> >>>>> panic: acquiring blockable sleep lock with spinlock or critical section >>>>> held (sleep mutex) linux_wq_exec @ >>>>> /usr/home/pete/git/freebsd/sys/compat/linuxkpi/common/src/linux_work.c:105 >>>>> >>>>> cpuid = 5 >>>>> time = 1631315668 >>>>> KDB: stack backtrace: >>>>> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame >>>>> 0xfffffe011d086060 >>>>> vpanic() at vpanic+0x187/frame 0xfffffe011d0860c0 >>>>> panic() at panic+0x43/frame 0xfffffe011d086120 >>>>> witness_checkorder() at witness_checkorder+0xe78/frame >>>>> 0xfffffe011d0862f0 >>>>> __mtx_lock_flags() at __mtx_lock_flags+0x94/frame 0xfffffe011d086340 >>>>> linux_queue_work_on() at linux_queue_work_on+0x9a/frame >>>>> 0xfffffe011d086380 >>>>> dma_fence_signal() at dma_fence_signal+0xc0/frame 0xfffffe011d0863d0 >>>>> dma_resv_add_shared_fence() at dma_resv_add_shared_fence+0x96/frame >>>>> 0xfffffe011d086420 >>>>> i915_vma_move_to_active() at i915_vma_move_to_active+0x7e/frame >>>>> 0xfffffe011d086460 >>>>> i915_gem_do_execbuffer() at i915_gem_do_execbuffer+0x13d7/frame >>>>> 0xfffffe011d086670 >>>>> i915_gem_execbuffer2_ioctl() at i915_gem_execbuffer2_ioctl+0x195/frame >>>>> 0xfffffe011d0866e0 >>>>> drm_ioctl_kernel() at drm_ioctl_kernel+0x72/frame 0xfffffe011d086730 >>>>> drm_ioctl() at drm_ioctl+0x2bf/frame 0xfffffe011d086820 >>>>> linux_file_ioctl() at linux_file_ioctl+0x297/frame 0xfffffe011d086880 >>>>> kern_ioctl() at kern_ioctl+0x202/frame 0xfffffe011d0868f0 >>>>> sys_ioctl() at sys_ioctl+0x124/frame 0xfffffe011d0869c0 >>>>> amd64_syscall() at amd64_syscall+0x12e/frame 0xfffffe011d086af0 >>>>> fast_syscall_common() at fast_syscall_common+0xf8/frame >>>>> 0xfffffe011d086af0 >>>>> --- syscall (54, FreeBSD ELF64, sys_ioctl), rip = 0x80f1ae3ca, rsp = >>>>> 0x7fffffffc8d8, rbp = 0x7fffffffc970 --- >>>>> KDB: enter: panic >>>>> >>>>> >>>>> I have a core and and additional info if that'll help debug this issue. >>>>> it happened three times while doing normal web+shell work. i've >>>>> reverted to the commit previous this one and it looks like the >>>>> system no >>>>> longer panic's. >>>>> >>>>> -pete >>>>> >>>> Try to revert this commit: >>>> https://github.com/freebsd/drm-kmod/commit/787ffa8c48ecd02310ce2ec27c4b84d1898201e5 >>>> >>>> >>> Thanks for the heads up on that.  Just reverted on my system and it >>> seems better on my end now.  Let me know if there is any additional >>> debugging i can do to fix the original sleep lock issue. >>> >> hrm - spoke too soon, just had the same panic with that commit >> reverted.  made it most of the day with several suspend/resume's as well >> as web browsing and watching videos. >> >> -pete >> > Could you make backtrace with kgdb? One from your mail is useless as kdb > skipped all functions declared as static. > > just type > > # kgdb /boot/kernel/kernel /var/crash/vmcore.last > (kgdb) bt > here ya go: __curthread () at /usr/home/pete/git/freebsd/sys/amd64/include/pcpu_aux.h:55 55        __asm("movq %%gs:%P1,%0" : "=r" (td) : "n" (offsetof(struct pcpu, (kgdb) bt #0  __curthread () at /usr/home/pete/git/freebsd/sys/amd64/include/pcpu_aux.h:55 #1  doadump (textdump=textdump@entry=0) at /usr/home/pete/git/freebsd/sys/kern/kern_shutdown.c:399 #2  0xffffffff804cf8fa in db_dump (dummy=, dummy2=, dummy3=, dummy4=)     at /usr/home/pete/git/freebsd/sys/ddb/db_command.c:575 #3  0xffffffff804cf7b2 in db_command (last_cmdp=, cmd_table=, dopager=dopager@entry=1)     at /usr/home/pete/git/freebsd/sys/ddb/db_command.c:482 #4  0xffffffff804cf42d in db_command_loop () at /usr/home/pete/git/freebsd/sys/ddb/db_command.c:535 #5  0xffffffff804d2ba6 in db_trap (type=, code=) at /usr/home/pete/git/freebsd/sys/ddb/db_main.c:270 #6  0xffffffff80c73547 in kdb_trap (type=type@entry=3, code=code@entry=0, tf=tf@entry=0xfffffe011d085f90)     at /usr/home/pete/git/freebsd/sys/kern/subr_kdb.c:733 #7  0xffffffff810ebe83 in trap (frame=0xfffffe011d085f90) at /usr/home/pete/git/freebsd/sys/amd64/amd64/trap.c:609 #8  #9  kdb_enter (why=0xffffffff812e8d97 "panic", msg=) at /usr/home/pete/git/freebsd/sys/kern/subr_kdb.c:506 #10 0xffffffff80c259e8 in vpanic (fmt=0xffffffff8121692d "acquiring blockable sleep lock with spinlock or critical section held (%s) %s @ %s:%d",     ap=, ap@entry=0xfffffe011d086100) at /usr/home/pete/git/freebsd/sys/kern/kern_shutdown.c:907 #11 0xffffffff80c25773 in panic (fmt=0xffffffff81e9d9c0 "KN*\201\377\377\377\377") at /usr/home/pete/git/freebsd/sys/kern/kern_shutdown.c:843 #12 0xffffffff80c963b8 in witness_checkorder (lock=0xfffff80004817f88, flags=9, file=,     file@entry=0xffffffff812479c6 "/usr/home/pete/git/freebsd/sys/compat/linuxkpi/common/src/linux_work.c", line=line@entry=105,     interlock=interlock@entry=0x0) at /usr/home/pete/git/freebsd/sys/kern/subr_witness.c:1135 #13 0xffffffff80c01c44 in __mtx_lock_flags (c=0xfffff80004817fa0, opts=0,     file=0xffffffff812479c6 "/usr/home/pete/git/freebsd/sys/compat/linuxkpi/common/src/linux_work.c", line=105)     at /usr/home/pete/git/freebsd/sys/kern/kern_mutex.c:278 #14 0xffffffff80e9adea in linux_work_exec_unblock (work=0xfffff803e7310498) at /usr/home/pete/git/freebsd/sys/compat/linuxkpi/common/src/linux_work.c:105 #15 linux_queue_work_on (cpu=, wq=0xfffff80004817f80, work=0xfffff803e7310498)     at /usr/home/pete/git/freebsd/sys/compat/linuxkpi/common/src/linux_work.c:150 #16 0xffffffff8432bd70 in dma_fence_signal () from /boot/modules/linuxkpi_gplv2.ko #17 0xffffffff8432d016 in dma_resv_add_shared_fence () from /boot/modules/linuxkpi_gplv2.ko #18 0xffffffff8416519e in i915_vma_move_to_active () from /boot/modules/i915kms.ko #19 0x0000000000000000 in ?? () (kgdb) -p -- Pete Wright pete@nomadlogic.org @nomadlogicLA