[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#761175: marked as done (kfreebsd i386 changing x87 precision mode in pthreads)



Your message dated Sat, 13 Sep 2014 05:34:35 +0000
with message-id <E1XSfyl-0004OD-9y@franck.debian.org>
and subject line Bug#761175: fixed in glibc 2.19-11
has caused the Debian Bug report #761175,
regarding kfreebsd i386 changing x87 precision mode in pthreads
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
761175: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=761175
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: libc0.1
Version: 2.13-38+deb7u2
X-Debbugs-CC: jtaylor.debian@googlemail.com , debian-bsd@lists.debian.org

On Sat, 6 Sep 2014, Julian Taylor wrote:
I encountered a weird issue on kfreebsd i386 using pthreads. It seems to
change the x87 fpu precision mode (bits 8 and 9 of the control word) in
threads compared to the master. In the master its set to extended
precision, in child threads it changes to double precision. This breaks
equality of e.g. python-numpy's threaded and serial random number generator.

Is this expected? it doesn't happen on linux i386.

The thread started in kernel have different default precision
in FreeBSD compared to Linux.

The initial value of precision is set-up before main() starts,
but not in each thread.

We should think about how it should be fixed.
The new thread should either inherit FPU control word from parent, or it should be created with the same value as original main().

Julian, please, could you verify behaviour of linux-i386 ?

Hint:

typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__HI__)));
#define _FPU_GETCW(cw) __asm__ __volatile__ ("fnstcw %0" : "=m" (*&cw))
#define _FPU_SETCW(cw) __asm__ __volatile__ ("fldcw %0" : : "m" (*&cw))

test with values 0x037f, 0x027f, 0x007f

To reproduce use this simple file and gdb on fischer.debian.org:

$ cat test.c
#include <pthread.h>
#include <stdio.h>

void *thread_fun(void *x_void_ptr)
{
   printf("thread\n");
   return NULL;
}

int main()
{
   pthread_t thread;

   if(pthread_create(&thread, NULL, thread_fun, NULL)) {
       fprintf(stderr, "Error creating thread\n");
       return 1;
   }
   if(pthread_join(thread, NULL)) {
       fprintf(stderr, "Error joining thread\n");
       return 2;
   }
   return 0;

}

$ gcc test.c -g -pthreads

$ gdb ./a.out

(gdb) break main
Breakpoint 1 at 0x8048589: file test.c, line 14.
(gdb) break thread_fun
Breakpoint 2 at 0x8048561: file test.c, line 6.
(gdb) r
Starting program: /home/jtaylor/a.out

Breakpoint 1, main () at test.c:14
14          if(pthread_create(&thread, NULL, thread_fun, NULL)) {
(gdb) p $fctrl
$1 = 4991
(gdb) c
Continuing.

Breakpoint 2, thread_fun (x_void_ptr=0x0) at test.c:6
6           printf("thread\n");
(gdb) p $fctrl
$2 = 4735

--- End Message ---
--- Begin Message ---
Source: glibc
Source-Version: 2.19-11

We believe that the bug you reported is fixed in the latest version of
glibc, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 761175@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Aurelien Jarno <aurel32@debian.org> (supplier of updated glibc package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Fri, 12 Sep 2014 23:49:50 +0200
Source: glibc
Binary: libc-bin libc-dev-bin glibc-doc glibc-source locales locales-all nscd multiarch-support libc6 libc6-dev libc6-dbg libc6-prof libc6-pic libc6-udeb libc6.1 libc6.1-dev libc6.1-dbg libc6.1-prof libc6.1-pic libc6.1-udeb libc0.3 libc0.3-dev libc0.3-dbg libc0.3-prof libc0.3-pic libc0.3-udeb libc0.1 libc0.1-dev libc0.1-dbg libc0.1-prof libc0.1-pic libc0.1-udeb libc6-i386 libc6-dev-i386 libc6-sparc libc6-dev-sparc libc6-sparc64 libc6-dev-sparc64 libc6-s390 libc6-dev-s390 libc6-amd64 libc6-dev-amd64 libc6-powerpc libc6-dev-powerpc libc6-ppc64 libc6-dev-ppc64 libc6-mips32 libc6-dev-mips32 libc6-mipsn32 libc6-dev-mipsn32 libc6-mips64 libc6-dev-mips64 libc0.1-i386 libc0.1-dev-i386 libc6-x32 libc6-dev-x32 libc6-i686 libc6-xen libc0.1-i686 libc0.3-i686 libc0.3-xen libc6.1-alphaev67 libc6-loongson2f libnss-dns-udeb libnss-files-udeb
Architecture: source all amd64
Version: 2.19-11
Distribution: unstable
Urgency: medium
Maintainer: Aurelien Jarno <aurel32@debian.org>
Changed-By: Aurelien Jarno <aurel32@debian.org>
Description:
 glibc-doc  - GNU C Library: Documentation
 glibc-source - GNU C Library: sources
 libc-bin   - GNU C Library: Binaries
 libc-dev-bin - GNU C Library: Development binaries
 libc0.1    - GNU C Library: Shared libraries
 libc0.1-dbg - GNU C Library: detached debugging symbols
 libc0.1-dev - GNU C Library: Development Libraries and Header Files
 libc0.1-dev-i386 - GNU C Library: 32bit development libraries for AMD64
 libc0.1-i386 - GNU C Library: 32bit shared libraries for AMD64
 libc0.1-i686 - GNU C Library: Shared libraries [i686 optimized]
 libc0.1-pic - GNU C Library: PIC archive library
 libc0.1-prof - GNU C Library: Profiling Libraries
 libc0.1-udeb - GNU C Library: Shared libraries - udeb (udeb)
 libc0.3    - GNU C Library: Shared libraries
 libc0.3-dbg - GNU C Library: detached debugging symbols
 libc0.3-dev - GNU C Library: Development Libraries and Header Files
 libc0.3-i686 - GNU C Library: Shared libraries [i686 optimized]
 libc0.3-pic - GNU C Library: PIC archive library
 libc0.3-prof - GNU C Library: Profiling Libraries
 libc0.3-udeb - GNU C Library: Shared libraries - udeb (udeb)
 libc0.3-xen - GNU C Library: Shared libraries [Xen version]
 libc6      - GNU C Library: Shared libraries
 libc6-amd64 - GNU C Library: 64bit Shared libraries for AMD64
 libc6-dbg  - GNU C Library: detached debugging symbols
 libc6-dev  - GNU C Library: Development Libraries and Header Files
 libc6-dev-amd64 - GNU C Library: 64bit Development Libraries for AMD64
 libc6-dev-i386 - GNU C Library: 32-bit development libraries for AMD64
 libc6-dev-mips32 - GNU C Library: o32 Development Libraries for MIPS
 libc6-dev-mips64 - GNU C Library: 64bit Development Libraries for MIPS64
 libc6-dev-mipsn32 - GNU C Library: n32 Development Libraries for MIPS64
 libc6-dev-powerpc - GNU C Library: 32bit powerpc development libraries for ppc64
 libc6-dev-ppc64 - GNU C Library: 64bit Development Libraries for PowerPC64
 libc6-dev-s390 - GNU C Library: 32bit Development Libraries for IBM zSeries
 libc6-dev-sparc - GNU C Library: 32bit Development Libraries for SPARC
 libc6-dev-sparc64 - GNU C Library: 64bit Development Libraries for UltraSPARC
 libc6-dev-x32 - GNU C Library: X32 ABI Development Libraries for AMD64
 libc6-i386 - GNU C Library: 32-bit shared libraries for AMD64
 libc6-i686 - GNU C Library: Shared libraries [i686 optimized]
 libc6-loongson2f - GNU C Library: Shared libraries (Loongson 2F optimized)
 libc6-mips32 - GNU C Library: o32 Shared libraries for MIPS
 libc6-mips64 - GNU C Library: 64bit Shared libraries for MIPS64
 libc6-mipsn32 - GNU C Library: n32 Shared libraries for MIPS64
 libc6-pic  - GNU C Library: PIC archive library
 libc6-powerpc - GNU C Library: 32bit powerpc shared libraries for ppc64
 libc6-ppc64 - GNU C Library: 64bit Shared libraries for PowerPC64
 libc6-prof - GNU C Library: Profiling Libraries
 libc6-s390 - GNU C Library: 32bit Shared libraries for IBM zSeries
 libc6-sparc - GNU C Library: 32bit Shared libraries for SPARC
 libc6-sparc64 - GNU C Library: 64bit Shared libraries for UltraSPARC
 libc6-udeb - GNU C Library: Shared libraries - udeb (udeb)
 libc6-x32  - GNU C Library: X32 ABI Shared libraries for AMD64
 libc6-xen  - GNU C Library: Shared libraries [Xen version]
 libc6.1    - GNU C Library: Shared libraries
 libc6.1-alphaev67 - GNU C Library: Shared libraries (EV67 optimized)
 libc6.1-dbg - GNU C Library: detached debugging symbols
 libc6.1-dev - GNU C Library: Development Libraries and Header Files
 libc6.1-pic - GNU C Library: PIC archive library
 libc6.1-prof - GNU C Library: Profiling Libraries
 libc6.1-udeb - GNU C Library: Shared libraries - udeb (udeb)
 libnss-dns-udeb - GNU C Library: NSS helper for DNS - udeb (udeb)
 libnss-files-udeb - GNU C Library: NSS helper for files - udeb (udeb)
 locales    - GNU C Library: National Language (locale) data [support]
 locales-all - GNU C Library: Precompiled locale data
 multiarch-support - Transitional package to ensure multiarch compatibility
 nscd       - GNU C Library: Name Service Cache Daemon
Closes: 759495 759568 760076 760092 761175
Changes:
 glibc (2.19-11) unstable; urgency=medium
 .
   [ Samuel Thibault ]
   * patches/hurd-i386/tg-thread-cancel.diff: Update patch against two other
     overzealous assertions.
   * patches/hurd-i386/submitted-bind_umask.diff: Split into cvs-bind_umask.diff
     and submitted-bind_umask2.diff as requested by upstream.
   * patches/hurd-i386/cvs-fork_ss_hang.diff: New patch which fixes some dash
     hangs.
   * patches/hurd-i386/cvs-libpthread_guardsize.diff: Add another guard size
     computation fix.  Fixes gcj's boehm-gc.  Closes: #760076.
 .
   [ Aurelien Jarno ]
   * debian/control.in/main: Build-Depends on dpkg (>= 1.17.11) instead of
     dpkg-dev (>= 1.17.1).  Closes: #759495.
   * debian/debhelper.in/libc.{preinst,postinst,postrm}: correctly remove old
     conffiles /etc/ld.so.conf.d/i486-{kfreebsd-gnu.conf,gnu-gnu.conf,gnu.conf}.
     Closes: #759568.
   * Update Italian debconf translation, by Luca Monducci.  Closes: #760092.
 .
   [ Petr Salinger ]
   * kfreebsd/local-fbtl.diff: update to revision 5520 (from glibc-bsd).
     Fixes x87 precision mode in newly created pthreads. Closes: #761175.
Checksums-Sha1:
 293c19fca0916cb0b1ac97aa75fdffd7a503bc25 8645 glibc_2.19-11.dsc
 38b300d805cd2c373fae69d8e9d0fba835ceb680 1002540 glibc_2.19-11.debian.tar.xz
 8bdbbb11cdfa16c5e223cbb31dfb81d2428aeab6 2261684 glibc-doc_2.19-11_all.deb
 f0ed2834aa4c99b89330afa0287b2d10f653d8b4 14144574 glibc-source_2.19-11_all.deb
 6ea6bc043005c1107fe7ea5227d091970cf7ea74 3956686 locales_2.19-11_all.deb
 0e9093068f90416c1c6962c7c01642574ef037ca 4817464 libc6_2.19-11_amd64.deb
 b8733a47b518447abc8bc2b6abd0ccc5ebea6789 1999272 libc6-dev_2.19-11_amd64.deb
 5269e68b90475897addb76de0da461441a2ffd4d 1471542 libc6-pic_2.19-11_amd64.deb
 c90c4b1e23adcece6b6a970b6b4f05d643169956 1282854 libc-bin_2.19-11_amd64.deb
 7a8e5773f432151dfe7df95f341e75fb757cfdab 236414 libc-dev-bin_2.19-11_amd64.deb
 3c9a34b97ef0975168365d6153681516e8e8bb6c 176362 multiarch-support_2.19-11_amd64.deb
 b4730566ace4003bbef066ceab8f73310993c690 1609972 libc6-prof_2.19-11_amd64.deb
 4eb9fe62ebefa0ea952e9138555d424ef7da957b 3521580 locales-all_2.19-11_amd64.deb
 7f2fddf7c62de7ce636e344933732ff933a13166 2376048 libc6-i386_2.19-11_amd64.deb
 336e11720a85434bee209d1935a1675a7c754245 1314884 libc6-dev-i386_2.19-11_amd64.deb
 a93a3edcd4aa83568dd14a59be57bc63085dce0f 2593936 libc6-x32_2.19-11_amd64.deb
 dfda6df4f70d13e860fe725d4094eeda16b2be97 1582274 libc6-dev-x32_2.19-11_amd64.deb
 941f8df095170f14a9d243a0b358c1da6d62c1b8 239926 nscd_2.19-11_amd64.deb
 6a1cb9b85b20fbb31bb1678dcd4c32fbd7ad5f74 3429364 libc6-dbg_2.19-11_amd64.deb
 d019e0ded385945e2a9a6fe0bae4631f5d38afe8 1057602 libc6-udeb_2.19-11_amd64.udeb
 40dd2bb77817bfdef2f53647aecdeb357bc33ef1 10040 libnss-dns-udeb_2.19-11_amd64.udeb
 57d78d438ee8135de1308a2d30d72923f43c3a5b 16426 libnss-files-udeb_2.19-11_amd64.udeb
Checksums-Sha256:
 b3a25757bda12cdd3feff8050c014c0ec1915e90a4c92ddde1c023312164c515 8645 glibc_2.19-11.dsc
 e3b6bf0da3ca06fb91ec2207b13800e87c3d5878c809bb9c7f356db0ae052ea2 1002540 glibc_2.19-11.debian.tar.xz
 f3f162c5b0b786cd38897acba8d8362f6901e9611357b34c0acd7ecd2a2dc7af 2261684 glibc-doc_2.19-11_all.deb
 54f3e6c73328685f7038b1453bee1599c45a34cd5cc972b7aa4d38d3f08cf2c3 14144574 glibc-source_2.19-11_all.deb
 13554f4e3b1d0a468cd1fd545ab6186359561f4bc655278d8b64b31c917388c5 3956686 locales_2.19-11_all.deb
 4dc375b7df3562e61412b963bf11122154303592bca396dea6a69c0c53a6362a 4817464 libc6_2.19-11_amd64.deb
 80cf2321761c90b33811067d9a63b5db7324745c07f16c85108905a3282f1228 1999272 libc6-dev_2.19-11_amd64.deb
 29d3ac93c8381e59d749de2374b19a1edd397e8e8511bc153716393b594b37b8 1471542 libc6-pic_2.19-11_amd64.deb
 38d5c4b641577168b3222242eb2d17258273a1b2a2c6b4cf3be42580980570a6 1282854 libc-bin_2.19-11_amd64.deb
 cf2b8a054b08be9c8e6c6ac871e7b9afa2a03189fb48bf599c95001ee7d8b6f5 236414 libc-dev-bin_2.19-11_amd64.deb
 acf7171f0a35a32eee581c551678721aa497b8d0f4aae47632e268de39839073 176362 multiarch-support_2.19-11_amd64.deb
 3bcb7204cd212c715ad1c7b18041703c38dd7daa1dc6f7d01c90e2174c0c2db7 1609972 libc6-prof_2.19-11_amd64.deb
 17235ab6f6b8a9fcd1bac5310495342c63ace7d52da4fa9f82c2490074e9b45a 3521580 locales-all_2.19-11_amd64.deb
 6cf3028ed15dababcd9b9ffcc8a6f350e208412b9d967c564070c63cd80d9b4d 2376048 libc6-i386_2.19-11_amd64.deb
 1dc5bb996be03692c7c5986c2ab5923355961bfcba0234f095aeac6f65c52bd1 1314884 libc6-dev-i386_2.19-11_amd64.deb
 1ca30c4f95a7bb204653e0f72eb5feaa8a5f1ed12b1e963b2d59a55d0a4652d8 2593936 libc6-x32_2.19-11_amd64.deb
 0f4e6464899627529fdf14b01a9c19f3d785a1becfebd3f40686bbce49fb139c 1582274 libc6-dev-x32_2.19-11_amd64.deb
 96a921b7698a55d1fc6e93569f09ef69a0e7a3f69a141f81d18daff20041ac43 239926 nscd_2.19-11_amd64.deb
 9500bd889a2bc5acb2d1dc1a4306d67b7a62565ca1254b03c9ab352d5ec78cdb 3429364 libc6-dbg_2.19-11_amd64.deb
 2a44dd21edafa5c3ef7ae30fa473c524bf8707e6dabbc7afe8f271458bf0cbc8 1057602 libc6-udeb_2.19-11_amd64.udeb
 dc02c589a02129e5c6ccfb43792da2ee293a9cfb53e8bc50c0ed16ab4fe1296d 10040 libnss-dns-udeb_2.19-11_amd64.udeb
 463ba1b1dae57d2a9f62ff3fbc76ca35229b0491ce261738c6616501acd0d1cc 16426 libnss-files-udeb_2.19-11_amd64.udeb
Files:
 257453dcd9f1e450fe6fbda2e5df6fdc 2261684 doc optional glibc-doc_2.19-11_all.deb
 e27b22abb7ed81c7225049534686c78c 14144574 devel optional glibc-source_2.19-11_all.deb
 7ef64e056d1cf32e44bd6b74b8b21094 3956686 localization standard locales_2.19-11_all.deb
 1518f180957440e414f2897a2a78a178 4817464 libs required libc6_2.19-11_amd64.deb
 509880096fd87f5389a4939916a4440c 1999272 libdevel optional libc6-dev_2.19-11_amd64.deb
 8e0815823c19dc3ac8b43a56f86a2c72 1471542 libdevel optional libc6-pic_2.19-11_amd64.deb
 f447d98c0e8a4a751984f5555b559c3d 1282854 libs required libc-bin_2.19-11_amd64.deb
 3b3fd1b11cb200792f2344399e646f46 236414 libdevel optional libc-dev-bin_2.19-11_amd64.deb
 6a31a9f2747cde39470c07453f8c1973 176362 libs required multiarch-support_2.19-11_amd64.deb
 469e613d68179e80cb5cbf8666fdfedc 1609972 libdevel extra libc6-prof_2.19-11_amd64.deb
 1454c728f0c33a903102b61a877c0f8b 3521580 localization extra locales-all_2.19-11_amd64.deb
 e593f9f63600e4714e2ec16b81766aea 2376048 libs optional libc6-i386_2.19-11_amd64.deb
 025f9b4bab36a923c3ae6b5796a6bdf9 1314884 libdevel optional libc6-dev-i386_2.19-11_amd64.deb
 558626aa7282dc98d70045f0e1725481 2593936 libs optional libc6-x32_2.19-11_amd64.deb
 fdd822a2de512d116fef14f084b77e16 1582274 libdevel optional libc6-dev-x32_2.19-11_amd64.deb
 d2863a804ead3afde38b76c1d0613a16 239926 admin optional nscd_2.19-11_amd64.deb
 6b5bbea48dcb89d3801862a0d2217996 3429364 debug extra libc6-dbg_2.19-11_amd64.deb
 6ff9bd4db36bbd39e06ec3dca9b450d2 1057602 debian-installer extra libc6-udeb_2.19-11_amd64.udeb
 7c407ca413a468d072068ef5f4bae736 10040 debian-installer extra libnss-dns-udeb_2.19-11_amd64.udeb
 0246e05bde31435689622c68cb388971 16426 debian-installer extra libnss-files-udeb_2.19-11_amd64.udeb
 0b8f21740666576c05dc60ca05b65f2c 8645 libs required glibc_2.19-11.dsc
 e175b4ed895bd94bd8f5b6f5439f7db8 1002540 libs required glibc_2.19-11.debian.tar.xz
Package-Type: udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIVAwUBVBPUDLqceAYd3YybAQgYOw/5AUyHYbOBR3t9aQ/sgAdvr/KftwjqKn0o
6IuzR1nQFTIImslI/MnFoqbkKDs2FSSL+RmcH3Vpt28O0DvrIYAL/k39HpsjJlro
R2Da+pyXUoE+YC16hhTda43iTEm8MIqdWcv3OMXc4IaswhvagptiJFCl6jFl1snX
GsjXhqN8pVFl2iD6evKTMwxNg8Pd4+7qewgitn4W2lvhNZMPOg6dphpbjUoJFKFU
QmIUEPVVnoyZEAOUOV2rK6sI5b0/54gVkR1fzlOOowutJ5zw37lbXijormXt5XJk
N/DAnfpmk55C3ombn5Bq8J9McbXuQwTOKhT22GKi1OMKoISrPgMkE8e9wlC0pQtY
rOAgYmlTRbEN4kf13svjn6UL7aKkrd7Yp3zR1aw1lZ+cjQ65spbBfN0W6+b3rp/V
h1BveeOXuzsIWQUkBYXc0KTOeLIsqEbewZ2uWOmYJ4hhGyUxV4VA0e5FRkb5oXuF
Pe5qxgYU/0b5OI0kPMU2e56lNw34zetJ6OwNpwVzEoAXn8s6ANuN5XpicNNGzPR6
3k/3MwCSVB5+fjkYqT6zIFlu3zuYOh9tGbPsJpa/FU+6DWNmNZgZKkh5eOUrdxkO
wA5fSyMf3KKcnXUWNMJuxzoZKtIEJ8O3zoCQbepH+Fa1fqzp1T4IIwTxbOi/qdiX
rYcJTFbYacI=
=KDJs
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: