From owner-freebsd-bugs@freebsd.org Sat Oct 17 07:32:08 2020 Return-Path: Delivered-To: freebsd-bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6A24B42E035 for ; Sat, 17 Oct 2020 07:32:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4CCvqD2G5Sz3WxC for ; Sat, 17 Oct 2020 07:32:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 4D95242E11B; Sat, 17 Oct 2020 07:32:08 +0000 (UTC) Delivered-To: bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4D5B742E18A for ; Sat, 17 Oct 2020 07:32:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CCvqD1JwYz3WpT for ; Sat, 17 Oct 2020 07:32:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 109461DEAC for ; Sat, 17 Oct 2020 07:32:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 09H7W7KL015372 for ; Sat, 17 Oct 2020 07:32:07 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 09H7W7PS015371 for bugs@FreeBSD.org; Sat, 17 Oct 2020 07:32:07 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 250413] kernel 13.0 panic sleepq_add with net/syncthing Date: Sat, 17 Oct 2020 07:32:07 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: hsw@bitmark.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2020 07:32:08 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D250413 Bug ID: 250413 Summary: kernel 13.0 panic sleepq_add with net/syncthing Product: Base System Version: CURRENT Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: hsw@bitmark.com This panic happens after syncthing has been running for a while, syncing 20= GB of data from an Android device. Usually takes a few hours to panic. Ifinaly managed to capture a core dump = and obtain the following back trace using the command: kgdb -n last /usr/obj/usr/src/amd64.amd64/sys/GENERIC/kernel.debug kernel: FreeBSD 13.0-CURRENT #20 r366667 syncthing 1.10.0 hardware: Lenovo E495 Ryzen/Vega system panic message: WARNING !drm_modeset_is_locked(&plane->mutex) failed at /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/drm-kmod-drm_v5.4.62_3/driv= ers/gpu/drm/drm_atomic_helper.c:871 #0 0xffffffff836ae6e3 at linux_dump_stack+0x23 #1 0xffffffff8362c610 at drm_atomic_helper_check_planes+0xb0 #2 0xffffffff8341c42b at amdgpu_dm_atomic_check+0x46b #3 0xffffffff8362a35a at drm_atomic_check_only+0x3fa #4 0xffffffff8362a793 at drm_atomic_commit+0x13 #5 0xffffffff836373d8 at drm_client_modeset_commit_atomic+0x148 #6 0xffffffff83637139 at drm_client_modeset_commit_force+0x69 #7 0xffffffff83677cea at drm_fb_helper_restore_fbdev_mode_unlocked+0x7a #8 0xffffffff83671cd7 at vt_kms_postswitch+0x167 #9 0xffffffff80a360c2 at vt_window_switch+0x122 #10 0xffffffff80a3358f at vtterm_cngrab+0x1f #11 0xffffffff80b724b6 at cngrab+0x16 #12 0xffffffff80bd98bc at vpanic+0xec #13 0xffffffff80bd9713 at panic+0x43 #14 0xffffffff80c34c29 at sleepq_add+0x359 #15 0xffffffff80be4004 at _sx_xlock_hard+0x414 #16 0xffffffff80be3b8a at _sx_xlock+0xba #17 0xffffffff80d7fe7c at inp_setmoptions+0xd5c kernel trap 22 with interrupts disabled kernel trap 22 with interrupts disabled panic: sleepq_add: td 0xfffffe005eac6500 to sleep on wchan 0xffffffff81d97= 6e8 with sleeping prohibited cpuid =3D 5 time =3D 1602901125 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe005df08= 5d0 vpanic() at vpanic+0x182/frame 0xfffffe005df08620 panic() at panic+0x43/frame 0xfffffe005df08680 sleepq_add() at sleepq_add+0x359/frame 0xfffffe005df086d0 _sx_xlock_hard() at _sx_xlock_hard+0x414/frame 0xfffffe005df08770 _sx_xlock() at _sx_xlock+0xba/frame 0xfffffe005df087b0 inp_setmoptions() at inp_setmoptions+0xd5c/frame 0xfffffe005df08960 ip_ctloutput() at ip_ctloutput+0xfe/frame 0xfffffe005df089b0 udp_ctloutput() at udp_ctloutput+0x100/frame 0xfffffe005df089f0 sosetopt() at sosetopt+0xed/frame 0xfffffe005df08a50 kern_setsockopt() at kern_setsockopt+0xa8/frame 0xfffffe005df08ab0 sys_setsockopt() at sys_setsockopt+0x24/frame 0xfffffe005df08ad0 amd64_syscall() at amd64_syscall+0x135/frame 0xfffffe005df08bf0 fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe005df08bf0 --- syscall (105, FreeBSD ELF64, sys_setsockopt), rip =3D 0x4c220a, rsp =3D 0xc0005738d8, rbp =3D 0xc000573938 --- KDB: enter: panic __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55 55 __asm("movq %%gs:%P1,%0" : "=3Dr" (td) : "n" (offsetof(stru= ct pcpu, (kgdb) bt #0 __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55 #1 doadump (textdump=3D0) at /usr/src/sys/kern/kern_shutdown.c:394 #2 0xffffffff804a0a8a in db_dump (dummy=3D, dummy2=3D, dummy3=3D, dummy4=3D) at /usr/src/sys/ddb/db_command.c:575 #3 0xffffffff804a0850 in db_command (last_cmdp=3D, cmd_table=3D, dopager=3D1) at /usr/src/sys/ddb/db_command.c:= 482 #4 0xffffffff804a05ad in db_command_loop () at /usr/src/sys/ddb/db_command.c:535 #5 0xffffffff804a38c6 in db_trap (type=3D, code=3D) at /usr/src/sys/ddb/db_main.c:270 #6 0xffffffff80c255d4 in kdb_trap (type=3D3, code=3D0, tf=3D) at /usr/src/sys/kern/subr_kdb.c:699 #7 0xffffffff81021dde in trap (frame=3D0xfffffe005df08500) at /usr/src/sys/amd64/amd64/trap.c:576 #8 #9 kdb_enter (why=3D0xffffffff8120c497 "panic", msg=3D) at /usr/src/sys/kern/subr_kdb.c:486 #10 0xffffffff80bd996e in vpanic (fmt=3D, ap=3D) at /usr/src/sys/kern/kern_shutdown.c:901 #11 0xffffffff80bd9713 in panic (fmt=3D0xffffffff81c89468 "\270\331\034\201\377\377\377\377") at /usr/src/sys/kern/kern_shutdown.c:838 #12 0xffffffff80c34c29 in sleepq_add (wchan=3D0xffffffff81d976e8 , lock=3D0x0, wmesg=3D0xffffffff8123f1a9 "in_multi_sx", flags=3D3, queue=3D0) at /usr/src/sys/kern/subr_sleepqueue.c:328 #13 0xffffffff80be4004 in _sx_xlock_hard (sx=3D0xffffffff81d976e8 , x=3D, opts=3D, file=3D,=20 line=3D) at /usr/src/sys/kern/kern_sx.c:854 #14 0xffffffff80be3b8a in _sx_xlock (sx=3D0xffffffff81d976e8 , opts=3D0, file=3D0xffffffff811552ae "/usr/src/sys/netinet/in_mcast.c", line= =3D2081) at /usr/src/sys/kern/kern_sx.c:332 #15 0xffffffff80d7fe7c in inp_join_group (inp=3D0xfffff800241d5000, sopt=3D) at /usr/src/sys/netinet/in_mcast.c:2081 #16 inp_setmoptions (inp=3D0xfffff800241d5000, sopt=3D) at /usr/src/sys/netinet/in_mcast.c:2851 #17 0xffffffff80d8f4ce in ip_ctloutput (so=3D, sopt=3D0xfffffe005df08a68) at /usr/src/sys/netinet/ip_output.c:1366 #18 0xffffffff80dbd360 in udp_ctloutput (so=3D0xfffff8004ddc6b40, sopt=3D0xfffffe005df08a68) at /usr/src/sys/netinet/udp_usrreq.c:992 #19 0xffffffff80c7e11d in sosetopt (so=3D0xfffff8004ddc6b40, sopt=3D0xfffffe005df08a68) at /usr/src/sys/kern/uipc_socket.c:3003 #20 0xffffffff80c83628 in kern_setsockopt (td=3D0xfffffe005eac6500, s=3D, level=3D, name=3D, val=3D,=20 valseg=3D, valsize=3D8) at /usr/src/sys/kern/uipc_syscalls.c:1270 #21 0xffffffff80c83574 in sys_setsockopt (td=3D0xffffffff81c89468 , uap=3D) at /usr/src/sys/kern/uipc_syscalls.c:1231 #22 0xffffffff81022c05 in syscallenter (td=3D) at /usr/src/sys/amd64/amd64/../../kern/subr_syscall.c:165 #23 amd64_syscall (td=3D0xfffffe005eac6500, traced=3D0) at /usr/src/sys/amd64/amd64/trap.c:1156 #24 #25 0x00000000004c220a in ?? () Backtrace stopped: Cannot access memory at address 0xc0005738d8 (kgdb) frame 12 #12 0xffffffff80c34c29 in sleepq_add (wchan=3D0xffffffff81d976e8 , lock=3D0x0, wmesg=3D0xffffffff8123f1a9 "in_multi_sx", flags=3D3, queue=3D0) at /usr/src/sys/kern/subr_sleepqueue.c:328 328 KASSERT(0, (kgdb) list 323 /* If this thread is not allowed to sleep, die a horrible death. */ 324 if (__predict_false(!THREAD_CAN_SLEEP())) { 325 #ifdef EPOCH_TRACE 326 epoch_trace_list(curthread); 327 #endif 328 KASSERT(0, 329 ("%s: td %p to sleep on wchan %p with sleeping prohibited", 330 __func__, td, wchan)); 331 } 332=20=20=20=20=20 (kgdb)=20 Please advise what further commands could be used to obtain more informatio= n, or any changes I migh make to help track this down. --=20 You are receiving this mail because: You are the assignee for the bug.=