On Wed, May 08, 2013 at 01:14:52PM -0400, Jim Ohlstein
wrote:> Hello,
>
> I upgraded my (custom) kernel earlier and found that multiple daemons
> (cups, hal, syslog, ntpd, csh) crashed and dumped cores at or shortly
> after boot.
>
> The error I saw several times on the console was:
>
> set_fpcontext err 22
>
> I recompiled using the GENERIC kernel and saw the same error.
>
>
> The error appears to be in the changes made in r250359 in fpu.c, as
> r250358 boots as expected.
>
Quite weird, and the most troublesome part is that I cannot reproduce
it locally. As a temporal workaround, you could set 'hw.use_xsave=0'
at the loader prompt. The instructions below for kgdb assume that
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
> 8 11:56:43 EDT 2013
> root at lucid-insanity:/usr/obj/usr/src/sys/GENERIC amd64
>
>
> World and kernel are built with clang 3.2.
>
> r250359 produces the error and core dumps:
>
> Sample gdb output:
>
> # 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
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty"
for details.
> This GDB was configured as "amd64-marcel-freebsd"...(no debugging
> 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
> 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)
>
> # 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
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty"
for details.
> 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)
From 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'.
>
> I can produce more if anyone is interested.
>
>
> --
> Jim Ohlstein
> _______________________________________________
> freebsd-stable at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscribe at
freebsd.org"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL:
<http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20130509/b812513a/attachment.sig>