From owner-freebsd-current@freebsd.org Sun Aug 5 02:47:02 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 13C05105F557 for ; Sun, 5 Aug 2018 02:47:02 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B97C875154 for ; Sun, 5 Aug 2018 02:47:01 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 508301D4DA for ; Sun, 5 Aug 2018 02:47:01 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lj1-f177.google.com with SMTP id j19-v6so7888370ljc.7 for ; Sat, 04 Aug 2018 19:47:01 -0700 (PDT) X-Gm-Message-State: AOUpUlGMcdlHdjtaLeewIG5KgmSLQ7JnAhbOwg6GFQWv/Q48kn55lFFi z5jonY46K9SStjU2oWCbEWN0z1E2OAmMUymKrqM= X-Google-Smtp-Source: AAOMgpd0SF83HcSqaR80v0Bgb0A+CGGGT+LfFWV1PTT9SNYQTubWENYEoLnO9X4+FA71RlEtlBRrCJQnh8bw6kH7CBU= X-Received: by 2002:a2e:1004:: with SMTP id j4-v6mr9639527lje.2.1533437219740; Sat, 04 Aug 2018 19:46:59 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:5742:0:0:0:0:0 with HTTP; Sat, 4 Aug 2018 19:46:39 -0700 (PDT) In-Reply-To: <20180804083720.GJ6049@kib.kiev.ua> References: <20180804083720.GJ6049@kib.kiev.ua> From: Kyle Evans Date: Sat, 4 Aug 2018 21:46:39 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: panic: mutex pmap not owned at ... efirt_machdep.c:255 To: Konstantin Belousov Cc: freebsd-current Current Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.27 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: Sun, 05 Aug 2018 02:47:02 -0000 On Sat, Aug 4, 2018 at 3:37 AM, Konstantin Belousov wrote: > On Fri, Aug 03, 2018 at 11:27:02PM -0500, Kyle Evans wrote: >> On Fri, Aug 3, 2018 at 10:10 PM, Eitan Adler wrote: >> > Hi all, >> > >> > After installing the latest current kernel I get the following panic: >> > >> > panic: mutex pmap not owned at ... efirt_machdep.c:255 >> > cpuid =3 >> > time = 1 >> > ... >> > mtx_assert() >> > efi_arch_enter() >> > efirt_modevents() >> > module_register_init() >> > mi_startup() >> > btext() >> > >> >> This seems odd- pmap lock is acquired at [1], then asserted shortly >> later at [2]... I avoid some of this stuff as well as I can, but is it >> actually possible for PCPU_GET(...) acquired curpmap to not match >> curthread->td_proc->p_vmspace->vm_pmap in this context? >> >> [1] https://svnweb.freebsd.org/base/head/sys/dev/efidev/efirt.c?view=markup#l260 >> [2] https://svnweb.freebsd.org/base/head/sys/amd64/amd64/efirt_machdep.c?view=markup#l254 > There could be that curpcpu not yet synced with proc0 pmap. It could be > fixed. > He now gets a little further, but ends up with the same panic due to efirtc_probe trying to get time to verify the rtc's actually implemented. What kind of approach must we take to ensure curcpu is synced?