From owner-freebsd-arm@freebsd.org Sun Jun 3 12:17:26 2018 Return-Path: Delivered-To: freebsd-arm@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 16152F73789 for ; Sun, 3 Jun 2018 12:17:26 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83E0B81FAE for ; Sun, 3 Jun 2018 12:17:25 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTP id w53CHD2v035737; Sun, 3 Jun 2018 15:17:16 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w53CHD2v035737 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w53CHCZZ035731; Sun, 3 Jun 2018 15:17:12 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 3 Jun 2018 15:17:12 +0300 From: Konstantin Belousov To: Ronald Klop Cc: Warner Losh , freebsd-arm@freebsd.org Subject: Re: panic: Assertion td->td_lock == TDQ_LOCKPTR(tdq) failed at /usr/src/sys/kern/sched_ule.c:2137 Message-ID: <20180603121712.GL3789@kib.kiev.ua> References: <20180601154153.GA62632@www.zefox.net> <20180602091606.63a1ab37.freebsd.ed.lists@sumeritec.com> <20180602150549.GA68197@www.zefox.net> <20180602193255.GA68908@www.zefox.net> <20180602210450.GK3789@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.0 (2018-05-17) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jun 2018 12:17:26 -0000 On Sun, Jun 03, 2018 at 08:30:51AM +0200, Ronald Klop wrote: > On Sat, 02 Jun 2018 23:04:50 +0200, Konstantin Belousov > wrote: > > > On Sat, Jun 02, 2018 at 02:39:00PM -0600, Warner Losh wrote: > >> On Sat, Jun 2, 2018, 1:32 PM bob prohaska wrote: > >> > >> > On Sat, Jun 02, 2018 at 09:14:18AM -0600, Warner Losh wrote: > >> > > > >> > > Do you have r334508? It fixes the OOM falsely triggering. > >> > > > >> > At the moment sources are at 334456, world and kernel are at > >> > 334276. > >> > > >> > Might it be feasible to stop the present buildworld, update > >> > sources and then try to build a new kernel before building > >> > world? > >> > > >> > >> That's recent enough that you should be fine. There might be an lld vs > >> binutils ld issue. There was on i386 recently, but I think it was i386 > >> specific. It's a good risk. > > > > This happens on arm64 ? In fact, try this. > > I did not even compiled the change. > > > > diff --git a/sys/arm64/arm64/swtch.S b/sys/arm64/arm64/swtch.S > > index c9843303b1d..4c2c3aca583 100644 > > --- a/sys/arm64/arm64/swtch.S > > +++ b/sys/arm64/arm64/swtch.S > > @@ -165,10 +165,9 @@ ENTRY(cpu_switch) > > mov x0, x19 > > /* > > - * Release the old thread. This doesn't need to be a store-release > > - * as the above dsb instruction will provide release semantics. > > + * Release the old thread. > > */ > > - str x2, [x0, #TD_LOCK] > > + stlr x2, [x0, #TD_LOCK] > > #if defined(SCHED_ULE) && defined(SMP) > > /* Spin if TD_LOCK points to a blocked_lock */ > > ldr x2, =_C_LABEL(blocked_lock) > > > > Thanks, I will try. Is this patch for the TDQ_LOCKPTR assert in the > subject? Or for the OOM message which hijacked this thread a little bit? > As a data point: my RPI3 paniced again on the TDQ_LOCKPTR this night. For TDQ_LOCKPTR issue.