From owner-freebsd-current@FreeBSD.ORG Tue Aug 13 05:31:17 2013 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8EE507F1; Tue, 13 Aug 2013 05:31:17 +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-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0B37428F1; Tue, 13 Aug 2013 05:31:16 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id r7D5TiLI025114; Tue, 13 Aug 2013 08:29:44 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua r7D5TiLI025114 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id r7D5TiQM025113; Tue, 13 Aug 2013 08:29:44 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 13 Aug 2013 08:29:44 +0300 From: Konstantin Belousov To: David Wolfskill Subject: Re: Early drop to debugger with DEBUG_MEMGUARD Message-ID: <20130813052944.GX4972@kib.kiev.ua> References: <20130812151314.GE1570@albert.catwhisker.org> <20130812160154.GF1570@albert.catwhisker.org> <20130812214435.GH1570@albert.catwhisker.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Se0bRJHHDzahbL7F" Content-Disposition: inline In-Reply-To: <20130812214435.GH1570@albert.catwhisker.org> User-Agent: Mutt/1.5.21 (2010-09-15) 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 version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: Davide Italiano , current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 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, 13 Aug 2013 05:31:17 -0000 --Se0bRJHHDzahbL7F Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 12, 2013 at 02:44:35PM -0700, David Wolfskill wrote: > On Mon, Aug 12, 2013 at 09:10:55AM -0700, Davide Italiano wrote: > > ... > > OK, I'm not sure I can make an immediate guess on where's the problem > > now (without access to my main workstation), so I think you need to > > wait tomorrow unless someone beats me to the punch. The best I can say > > is that maybe r254025 is responsible for this. Try to revert and see > > if things work again. > > .... >=20 > I tried backing out r254025, but there had been enough time that other > commits had touched the same files. Ended up backing out r254165, > r254171, r254172, and r254182 as well (which seemed to go OK), but the > result didn't build. >=20 > So I just checked out a new src working copy @r254024, built the world > and kernel cleanly, verified that it booted OK, then updated the src > working copy to r254025, built, booted, and ... BANG! >=20 > Booting... > GDB: no debug ports present > KDB: debugger backends: ddb > KDB: current backend: ddb > Copyright (c) 1992-2013 The FreeBSD Project. > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 > The Regents of the University of California. All rights reserved. > FreeBSD is a registered trademark of The FreeBSD Foundation. > FreeBSD 10.0-CURRENT #3 r254025M/254025:1000041: Mon Aug 12 14:23:48 PDT= 2013 > root@freebeast.catwhisker.org:/common/S3/obj/usr/src/sys/MEMGUARD i386 > FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610 > WARNING: WITNESS option enabled, expect reduced performance. > panic: Assertion strat =3D=3D M_BESTFIT || strat =3D=3D M_FIRSTFIT failed= at /usr/src/sys/kern/subr_vmem.c:1050 > cpuid =3D 0 > KDB: enter: panic > [ thread pid 0 tid 0 ] > Stopped at kdb_enter+0x3d: movl $0,kdb_why > db>=20 >=20 > So I think it's fair to say that r254025 introduced the problem. >=20 > I'll go ahead and use kernel configs without DEBUG_MEMGUARD on head > until this is resolved (or I have an opportunity to test patches > for someone). >=20 > The r254025 environment is on a "spare" slice of the boot drive of > the machine, so I can leave it for now. My more usual (active) > "head" slice is running: >=20 > FreeBSD 10.0-CURRENT #1243 r254245M/254246:1000042: Mon Aug 12 05:39:42 = PDT 2013 root@freebeast.catwhisker.org:/common/S4/obj/usr/src/sys/GENER= IC i386 >=20 > I'll be happy to test either or both. The r254025 indeed introduced the problem, and Davide pointed out you a workaround for the assertion triggering. Proper fix for the memguard requires a policy of M_NEXTFIT or like, to avoid a reuse of the previous allocated range as long as possible. But, you have some further issue even after the assertion was silenced, isn't it ? --Se0bRJHHDzahbL7F Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iQIcBAEBAgAGBQJSCcRHAAoJEJDCuSvBvK1B7ksP/3ZrrWr8wURc3HbHNVhOCZtY vxhDqfOU0rESVOYdVMTUB174HHlXuEMLGcs7KDggJ4aKHPkBnvMupgJFl44GalSb Crw3YqNkwYGvl+yDvAmH2ukTYLfZJdvGhGYHNY0hxqRMptUWRCceP2nZIKCXQ8tK HyWcdtP1KzJc3tCahCad2bTr7cQfYJ4rgEpIfF5KTRKTUxpGoelxi13iTmdFQt8c bfysKgQaGGWH5Vllf4HTh//tfFaKxrxlFM8J5TobOfhuh8mQgy49vjzVT3kAnd/j aG/pI+fpkx0MTZWsjK5LUPhZbIJZ44fwEHcfPvsnsxzIA9ielu1vkSh7e5rl53Sh PCAyvLMHCwXJ+6cZoQleIeIbmd2rF2aNoNlDmKyPHWHfUtIqMX4kbazbw9orYCxl C82OAhrCkQ7uVySeaKjYm7YVbdFAYrQqaD1EvUL0EJ3GXV36dz0vWvk2bKmQgevd 04MW3KsgW8kdlxE4E1jwCJdvdPVhCfjh+5FbfI1VbZYrYUAAymcGrExW/W5Xr4HC YCNX+8gg24vFbXs0z6g5uSz6MZ5ly4Uc/15mhhkIS8MGgKVDQVVytzQOtlDnbup+ KiPpUuyOwytBdTmNiYxUEoL8sRTU6XKt0Fe30kCKXCmIf17b6xLAuQCbAwSPcxHA +4rOvMPXsvSv6DCmmOBB =6sRT -----END PGP SIGNATURE----- --Se0bRJHHDzahbL7F--