From nobody Tue Oct 1 11:47:32 2024 X-Original-To: current@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 4XHx5G1Wvnz5Xk6t for ; Tue, 01 Oct 2024 11:47:46 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4XHx5F18jYz51yV for ; Tue, 1 Oct 2024 11:47:45 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none) Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 491BlXDA041345; Tue, 1 Oct 2024 14:47:36 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 491BlXDA041345 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 491BlWWM041344; Tue, 1 Oct 2024 14:47:32 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 1 Oct 2024 14:47:32 +0300 From: Konstantin Belousov To: dsdqmzk@hotmail.com Cc: current@freebsd.org Subject: Re: panic: curthread not pinned Message-ID: References: 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Spamd-Result: default: False [-1.09 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.52)[-0.521]; NEURAL_SPAM_MEDIUM(0.44)[0.435]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none]; FROM_EQ_ENVFROM(0.00)[]; ARC_NA(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; MIME_TRACE(0.00)[0:+]; MISSING_XM_UA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FREEMAIL_FROM(0.00)[gmail.com]; FREEMAIL_TO(0.00)[hotmail.com]; R_DKIM_NA(0.00)[]; HAS_XAW(0.00)[]; TO_DN_NONE(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all:c]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; MLMMJ_DEST(0.00)[current@freebsd.org] X-Rspamd-Queue-Id: 4XHx5F18jYz51yV X-Spamd-Bar: - On Tue, Oct 01, 2024 at 11:53:33AM +0300, Konstantin Belousov wrote: > On Tue, Oct 01, 2024 at 01:16:31PM +0700, dsdqmzk@hotmail.com wrote: > > Hyper-V Gen2 VM, 8 cores, 8GB RAM. The panic is reproducible while > > running `make -j8 buildworld`. Initially installed from > > FreeBSD-15.0-CURRENT-amd64-20240926-6a4f0c063718-272495-disc1.iso, > > updating the kernel (that I could build) to b35f0aa4952 does not help. > > > > panic: curthread not pinned > > cpuid = 3 > > time = 1727763183 > > KDB: stack backtrace: > > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame > > 0xfffffe008e34a1f0 > > vpanic() at vpanic+0x13f/frame 0xfffffe008e34a320 > > panic() at panic+0x43/frame 0xfffffe008e34a380 > > smp_targeted_tlb_shootdown_native() at > > smp_targeted_tlb_shootdown_native+0x472/frame 0xfffffe008e34a4c0 > > pmap_remove_all() at pmap_remove_all+0x560/frame 0xfffffe008e34a540 > > Can you obtain the core dump and then backtrace from kgdb? I think I found a place where this occurs. Please try the patch below. commit 6dcffb980fa3026092f79107ee7668918c9f5490 Author: Konstantin Belousov Date: Tue Oct 1 14:45:23 2024 +0300 hyperv: call smp_targeted_tlb_shootdown_native() with pin Sponsored by: The FreeBSD Foundation MFC after: 1 week diff --git a/sys/dev/hyperv/vmbus/hyperv_mmu.c b/sys/dev/hyperv/vmbus/hyperv_mmu.c index 7c29fe294093..8e982974161c 100644 --- a/sys/dev/hyperv/vmbus/hyperv_mmu.c +++ b/sys/dev/hyperv/vmbus/hyperv_mmu.c @@ -241,7 +241,6 @@ hv_vm_tlb_flush(pmap_t pmap, vm_offset_t addr1, vm_offset_t addr2, critical_exit(); return; native: - sched_unpin(); critical_exit(); return smp_targeted_tlb_shootdown_native(pmap, addr1, addr2, curcpu_cb, op);