From owner-freebsd-current@freebsd.org Mon Nov 23 13:33:33 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 A6323A34EE4 for ; Mon, 23 Nov 2015 13:33:33 +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 8BEEB1F97 for ; Mon, 23 Nov 2015 13:33:33 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 88EC2A34EE3; Mon, 23 Nov 2015 13:33:33 +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 6F463A34EE2 for ; Mon, 23 Nov 2015 13:33:33 +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 1BADE1F95 for ; Mon, 23 Nov 2015 13:33:32 +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 tANDXIJM081111 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 23 Nov 2015 15:33:18 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua tANDXIJM081111 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id tANDXHxl081110; Mon, 23 Nov 2015 15:33:17 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 23 Nov 2015 15:33:17 +0200 From: Konstantin Belousov To: David Wolfskill , current@freebsd.org Subject: Re: Panic: GPF in kernel mode in fork_exit() (prior to FS mouont) Message-ID: <20151123133317.GA58629@kib.kiev.ua> References: <20151123132320.GJ1119@albert.catwhisker.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151123132320.GJ1119@albert.catwhisker.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 13:33:33 -0000 On Mon, Nov 23, 2015 at 05:23:20AM -0800, David Wolfskill wrote: > This was the "smoke test" boot after building: > > FreeBSD 11.0-CURRENT FreeBSD 11.0-CURRENT #253 r291193M/291193:1100090: Mon Nov 23 04:43:34 PST 2015 root@g1-252.catwhisker.org:/common/S4/obj/usr/src/sys/CANARY amd64 > > and (as noted), it happened fairly early in the boot sequence -- > before the file systems were mounted, but after the device probes. > > It also affected my build machine (same source revision) the same way. > > The most recent successful head built & booted on the machine was: > > FreeBSD g1-252.catwhisker.org 11.0-CURRENT FreeBSD 11.0-CURRENT #252 r291159M/291159:1100090: Sun Nov 22 05:16:34 PST 2015 root@localhost:/common/S4/obj/usr/src/sys/CANARY amd64 > > > I was able to capture a crash dump (by issuing "panic" at the "db> > " prompt); I've copied the vmcore.8 & core.txt.8 to > . Here's an excerpt from > the core.txt.8: > > ... > SMP: passed TSC synchronization test > TSC timecounter discards lower 1 bit(s) > Timecounter "TSC-low" frequency 1396804168 Hz quality 1000 > WARNING: WITNESS option enabled, expect reduced performance. > WARNING: DIAGNOSTIC option enabled, expect reduced performance. > Expensive timeout(9) function: 0xffffffff808830d0(0xffffffff81761898) 0.004704835 s > battery0: battery initialization done, tried 1 times > GEOM: new disk cd0 > GEOM_PART: partition 1 on (diskid/DISK-W200TLZD, MBR) is not aligned on 4096 bytes > GEOM_PART: partition 2 on (diskid/DISK-W200TLZD, MBR) is not aligned on 4096 bytes > GEOM_PART: partition 3 on (diskid/DISK-W200TLZD, MBR) is not aligned on 4096 bytes > start_init: trying /sbin/init > > > Fatal trap 9: general protection fault while in kernel mode > cpuid = 6; apic id = 06 > instruction pointer = 0x20:0xffffffff809b049e > stack pointer = 0x28:0xfffffe06015a2a70 > frame pointer = 0x28:0xfffffe06015a2ab0 > code segment = base 0x0, limit 0xfffff, type 0x1b > = DPL 0, pres 1, long 1, def32 0, gran 1 > processor eflags = interrupt enabled, resume, IOPL = 0 > current process = 1 (init) > Uptime: 3s > .... > > I'm happy to test possible fixes. The source line which paniced is kern_fork.c:1025, according to the kgdb backtrace. The corresponding fragment is if (p->p_sysent->sv_schedtail != NULL) (p->p_sysent->sv_schedtail)(td); 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.