From owner-freebsd-current@freebsd.org Mon Nov 23 22:07:27 2015 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22656A365E2 for ; Mon, 23 Nov 2015 22:07:27 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 05C691ABD for ; Mon, 23 Nov 2015 22:07:27 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 0165FA365E1; Mon, 23 Nov 2015 22:07:27 +0000 (UTC) Delivered-To: current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0104EA365E0 for ; Mon, 23 Nov 2015 22:07:27 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 713461ABA; Mon, 23 Nov 2015 22:07:26 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id tANM7God010727 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 24 Nov 2015 00:07:16 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua tANM7God010727 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id tANM7Gtv010726; Tue, 24 Nov 2015 00:07:16 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 24 Nov 2015 00:07:16 +0200 From: Konstantin Belousov To: Bryan Drewery Cc: Ed Maste , David Wolfskill , "current@freebsd.org" Subject: Re: Panic: GPF in kernel mode in fork_exit() (prior to FS mouont) Message-ID: <20151123220716.GD58629@kib.kiev.ua> References: <20151123132320.GJ1119@albert.catwhisker.org> <20151123133317.GA58629@kib.kiev.ua> <5653678F.3040800@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5653678F.3040800@FreeBSD.org> User-Agent: Mutt/1.5.24 (2015-08-30) 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-current@freebsd.org X-Mailman-Version: 2.1.20 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: Mon, 23 Nov 2015 22:07:27 -0000 On Mon, Nov 23, 2015 at 11:22:55AM -0800, Bryan Drewery wrote: > On 11/23/2015 9:58 AM, Ed Maste wrote: > > On 23 November 2015 at 08:33, Konstantin Belousov wrote: > >> > >> The revision 291171 changed layout of the dereferenced structure > >> sysentvec. Was your kernel build clean, or did you used -DNO_CLEAN or > >> similar option ? If yes, remove the kernel build directory and start > >> from scratch. > > > > Every time removing the build directory and starting from scratch > > fixes an issue like this it's demonstrated a bug in our build's > > dependency tracking. Starting over is a fine workaround to make > > progress, but I'd also like to try to extract sufficient detail when > > this happens so that we can fix these cases. > > My guess is that some files are missing proper dependencies on sysent.h. Probably yes. > > For example these 2 would not rebuild. I think any consumers of these > headers which dereferenced the struct pointers would need to include > sys/sysent.h, but that this still may lead to a broken situation somewhere. > > sys/sys/imgact.h:struct sysentvec; > sys/sys/ktrace.h:struct sysentvec; > Why would headers need a rebuild, what does it mean for header anyway ? Indeed, any code which dereferences the structure or otherwise depends on its layout, have to include sys/sysent.h to get the full definition, otherwise compiler cannot generate code. In other words, the problem cannot be in the source, it is somewhere in the build system.