From owner-freebsd-current@freebsd.org Tue Oct 20 16:30:11 2020 Return-Path: Delivered-To: freebsd-current@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 29BF44352A7; Tue, 20 Oct 2020 16:30:11 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) (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 "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CFzcf10Vhz4TkS; Tue, 20 Oct 2020 16:30:09 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-io1-xd41.google.com with SMTP id r9so1933133ioo.7; Tue, 20 Oct 2020 09:30:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=n9/mLNibkRyMFgkmn75fuNTABv/TFuMTIt4AZ2tHrQ4=; b=BotXb+nx8O/EaGte9bD3dFgGc1WDuZ9QLXwc7AQe6i3I0Qj/V0D0MFdyd/b9MskYjz qqBpCuvJ/fnv7zuz2wbTeEbjr2A7eA1wHZQQ6MEJ0LdXKYHfHnurwiBQFPEeEAFbOSVT 6doKdq/KJA8EHluaS2t4dxX7xeq+jWRqheQfVWoFJYZ+6ONGaSxWq/omMeqPwULmhiHt IbkNK6wVC4IPe0MgyLmBeLo2eASyvcrDMs2eh8zF7ppiNoczkuiDYbO4C0ASQmDEcfY1 XW3f4s1jynl4M5ESY8J8SbPP38N97Kgdbu0+J/DM9wpPtLgfhpgtBGdJvhLQ4u+KqjuW rZIQ== X-Gm-Message-State: AOAM532GeowNsd2Hyc7Tx8sJBIPDTIY3xi3IFoWrtUgwLCIeaTbCrv87 Ha2YQwMkvIFj+NAvPULLtx0oCBNZkp0= X-Google-Smtp-Source: ABdhPJzWFds/A+ilvfq2sewINcMpgTHv9wKTe3dKeOrLgNDI5K2OuO3dhJzBMBeKdCt1+QmY4KUpgw== X-Received: by 2002:a02:1349:: with SMTP id 70mr2835627jaz.130.1603211408493; Tue, 20 Oct 2020 09:30:08 -0700 (PDT) Received: from raichu (toroon0560w-lp130-01-174-88-77-103.dsl.bell.ca. [174.88.77.103]) by smtp.gmail.com with ESMTPSA id c9sm1951131iob.14.2020.10.20.09.30.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Oct 2020 09:30:07 -0700 (PDT) Sender: Mark Johnston Date: Tue, 20 Oct 2020 12:30:05 -0400 From: Mark Johnston To: bob prohaska Cc: mmel@freebsd.org, freebsd-current@freebsd.org, freebsd-arm@freebsd.org Subject: Re: panic: non-current pmap 0xffffa00020eab8f0 on Rpi3 Message-ID: <20201020163005.GD46122@raichu> References: <20201006021029.GA13260@www.zefox.net> <20201006133743.GA96285@raichu> <20201019203954.GC46122@raichu> <20201019230909.GA66675@www.zefox.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201019230909.GA66675@www.zefox.net> X-Rspamd-Queue-Id: 4CFzcf10Vhz4TkS X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.31 / 15.00]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MIME_GOOD(-0.10)[text/plain]; MID_RHS_NOT_FQDN(0.50)[]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-1.02)[-1.018]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; NEURAL_HAM_SHORT(-0.58)[-0.578]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::d41:from]; NEURAL_HAM_MEDIUM(-1.02)[-1.015]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; MAILMAN_DEST(0.00)[freebsd-current,freebsd-arm] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.33 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 Oct 2020 16:30:11 -0000 On Mon, Oct 19, 2020 at 04:09:09PM -0700, bob prohaska wrote: > On Mon, Oct 19, 2020 at 04:39:54PM -0400, Mark Johnston wrote: > > > > I think vmspace_exit() should issue a release fence with the cmpset and > > an acquire fence when handling the refcnt == 1 case, but I don't see why > > that would make a difference here. So, if you can test a debug patch, > > this one will yield a bit more debug info. If you can provide access to > > a vmcore and kernel debug symbols, that'd be even better. > > > > I haven't seen an invalid pmap panic since the report of October 5th. > Your patch applied cleanly on the Pi3 running HEAD at r366780M, > the M being due to patches supplied by Kyle Evans applied to > M sys/arm/broadcom/bcm2835/bcm2835_mbox.c > M sys/arm/broadcom/bcm2835/bcm2835_sdhci.c > M sys/arm/broadcom/bcm2835/bcm2835_vcbus.c > M sys/arm/broadcom/bcm2835/bcm2835_vcbus.h > > AIUI, they're something to do with DMA for peripherals. They've > caused no obvious trouble, if you anticipate conflicts let me know > and I'll remove them There should be no need to remove them. > I've never seen either a vmcore file or debug symbols on this machine. > A sequence of instructions to generate the data needed would be helpful. I set up a RPi3 to try and repro this and have so far managed to trigger it once using Peter Holm's stress2 suite, so I'll keep investigating. I hadn't configured a dump device, but I was able to confirm from DDB that PCPU_GET(curpmap) == &vmspace0->vm_pmap. For future reference, https://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug.html has some info on configuring a dump device. For the RPi I'm just using a USB stick as the dump device. > Thanks for reading! > > bob prohaska >