From owner-freebsd-current@freebsd.org Tue Feb 20 17:06:48 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C9CFF15675 for ; Tue, 20 Feb 2018 17:06:48 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-qt0-x236.google.com (mail-qt0-x236.google.com [IPv6:2607:f8b0:400d:c0d::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3423080D3F for ; Tue, 20 Feb 2018 17:06:48 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-qt0-x236.google.com with SMTP id l19so2559036qtj.9 for ; Tue, 20 Feb 2018 09:06:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=HPCpKE7qxZjG+ogeU3q0EPhU56wjiHRbUNfaVYC+Pbo=; b=oawUaeesL9kZIY8l3koaEwjGBL8E7PIYKYSp8UETJck57KgCx/Z6efJbJAdZo4XhVv l7pptJ/x9OoA4VAmfAzPineOaUW73tj0Ridu2yCBjc+0740VGbwKsfpXorbH6v/jjGTd g1Vf2WrBb5MvhxcAkzBdXeHgPHAQ/RYG27U3Sl/yhWPosONz4eTsgAsSQK9YRTyN+uHk QOv9Cf6CNfvECZ3pXuwfBI+oN7c3JrVd57N84oRUSFrygICAraZfI0RLwwWNC3kyeMlN 25y3EWxUsx53HJ0TUL9o524WzT1Z5twAnEovkVrJwZRpaZ9NB/KFvaHO/qV15/P2T6nx sAyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=HPCpKE7qxZjG+ogeU3q0EPhU56wjiHRbUNfaVYC+Pbo=; b=NGw/rg/HztjDmUq/q9uVCqkF6dGYRR3RzvS520lo5dZNtRk5f7qV+ZkRnzryJdWlHV gIPJEvwAkuPYX3oM6XH/h/W0dC86nU2rTN24CEd3qnJ/wV40q57F66azjJYu6hDCJCuC KYHnAb9jW+jFogUibtf1g5/CbLRRej4mKfSQUz0gDTDCbEc8zGxUZrDnfWfm01XgyLS0 TYN33WTV1ahzX6R4gLnB1qu9sny0O1gaIr5WWlDSpSztwaFVZC0GBN6RYOFI9pVMPHLI Kvr499K4bb8uJ37DjtaHPjigA7z3odN7thSrTkmDZItjniPgi9rbgQGzJQM2J4/vqOP1 iY8Q== X-Gm-Message-State: APf1xPDxRjfo1d1a4L3lA+A2RHIoZlCbsrdTClm70PWXUo6yDqFBZYvc Bjt5unEwzEVpkLign3PKrrt4D0OQ7mCGQhxuGXw= X-Google-Smtp-Source: AH8x226n9acXSOk86q5TAhtUnsq1RQNTR8kWTh3V5tC9W/HhdHlxqv8tq4O/sKaxiajdr3NBdiE0vIjZAhoveVyD0NE= X-Received: by 10.200.38.188 with SMTP id 57mr459952qto.220.1519146407860; Tue, 20 Feb 2018 09:06:47 -0800 (PST) MIME-Version: 1.0 Received: by 10.237.35.42 with HTTP; Tue, 20 Feb 2018 09:06:47 -0800 (PST) In-Reply-To: <038d9336-9ee7-c079-5ad5-f023c6a306eb@club.fr> References: <038d9336-9ee7-c079-5ad5-f023c6a306eb@club.fr> From: Mateusz Guzik Date: Tue, 20 Feb 2018 18:06:47 +0100 Message-ID: Subject: Re: amd64 head -r329465 (non-debug build, but with symbols): "panic: spin lock held too long" during make check-old, reported during a sys_vfork To: =?UTF-8?Q?Juan_Ram=C3=B3n_Molina_Menor?= Cc: FreeBSD Current Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Feb 2018 17:06:48 -0000 I missed a consumer, try this: diff --git a/sys/kern/sys_procdesc.c b/sys/kern/sys_procdesc.c index 5e8928cb1534..174fffc5c666 100644 --- a/sys/kern/sys_procdesc.c +++ b/sys/kern/sys_procdesc.c @@ -398,7 +398,6 @@ procdesc_close(struct file *fp, struct thread *td) * process's reference to the process descriptor when it * calls back into procdesc_reap(). */ - PROC_SLOCK(p); proc_reap(curthread, p, NULL, 0); } else { /* On Tue, Feb 20, 2018 at 5:50 PM, Juan Ram=C3=B3n Molina Menor wrote: > I committed the fix in >> https://svnweb.freebsd.org/base?view=3Drevision&revision=3D329542 >> >> i.e. should be stable from this point on. >> > > Hi! > > It is maybe unrelated, but recent commits have broken my system with a > similar error. I did not have panics with a system built around December, > but since updating first to r329555 then today to r329641 I=E2=80=99m get= ting a > reproducible panic when logging out from a Lumina desktop session: > > Unread portion of the kernel message buffer: > spin lock 0xfffff8000d440020 (process slock) held by 0xfffff8000daed560 > (tid 100111) too long > panic: spin lock held too long > cpuid =3D 1 > time =3D 1519143505 > KDB: stack backtrace: > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame > 0xfffffe00005c15e0 > vpanic() at vpanic+0x18d/frame 0xfffffe00005c1640 > panic() at panic+0x43/frame 0xfffffe00005c16a0 > _mtx_lock_indefinite_check() at _mtx_lock_indefinite_check+0x71/frame > 0xfffffe00005c16b0 > mtx_spin_wait_unlocked() at mtx_spin_wait_unlocked+0x59/frame > 0xfffffe00005c16e0 > proc_reap() at proc_reap+0x24/frame 0xfffffe00005c1720 > procdesc_close() at procdesc_close+0x125/frame 0xfffffe00005c1760 > closef() at closef+0x251/frame 0xfffffe00005c17f0 > fdescfree_fds() at fdescfree_fds+0x90/frame 0xfffffe00005c1840 > fdescfree() at fdescfree+0x4df/frame 0xfffffe00005c1900 > exit1() at exit1+0x508/frame 0xfffffe00005c1970 > sys_sys_exit() at sys_sys_exit+0xd/frame 0xfffffe00005c1980 > amd64_syscall() at amd64_syscall+0xa48/frame 0xfffffe00005c1ab0 > fast_syscall_common() at fast_syscall_common+0x101/frame 0x7fffffffea90 > Uptime: 17m45s > Dumping 327 out of 3990 MB:..5%..15%..25%..35%..44%..5 > 4%..64%..74%..84%..93% > > Reading symbols from /boot/kernel/linux.ko...done. > Loaded symbols for /boot/kernel/linux.ko > Reading symbols from /boot/kernel/linux_common.ko...done. > Loaded symbols for /boot/kernel/linux_common.ko > Reading symbols from /boot/kernel/acpi_ibm.ko...done. > Loaded symbols for /boot/kernel/acpi_ibm.ko > Reading symbols from /boot/kernel/iwm7260fw.ko...done. > Loaded symbols for /boot/kernel/iwm7260fw.ko > Reading symbols from /boot/kernel/coretemp.ko...done. > Loaded symbols for /boot/kernel/coretemp.ko > Reading symbols from /boot/kernel/if_iwm.ko...done. > Loaded symbols for /boot/kernel/if_iwm.ko > Reading symbols from /boot/kernel/acpi_video.ko...done. > Loaded symbols for /boot/kernel/acpi_video.ko > Reading symbols from /boot/kernel/nullfs.ko...done. > Loaded symbols for /boot/kernel/nullfs.ko > Reading symbols from /boot/kernel/fdescfs.ko...done. > Loaded symbols for /boot/kernel/fdescfs.ko > Reading symbols from /boot/kernel/i915kms.ko...done. > Loaded symbols for /boot/kernel/i915kms.ko > Reading symbols from /boot/kernel/drm2.ko...done. > Loaded symbols for /boot/kernel/drm2.ko > Reading symbols from /boot/kernel/iicbus.ko...done. > Loaded symbols for /boot/kernel/iicbus.ko > Reading symbols from /boot/kernel/iic.ko...done. > Loaded symbols for /boot/kernel/iic.ko > Reading symbols from /boot/kernel/iicbb.ko...done. > Loaded symbols for /boot/kernel/iicbb.ko > #0 cpustop_handler () at /usr/src/sys/x86/x86/mp_x86.c:1324 > 1324 CPU_SET_ATOMIC(cpu, &stopped_cpus); > (kgdb) bt > #0 cpustop_handler () at /usr/src/sys/x86/x86/mp_x86.c:1324 > #1 0xffffffff80e29fb4 in ipi_nmi_handler () at > /usr/src/sys/x86/x86/mp_x86.c:1280 > #2 0xffffffff80d09a79 in trap (frame=3D0xffffffff8158bef0) > at /usr/src/sys/amd64/amd64/trap.c:188 > #3 0xffffffff80cec054 in nmi_calltrap () at /usr/src/sys/amd64/amd64/exc= ep > tion.S:633 > #4 0xffffffff80e1aaef in acpi_cpu_idle_mwait (mwait_hint=3D0) at > cpufunc.h:611 > Previous frame inner to this frame (corrupt stack?) > Current language: auto; currently minimal > > kgdb is over my head, but I can provide more details under some guidance. > > Hope it helps, > Juan > > --=20 Mateusz Guzik