From owner-freebsd-current@freebsd.org Tue Sep 12 09:53:44 2017 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 A7A8BE0049D for ; Tue, 12 Sep 2017 09:53:44 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward104j.mail.yandex.net (forward104j.mail.yandex.net [IPv6:2a02:6b8:0:801:2::107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4A1BA6B021; Tue, 12 Sep 2017 09:53:43 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from mxback5j.mail.yandex.net (mxback5j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10e]) by forward104j.mail.yandex.net (Yandex) with ESMTP id C521D429C5; Tue, 12 Sep 2017 12:53:40 +0300 (MSK) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback5j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 1zslgW7TWA-reZqsnq9; Tue, 12 Sep 2017 12:53:40 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1505210020; bh=4SqY07lvKBjQ8ZpbTYK39i9q6FfoPVhSwo3xN0C4EsE=; h=Subject:To:Cc:References:From:Message-ID:Date:In-Reply-To; b=L9/d9szNpsnM7FalAVU5+PLeYwJ28+ZZ2cU9ekHi6+Bo4SWjMqxkyUWxpVlg7jp6P 8aa5gwHjDSSo2iQy5u/zCSAam8PgBs5r0SSzUr8R6HNo4Fwd6q682tHdO1Gx45uSNu WMK5xdh+poZGVpSpEVyE0dnxOjhdfeY3Dej02Xa4= Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id ZNZhhIOsfv-re2asZ7N; Tue, 12 Sep 2017 12:53:40 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1505210020; bh=4SqY07lvKBjQ8ZpbTYK39i9q6FfoPVhSwo3xN0C4EsE=; h=Subject:To:Cc:References:From:Message-ID:Date:In-Reply-To; b=L9/d9szNpsnM7FalAVU5+PLeYwJ28+ZZ2cU9ekHi6+Bo4SWjMqxkyUWxpVlg7jp6P 8aa5gwHjDSSo2iQy5u/zCSAam8PgBs5r0SSzUr8R6HNo4Fwd6q682tHdO1Gx45uSNu WMK5xdh+poZGVpSpEVyE0dnxOjhdfeY3Dej02Xa4= Authentication-Results: smtp1j.mail.yandex.net; dkim=pass header.i=@yandex.ru Subject: Re: r323412: Panic on boot (slab->us_keg == keg) To: Mark Johnston Cc: Raphael Kubo da Costa , freebsd-current@FreeBSD.org, cem@FreeBSD.org References: <86vakp1vsq.fsf@orwell> <8ccad12b-3d31-6478-7884-c003bc314990@yandex.ru> <20170912033523.GA89424@wkstn-mjohnston.west.isilon.com> From: "Andrey V. Elsukov" Openpgp: id=E6591E1B41DA1516F0C9BC0001C5EA0410C8A17A Message-ID: Date: Tue, 12 Sep 2017 12:49:40 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170912033523.GA89424@wkstn-mjohnston.west.isilon.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="G5V9vbTI34htHxukuqKoFK7ajU0sREctu" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 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, 12 Sep 2017 09:53:44 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --G5V9vbTI34htHxukuqKoFK7ajU0sREctu Content-Type: multipart/mixed; boundary="Bw8kjKHhLbttQXDWuqmtJMXTPcff9vOrB"; protected-headers="v1" From: "Andrey V. Elsukov" To: Mark Johnston Cc: Raphael Kubo da Costa , freebsd-current@FreeBSD.org, cem@FreeBSD.org Message-ID: Subject: Re: r323412: Panic on boot (slab->us_keg == keg) References: <86vakp1vsq.fsf@orwell> <8ccad12b-3d31-6478-7884-c003bc314990@yandex.ru> <20170912033523.GA89424@wkstn-mjohnston.west.isilon.com> In-Reply-To: <20170912033523.GA89424@wkstn-mjohnston.west.isilon.com> --Bw8kjKHhLbttQXDWuqmtJMXTPcff9vOrB Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 12.09.2017 06:35, Mark Johnston wrote: >> [...] >> FreeBSD/SMP: 2 package(s) x 14 core(s) x 2 hardware threads >> >> Also I determined that it can successfully boot with disabled >> hyper-threading. >=20 > After the change to CACHE_LINE_SIZE, we have > sizeof(struct uma_zone) =3D=3D 448 and sizeof(struct uma_cache) =3D=3D = 64. With > 56 CPUs, we therefore need 4032 bytes per UMA zone, plus 80 bytes for > the slab header - "internal" zones always keep the slab header in the > slab itself. That's slightly larger than one page, but the UMA zone > zone's keg will have uk_ppera =3D=3D 1. So, when allocating slabzone, > keg_alloc_slab() will call startup_alloc(uk_ppera * PAGE_SIZE), which > will allocate 4096 bytes for a structure that is 4032 + 80 =3D 4112 byt= es > in size. >=20 > I think the bug is that keg_large_init() doesn't take > sizeof(struct uma_slab) into account when setting uk_ppera for the keg.= > In particular, the bug isn't specific to the bootup process; it only > affects internal zones with an item size in the range [4016, 4096]. >=20 > The patch below should fix this - could you give it a try? Hi Mark, I can confirm that it fixes this panic. Thanks! --=20 WBR, Andrey V. Elsukov --Bw8kjKHhLbttQXDWuqmtJMXTPcff9vOrB-- --G5V9vbTI34htHxukuqKoFK7ajU0sREctu Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAlm3rbUACgkQAcXqBBDI oXo6dAgAvGvwI4gHA0L+tgpcoyrZvecoG/0O8y3czubmKy4tLre+Qz2mDwfB3kHP H7Iz3sJOfSeEREHSPvfhxY3zKwFj+sMvRhY4cdfXg/HPo+eLh3EZFK1fR18Y/2Vu goi1UNiB/ujvTpmdUUDTeebUyKjH99dqb/u7bXHPgvXmxtYhAlQg45WTibYBhfzp LBl2hsumA/PZ68FU+0FV2u9u24OaO5Hgxk5wXfWf/1OFUKNziYe7XQI7tXL7vPsV nycHNEe7zkJXBFv5h8hD17vL/ZN+F4dzShYgwnz66G2//O/0pYuHetn/sBK7Jtcj xHzVOb/HIJTNo8Qp4iYwED/5wX1bcg== =6Z7G -----END PGP SIGNATURE----- --G5V9vbTI34htHxukuqKoFK7ajU0sREctu--