ebsd.org (Postfix) with ESMTP id 4cwlrf1dkbz6Db1b for ; Tue, 28 Oct 2025 09:46:42 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-yx1-f47.google.com (mail-yx1-f47.google.com [74.125.224.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cwlrd5JfDz3C56 for ; Tue, 28 Oct 2025 09:46:41 +0000 (UTC) (envelope-from rlibby@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yx1-f47.google.com with SMTP id 956f58d0204a3-63e336b1ac4so9177220d50.1 for ; Tue, 28 Oct 2025 02:46:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761644801; x=1762249601; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Qcq1V2kAmArlM4cMqH+lH+8FRK30Pjn65pP8qPBbhbg=; b=L8cjfoVOvuOGRCX1j7yVejzy4S+c9Hwm/hoQP8LqlSun10s3YFlhAFqIWxh1VNakUX iIvo+cGBxYgnj1ks1ah2ngMe5pmIws1gXjh82t1AXxSKEtd0nRRsFZ56abLDGHWNAFbd UaDhtNhESqudKEMeodvmAMGUirpyofCAqf4K8dsSPx3ve7OygtvU3iv9ZwGYljox6O4t tX8tYYRew2khuqvpbe16E4UfaiMrsbSah52TYGo9cqYROl8pBY4k/TQbYCKBCUghdJkh qKp6i0czWUVE6AI+PeStnpQXEvhBZrRe8eUpNI6lJny9rIfGP0KzfofSnhLt4KxTZ7mY PyTA== X-Gm-Message-State: AOJu0YxosSwOwzvukCH+i275lR4RLp+307hf0UZjJ2jWSigTKM/gKJtn zH6m6Fz1RPpqtVXkkjQUKEc9hII4L/NS/7HPPHbXM48ymSFFIl2kV+EvQZV2hQ== X-Gm-Gg: ASbGncszC40bDEx9do6SZlWNqe9bIyk4dmp/nQ+XHapbm1a5VywwTD6JdDleR3zoVbb EH2vNJn8zu8qhCEQeA7VbqbKvaldE1sUrvUnf1d6l22IxhObM1HLQGIHSGoY8fCWXOwc4Q6HwKW 3clGO/hbx37zjcfS+vzTjSkI5w3WfB4sjefsxI3EylsKB+klLhO7XxJbbUw7DDgJZDcHs8z9Se8 +HfYZKz1xndLOGB5hjChZ+AX/waE0r7fT8J8v38EsUHi7m2vPpZd/wjJPK2vKEFHNe3mBkNuz7y UHHKeVYFQ3dWh3Xcm35SKDbPtflpSue9mj+Q6E6rK8D7wKt/B+kDVVy7Mj5gMXpeVJ2IXwhJlc0 lP92Ej7Od9vlJJP7CjXe4hwsR1k3a854aNC3PDCsqmlhxFFLYN5xT1FUTvEotz9oUczc6leWP6j 1nnZrMZ/LxQuTsf0ONKE8e/4yQAKCKcRkf6W8= X-Google-Smtp-Source: AGHT+IH2MZR3NUgXrdxMTwTPu4RcXWu8EDBt627QSM+O5YhRxnWMrhUril7zEhgvkyw616BqChh4dg== X-Received: by 2002:a05:690e:1687:b0:63e:1f42:a469 with SMTP id 956f58d0204a3-63f6c68d201mr2013108d50.16.1761644800823; Tue, 28 Oct 2025 02:46:40 -0700 (PDT) Received: from mail-yx1-f42.google.com (mail-yx1-f42.google.com. [74.125.224.42]) by smtp.gmail.com with ESMTPSA id 00721157ae682-785ed13dac7sm25930227b3.0.2025.10.28.02.46.40 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Oct 2025 02:46:40 -0700 (PDT) Received: by mail-yx1-f42.google.com with SMTP id 956f58d0204a3-63e336b1ac4so9177188d50.1 for ; Tue, 28 Oct 2025 02:46:40 -0700 (PDT) X-Received: by 2002:a05:690e:1687:b0:63e:1f42:a469 with SMTP id 956f58d0204a3-63f6c68d201mr2013089d50.16.1761644800159; Tue, 28 Oct 2025 02:46:40 -0700 (PDT) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org MIME-Version: 1.0 References: In-Reply-To: From: Ryan Libby Date: Tue, 28 Oct 2025 02:46:29 -0700 X-Gmail-Original-Message-ID: X-Gm-Features: AWmQ_bk2YzwWtgABs8xKA7wTDn-yPSclnDR3h9-AxWH4hcvRfhs3VEEwfMo27Kw Message-ID: Subject: Re: db> reset -> panic: lock (sleep mutex) eventhandler not locked @ /usr/src/sys/kern/subr_eventhandler.c:272 To: "Bjoern A. Zeeb" Cc: current@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:74.125.0.0/16, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cwlrd5JfDz3C56 On Mon, Oct 27, 2025 at 7:31=E2=80=AFAM Bjoern A. Zeeb wrote: > > Hi, > > on main-ish I get the following. I am a bit concerned as over the last > year or two our reset paths had issues like this more and more. > > > db> reset > panic: lock (sleep mutex) eventhandler not locked @ /usr/src/sys/kern/sub= r_eventhandler.c:272 > cpuid =3D 1 > time =3D 1025 > KDB: stack backtrace: > db_trace_self() at db_trace_self > db_trace_self_wrapper() at db_trace_self_wrapper+0x38 > vpanic() at vpanic+0x1a0 > panic() at panic+0x48 > witness_unlock() at witness_unlock+0x140 > __mtx_unlock_flags() at __mtx_unlock_flags+0x54 > eventhandler_find_list() at eventhandler_find_list+0xbc > kern_reboot() at kern_reboot+0x244 > db_reset() at db_reset+0xec > db_command() at db_command+0x2f4 > db_command_loop() at db_command_loop+0x58 > db_trap() at db_trap+0x100 > kdb_trap() at kdb_trap+0x350 > handle_el1h_sync() at handle_el1h_sync+0x18 > --- exception, esr 0xf2000000 > kdb_alt_break_internal() at kdb_alt_break_internal+0x1a8 > kdb_alt_break() at kdb_alt_break+0x10 > uart_intr_rxready() at uart_intr_rxready+0x88 > uart_intr() at uart_intr+0x124 > intr_event_handle() at intr_event_handle+0xf4 > intr_isrc_dispatch() at intr_isrc_dispatch+0x60 > arm_gic_intr() at arm_gic_intr+0x118 > intr_irq_handler() at intr_irq_handler+0x98 > handle_el1h_irq() at handle_el1h_irq+0x18 > --- interrupt > cpu_idle() at cpu_idle+0x78 > sched_idletd() at sched_idletd+0x494 > fork_exit() at fork_exit+0x78 > fork_trampoline() at fork_trampoline+0x18 > Uptime: 17m5s > Automatic reboot in 15 seconds - press a key on the console to abort > > -- > Bjoern A. Zeeb r15:7 > Would your kernel config match this condition in sys/sys/mutex.h? #if LOCK_DEBUG > 0 || defined(MUTEX_NOINLINE) It looks like we might be missing some SCHEDULER_STOPPED() checks in those code paths. It's a twisty maze of macros that I haven't totally followed though. td_locks might be getting broken too. Ryan