From owner-freebsd-stable@FreeBSD.ORG Thu May 9 05:31:07 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 256AEC05 for ; Thu, 9 May 2013 05:31:07 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 876511E10 for ; Thu, 9 May 2013 05:31:06 +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 r495Uu2i083650; Thu, 9 May 2013 08:30:56 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua r495Uu2i083650 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id r495UtHT083647; Thu, 9 May 2013 08:30:55 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 9 May 2013 08:30:55 +0300 From: Konstantin Belousov To: Jim Ohlstein Subject: Re: Apparent regression in r250359 Message-ID: <20130509053055.GM3047@kib.kiev.ua> References: <518A880C.3090906@ohlste.in> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="AA6ket75tXCPafnC" Content-Disposition: inline In-Reply-To: <518A880C.3090906@ohlste.in> 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: freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 May 2013 05:31:07 -0000 --AA6ket75tXCPafnC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 08, 2013 at 01:14:52PM -0400, Jim Ohlstein wrote: > Hello, >=20 > I upgraded my (custom) kernel earlier and found that multiple daemons=20 > (cups, hal, syslog, ntpd, csh) crashed and dumped cores at or shortly=20 > after boot. >=20 > The error I saw several times on the console was: >=20 > set_fpcontext err 22 >=20 > I recompiled using the GENERIC kernel and saw the same error. >=20 >=20 > The error appears to be in the changes made in r250359 in fpu.c, as=20 > r250358 boots as expected. >=20 Quite weird, and the most troublesome part is that I cannot reproduce it locally. As a temporal workaround, you could set 'hw.use_xsave=3D0' at the loader prompt. The instructions below for kgdb assume that=20 you did not applied this workaround. What CPU do you have ? Please show me the verbose dmesg of the boot. Next, please do the following: run 'kgdb /boot/kernel/kernel /dev/mem', and from the kgdb prompt, do 'x/1xw use_xsave' and 'x/1xg xsave_mask'. Also, see below. > # uname -a > FreeBSD lucid-insanity 9.1-STABLE FreeBSD 9.1-STABLE #3 r250358: Wed May= =20 > 8 11:56:43 EDT 2013=20 > root@lucid-insanity:/usr/obj/usr/src/sys/GENERIC amd64 >=20 >=20 > World and kernel are built with clang 3.2. >=20 > r250359 produces the error and core dumps: >=20 > Sample gdb output: >=20 > # gdb cupsd cupsd.core > GNU gdb 6.1.1 [FreeBSD] > Copyright 2004 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and you = are > welcome to change it and/or distribute copies of it under certain=20 > conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for detail= s. > This GDB was configured as "amd64-marcel-freebsd"...(no debugging=20 > symbols found)... > Core was generated by `cupsd'. > Program terminated with signal 10, Bus error. > Reading symbols from /usr/local/lib/libcupsmime.so.1...(no debugging=20 > symbols found)...done. > Loaded symbols for /usr/local/lib/libcupsmime.so.1 > Reading symbols from /lib/libz.so.6...done. > Loaded symbols for /lib/libz.so.6 > Reading symbols from /usr/lib/libssl.so.6...done. > Loaded symbols for /usr/lib/libssl.so.6 > Reading symbols from /lib/libcrypto.so.6...done. > Loaded symbols for /lib/libcrypto.so.6 > Reading symbols from /usr/local/lib/libpaper.so.2...done. > Loaded symbols for /usr/local/lib/libpaper.so.2 > Reading symbols from /usr/local/lib/libcups.so.2...done. > Loaded symbols for /usr/local/lib/libcups.so.2 > Reading symbols from /lib/libcrypt.so.5...done. > Loaded symbols for /lib/libcrypt.so.5 > Reading symbols from /lib/libm.so.5...done. > Loaded symbols for /lib/libm.so.5 > Reading symbols from /usr/local/lib/libiconv.so.3...done. > Loaded symbols for /usr/local/lib/libiconv.so.3 > Reading symbols from /lib/libthr.so.3...done. > Loaded symbols for /lib/libthr.so.3 > Reading symbols from /lib/libc.so.7...done. > Loaded symbols for /lib/libc.so.7 > Reading symbols from /libexec/ld-elf.so.1...done. > Loaded symbols for /libexec/ld-elf.so.1 > #0 0x00007ffffffff1e3 in ?? () > [New Thread 802407400 (LWP 100450/cupsd)] > (gdb) >=20 > # gdb csh csh.core > GNU gdb 6.1.1 [FreeBSD] > Copyright 2004 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and you = are > welcome to change it and/or distribute copies of it under certain=20 > conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for detail= s. > This GDB was configured as "amd64-marcel-freebsd"... > Core was generated by `csh'. > Program terminated with signal 10, Bus error. > Reading symbols from /lib/libncurses.so.8...done. > Loaded symbols for /lib/libncurses.so.8 > Reading symbols from /lib/libcrypt.so.5...done. > Loaded symbols for /lib/libcrypt.so.5 > Reading symbols from /lib/libc.so.7...done. > Loaded symbols for /lib/libc.so.7 > Reading symbols from /usr/local/lib/libiconv.so...done. > Loaded symbols for /usr/local/lib/libiconv.so > Reading symbols from /libexec/ld-elf.so.1...done. > Loaded symbols for /libexec/ld-elf.so.1 > #0 0x00007ffffffff1e3 in ?? () > (gdb) =46rom the core dump above, please do 'info registers' then take the value from %rdi and do 'x/2xg $rdi+0x300', then take the first value printed (let denote it as XSAVEADDR) and do 'x/8xg XSAVEADDR'. >=20 > I can produce more if anyone is interested. >=20 >=20 > --=20 > Jim Ohlstein > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" --AA6ket75tXCPafnC Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBAgAGBQJRizSPAAoJEJDCuSvBvK1BrMsP/27OZamW+XQR/05hg4DXzWB9 34sS25powuy8qvggSjjpBMBhjkmWvTcO7CfhuxgSkJAqQaWGN3BHVnbmSZuSo7o/ cenrC+hZiBGKQxqXstaGOxmYnv8jhVn6nexcBZnDvMPZ1YCTw1ArL0uF9PiJG9xk 1HG20gMDlydgCmj7tqDi7wuqHDKHteyIJmP1UP33+nNi1HAqD6npuVbSG2jEZxfh yvrf3S54oEPRaDUXl9TUNlSey0TGv/omxJgh6zqZuPdk5OENeodWAngZTd74XKTf FRa0iUFqm5KZhLNQMegenaG3FyvNdl2uUb+0MdZ1Ajoqe7XHVWk7lHKaacvWytUg 48+uNHcEdxdEWWiaG00252d6VQ7MfRhKFNlzmoc2lOsHKlKm0YYyhaCcgCKDbdEB hcUT4QCInRrq2s1FPhsVk0On80i0fncSrGIpdsxKBfvqeIxgICWOJD6ELvgIO4sX Jeir/I1Nz7LQD2BgpoRB6pGfjlSVrlkT8f2jb6L++M+3XU4Fa2SXJxrcSqqxUVpm Y6GhJSgWEN8C7NEC8aWUDj/FVdpEhiOtwEhkn9aPrUCB+8KmanAgZTcch5MUnokz /dL2IGiKmJ23tLdo1Y3qFkc25nk7tD59zWA9Yf2e+BtDm3X2DqyrShw6bi8CRMXB DnC3hpHC14tUC5c8d61m =x9n7 -----END PGP SIGNATURE----- --AA6ket75tXCPafnC--