--- Begin Message ---
Package: glibc
Version: 2.7-5
Severity: important
Since 2.7, glibc changed behavour of fflush() wrt pending write in
the FILE* buffer. Before, the pending write data was cleared on
fflush(), now it's keept in the buffer.
As a result, we see some.. interesting stuff, like this:
$ echo foo > /dev/full
bash: echo: write error: No space left on device
$ echo bar
foo
bar
$ _
Note the 2nd echo prints BOTH foo and bar. Here, echo(1) is
built-in to bash, and bash just switches filedescriptor #1
behind the scenes of stdio when doing redirects. It correctly
calls fflush() (which reports error on first echo) and clearerror(),
but neither of them now clears the pending write, and the data
remains in the buffer attached to stdout FILE* structure.
The same behavour is reported for zsh, too, which seems to do
similar behind-the-scenes trick when doing redirections.
As far as I can see, this is a grey area in C standard - whenever
the pending write should be cleared and when. More, I see no
stdio function to force clearing the pding write - at least not
a standard one.
So the bug seems to be in bash (and in zsh) - (ab)users of fflush(),
but I'm filing bugreport against glibc as the change lies here,
and it's more generic.
I see several possible portable, "white" way to do it all cleanly:
o issue freopen() on each redirection (which is tricky too,
because freopen() does not accept a file descriptor)
o use separate FILE stream instead of stdout (requires many
changes in bash and other places)
o don't use stdio at all
And finally, to revert glibc to do the same as was done before 2.7.
What exactly to do is a.. good question.
Oh well.
/mjt
-- System Information:
Debian Release: 4.0
APT prefers stable
APT policy: (990, 'stable'), (500, 'testing'), (50, 'unstable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.23-i686smp
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)
Versions of packages bash depends on:
ii libc6 2.7-5 GNU C Library: Shared libraries
ii bash 3.1dfsg-8 The GNU Bourne Again SHell
-- no debconf information
--- End Message ---
--- Begin Message ---
Source: glibc
Source-Version: 2.7-6
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:
glibc-doc_2.7-6_all.deb
to pool/main/g/glibc/glibc-doc_2.7-6_all.deb
glibc_2.7-6.diff.gz
to pool/main/g/glibc/glibc_2.7-6.diff.gz
glibc_2.7-6.dsc
to pool/main/g/glibc/glibc_2.7-6.dsc
libc6-dbg_2.7-6_amd64.deb
to pool/main/g/glibc/libc6-dbg_2.7-6_amd64.deb
libc6-dev-i386_2.7-6_amd64.deb
to pool/main/g/glibc/libc6-dev-i386_2.7-6_amd64.deb
libc6-dev_2.7-6_amd64.deb
to pool/main/g/glibc/libc6-dev_2.7-6_amd64.deb
libc6-i386_2.7-6_amd64.deb
to pool/main/g/glibc/libc6-i386_2.7-6_amd64.deb
libc6-pic_2.7-6_amd64.deb
to pool/main/g/glibc/libc6-pic_2.7-6_amd64.deb
libc6-prof_2.7-6_amd64.deb
to pool/main/g/glibc/libc6-prof_2.7-6_amd64.deb
libc6-udeb_2.7-6_amd64.udeb
to pool/main/g/glibc/libc6-udeb_2.7-6_amd64.udeb
libc6_2.7-6_amd64.deb
to pool/main/g/glibc/libc6_2.7-6_amd64.deb
libnss-dns-udeb_2.7-6_amd64.udeb
to pool/main/g/glibc/libnss-dns-udeb_2.7-6_amd64.udeb
libnss-files-udeb_2.7-6_amd64.udeb
to pool/main/g/glibc/libnss-files-udeb_2.7-6_amd64.udeb
locales-all_2.7-6_amd64.deb
to pool/main/g/glibc/locales-all_2.7-6_amd64.deb
locales_2.7-6_all.deb
to pool/main/g/glibc/locales_2.7-6_all.deb
nscd_2.7-6_amd64.deb
to pool/main/g/glibc/nscd_2.7-6_amd64.deb
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 459643@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@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Sat, 12 Jan 2008 15:33:10 +0100
Source: glibc
Binary: libc0.1-prof libc6.1-alphaev67 libc6-dev-amd64 locales-all libc6-i686 libc6-dev-ppc64 libc0.3-pic glibc-doc libc0.3 libc6-dev-mipsn32 libc0.1-i686 libc0.1-i386 libc6-mips64 libc6.1-dev libc6-s390x libnss-files-udeb libc0.1-dev-i386 libc6-dev-sparc64 libc6-i386 libc0.3-dev libc6-udeb libc6-dbg libc6.1-pic libc6-dev libc0.3-prof libc0.1-udeb libc6-dev-i386 libc6.1-prof libc6-mipsn32 libc0.1-dev locales libc6-pic libc0.3-udeb libc6-dev-powerpc libc0.1-pic libc6-ppc64 libc0.3-dbg libc0.1-dbg libc6-amd64 libc0.1 libc6-prof libc6-xen libc6-dev-mips64 libc6-powerpc libc6 libc6-sparcv9b libc6.1-udeb libc6.1-dbg nscd libc6-sparc64 libnss-dns-udeb libc6.1 libc6-dev-s390x
Architecture: source all amd64
Version: 2.7-6
Distribution: unstable
Urgency: low
Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
Changed-By: Aurelien Jarno <aurel32@debian.org>
Description:
glibc-doc - GNU C Library: Documentation
libc6 - GNU C Library: Shared libraries
libc6-dbg - GNU C Library: Libraries with debugging symbols
libc6-dev - GNU C Library: Development Libraries and Header Files
libc6-dev-i386 - GNU C Library: 32bit development libraries for AMD64
libc6-i386 - GNU C Library: 32bit shared libraries for AMD64
libc6-pic - GNU C Library: PIC archive library
libc6-prof - GNU C Library: Profiling Libraries
libc6-udeb - GNU C Library: Shared libraries - udeb
libc6-udeb - GNU C Library: Shared libraries - udeb (udeb)
libnss-dns-udeb - GNU C Library: NSS helper for DNS - udeb
libnss-dns-udeb - GNU C Library: NSS helper for DNS - udeb (udeb)
libnss-files-udeb - GNU C Library: NSS helper for files - 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
nscd - GNU C Library: Name Service Cache Daemon
Closes: 453408 457351 457661 458579 458914 459217 459523 459643 460226
Changes:
glibc (2.7-6) unstable; urgency=low
.
[ Aurelien Jarno ]
* patches/localedata/locale-ks_IN.diff: new locale contributed by Rakesh
Pandit. Closes: #457351.
* patches/series: enable patches/any/cvs-vfscanf.diff. Closes: #453408.
* Support dpkg-buildpackage -j, but only debian/rules is actually run in
parallel.
* patches/any/cvs-iconv-iso2022jp-loop-bug.diff: patch from CVS to fix
iconv hang when converting to ISO-2022-JP. Thanks to Bryan Donlan for
the patch. Closes: #458579.
* kfreebsd/local-sysdeps.diff: update to revision 2094 (from glibc-bsd).
* patches/amd64/cvs-vdso_clock_gettime.diff: new patch from CVS to fix
static linking on amd64.
* patches/any/local-linuxthreads-fd.diff: new patch to make sure
linuxthreads doesn't use stdin, stdout or stderr for its internal
use.
* debhelper.in/libc.preinst: also check for libc6-xen in non-dpkg-owned
files test. Closes: #459523.
* patches/any/submitted-rfc3484-labels.diff: remove, this patch is actually
broken, and the observed behaviour conforms with the RFC.
* patches/any/submitted-fileops-and-signals.diff: disabled as it breaks too
much programs. Closes: #459643.
* patches/localedata/locale-pt_PT.diff: new patch from Flávio Martins to
fix mon_decimal_point for pt_PT. Closes: #459217.
* debian/debhelper.in/locales.postinst: don't update /etc/default/locale
if it already exists and DEBCONF_RECONFIGURE is not empty. Closes:
#458914.
* debian/sysdeps/depflags.pl: bump conflict against tzdata to (<< 2007k-1).
.
[ Clint Adams ]
* debhelper.in/nscd.init: use lsb output functions. Closes: #457661.
* patches/any/cvs-sunrpc_rpc_thread.diff: patch by André Cruz to fix
sunrpc memory leak. closes: #460226.
.
[ Samuel Thibault ]
* patches/hurd-i386/submitted-extern_inline.diff new patch to fix extern
inline declarations for c++.
Files:
e186846985b94f12de417cfae4f88fcb 2072 libs required glibc_2.7-6.dsc
be0b85e6036c54e080e4cea147b706d6 679797 libs required glibc_2.7-6.diff.gz
6f69826a348f963448d9a58d18cceb8c 1624400 doc optional glibc-doc_2.7-6_all.deb
356a92a7f5603f03b9b772d3dba15775 4428250 libs standard locales_2.7-6_all.deb
5a1b34049fb152b5d806f816bacb593e 4861756 libs required libc6_2.7-6_amd64.deb
55c2fd616ee922ffe7d9c664afb1de02 2525570 libdevel optional libc6-dev_2.7-6_amd64.deb
c9c47b987946e81770e781419daab431 1962304 libdevel extra libc6-prof_2.7-6_amd64.deb
048d6ebbbcd0931e135719cfb00d0b46 1482700 libdevel optional libc6-pic_2.7-6_amd64.deb
17cd04abfeba5b84aed90a74f7cdcb8d 2618098 libs extra locales-all_2.7-6_amd64.deb
34eb9ce561a1aa05fdb759b46bed345d 3626972 libs optional libc6-i386_2.7-6_amd64.deb
dbec8f8eeb9ffbbccccb580bb0de9586 1432662 libdevel optional libc6-dev-i386_2.7-6_amd64.deb
baff97b7c70bd6bd9edd2ab84b7a19ae 171248 admin optional nscd_2.7-6_amd64.deb
601725c2f20de895f190dc988f52134e 5295082 libdevel extra libc6-dbg_2.7-6_amd64.deb
2c599cdeb66514065e41449bed163971 1129486 debian-installer extra libc6-udeb_2.7-6_amd64.udeb
96e896342010d953036bf7bac172e946 9742 debian-installer extra libnss-dns-udeb_2.7-6_amd64.udeb
2f99b0fcf5ecab37cf5d864073ab46a9 18016 debian-installer extra libnss-files-udeb_2.7-6_amd64.udeb
Package-Type: udeb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFHiPy/w3ao2vG823MRAhTgAJsFUlY5nwwiVxSPr8o01mvA36ej1gCfRCUd
w/e62hTLzXVfItDwl2Qi3/E=
=K4Bh
-----END PGP SIGNATURE-----
--- End Message ---