Debian Bug report logs - #562518
zlib1g 1:1.2.3.4.dfsg-1 hangs(?)

version graph

Package: zlib1g; Maintainer for zlib1g is Mark Brown <broonie@debian.org>; Source for zlib1g is src:zlib (PTS, buildd, popcon).

Reported by: Lucas Nussbaum <lucas@lucas-nussbaum.net>

Date: Fri, 25 Dec 2009 10:45:02 UTC

Severity: grave

Found in version zlib/1:1.2.3.4.dfsg-1

Fixed in version zlib/1:1.2.3.4.dfsg-2

Done: Mark Brown <broonie@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Mark Brown <broonie@debian.org>:
Bug#562518; Package zlib1g. (Fri, 25 Dec 2009 10:45:05 GMT) (full text, mbox, link).


Acknowledgement sent to Lucas Nussbaum <lucas@lucas-nussbaum.net>:
New Bug report received and forwarded. Copy sent to Mark Brown <broonie@debian.org>. (Fri, 25 Dec 2009 10:45:05 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Lucas Nussbaum <lucas@lucas-nussbaum.net>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: zlib1g 1:1.2.3.4.dfsg-1 hangs(?)
Date: Fri, 25 Dec 2009 11:33:05 +0100
Package: zlib1g
Version: 1:1.2.3.4.dfsg-1
Severity: grave
Justification: renders package unusable

Hi,

It seems that zlib1g 1:1.2.3.4.dfsg-1 broke something.

To reproduce: In a clean minimal unstable chroot (amd64), install man-db
=> hangs on "Setting up man-db (2.5.6-4) ...
Building database of manual pages ..."
Strace log:
stat("/usr/share/man/zh_CN/man8/useradd.8.gz", {st_mode=S_IFREG|0644,
st_size=3181, ...}) = 0
stat("/usr/share/man/zh_CN/man8/useradd.8.gz", {st_mode=S_IFREG|0644,
st_size=3181, ...}) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
open("/usr/share/man/zh_CN/man8/useradd.8.gz", O_RDONLY) = 7
pipe([8, 9])                            = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7f2d102727c0) = 27409
close(7)                                = 0
close(9)                                = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
pipe([7, 9])                            = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7f2d102727c0) = 27410
close(8)                                = 0
close(9)                                = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGCHLD (Child exited) @ 0 (0) ---
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG, NULL) =
27409
wait4(-1, 0x7fff1dd0ab34, WNOHANG, NULL) = 0
rt_sigreturn(0xffffffffffffffff)        = 0
read(7, ".\\\" $Id: useradd.8 1342 2007-11-"..., 1024) = 1024
read(7, "LIED WARRANTIES OF MERCHANTABILI"..., 1024) = 1024
read(7, "n_dir ] \" |\" \" \" \\-M ]\n.RB [ \\-s"..., 1024) = 1024
read(7, "\351\220\247 \351\215\217 \351\217\203 \351\216\265
\346\265\243 \351\220\242 \351\220\250 \\fIh"..., 1024) = 1024
read(7,  <unfinished ...>

With strace -f:
open("/usr/share/man/zh_CN/man8/useradd.8", O_RDONLY) = 7
pipe([8, 9])                            = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
clone(Process 31180 attached (waiting for parent)
Process 31180 resumed (parent 27450 ready)
child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f00585b37c0) = 31180
[pid 31180] rt_sigaction(SIGHUP, NULL, {0x411290, [], SA_RESTORER, 0x7f0057c5efd0}, 8) = 0
[pid 31180] rt_sigaction(SIGHUP, {0x411290, [], SA_RESTORER, 0x7f0057c5efd0}, NULL, 8) = 0
[pid 31180] rt_sigaction(SIGINT, NULL, {0x411290, [], SA_RESTORER, 0x7f0057c5efd0}, 8) = 0
[pid 31180] rt_sigaction(SIGINT, {0x411290, [], SA_RESTORER, 0x7f0057c5efd0}, NULL, 8) = 0
[pid 31180] rt_sigaction(SIGTERM, NULL, {0x411290, [], SA_RESTORER, 0x7f0057c5efd0}, 8) = 0
[pid 31180] rt_sigaction(SIGTERM, {0x411290, [], SA_RESTORER, 0x7f0057c5efd0}, NULL, 8) = 0
[pid 31180] dup2(7, 0)                  = 0
[pid 31180] close(7)                    = 0
[pid 31180] dup2(9, 1)                  = 1
[pid 31180] close(9)                    = 0
[pid 31180] close(8)                    = 0
[pid 31180] dup(0)                      = 7
[pid 31180] rt_sigprocmask(SIG_BLOCK, [CHLD], [CHLD], 8) = 0
[pid 31180] rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0
[pid 31180] pipe([8, 9])                = 0
[pid 31180] rt_sigprocmask(SIG_BLOCK, [CHLD], [CHLD], 8) = 0
[pid 31180] clone(Process 31181 attached (waiting for parent)
 <unfinished ...>
[pid 27450] close(7)                    = 0
[pid 27450] close(9)                    = 0
[pid 27450] rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
[pid 27450] read(8, Process 31181 resumed (parent 31180 ready)
 <unfinished ...>
[pid 31180] <... clone resumed> child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f00585b37c0) = 31181
[pid 31181] rt_sigaction(SIGHUP, NULL, {0x411290, [], SA_RESTORER, 0x7f0057c5efd0}, 8) = 0
[pid 31181] rt_sigaction(SIGHUP, {0x411290, [], SA_RESTORER, 0x7f0057c5efd0}, NULL, 8) = 0
[pid 31181] rt_sigaction(SIGINT, NULL, {0x411290, [], SA_RESTORER, 0x7f0057c5efd0}, 8) = 0
[pid 31181] rt_sigaction(SIGINT, {0x411290, [], SA_RESTORER, 0x7f0057c5efd0}, NULL, 8) = 0
[pid 31181] rt_sigaction(SIGTERM, NULL, {0x411290, [], SA_RESTORER, 0x7f0057c5efd0}, 8) = 0
[pid 31181] rt_sigaction(SIGTERM, {0x411290, [], SA_RESTORER, 0x7f0057c5efd0}, NULL, 8) = 0
[pid 31181] dup2(7, 0)                  = 0
[pid 31181] close(7)                    = 0
[pid 31181] dup2(9, 1)                  = 1
[pid 31181] close(9)                    = 0
[pid 31181] close(8)                    = 0
[pid 31181] close(8)                    = -1 EBADF (Bad file descriptor)
[pid 31181] dup(0)                      = 7
[pid 31181] fcntl(7, F_GETFL)           = 0x8000 (flags O_RDONLY|O_LARGEFILE)
[pid 31181] fstat(7, {st_mode=S_IFREG|0644, st_size=7691, ...}) = 0
[pid 31181] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f00585b6000
[pid 31181] lseek(7, 0, SEEK_CUR)       = 0
[pid 31181] read(7, ".\\\" $Id: useradd.8 1342 2007-11-"..., 16384) = 7691
[pid 31181] read(7, "", 8192)           = 0
[pid 31181] fstat(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
[pid 31181] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f00585b5000
[pid 31181] write(1, ".\\\" $Id: useradd.8 1342 2007-11-"..., 4096) = 4096
[pid 31181] close(7)                    = 0
[pid 31181] munmap(0x7f00585b6000, 4096) = 0
[pid 31181] exit_group(0) 
Process 31181 detached
[pid 31180] close(7)                    = 0
[pid 31180] close(9)                    = 0
[pid 31180] rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0
[pid 31180] read(8, ".\\\" $Id: useradd.8 1342 2007-11-"..., 4096) =
4096
[pid 31180] open("/usr/lib/gconv/gconv-modules.cache", O_RDONLY) = 7
[pid 31180] fstat(7, {st_mode=S_IFREG|0644, st_size=26048, ...}) = 0
[pid 31180] mmap(NULL, 26048, PROT_READ, MAP_SHARED, 7, 0) =
0x7f00585ac000
[pid 31180] close(7)                    = 0
[pid 31180] brk(0x1234000)              = 0x1234000
[pid 31180] read(8, "", 61440)          = 0
[pid 31180] read(8, "", 61440)          = 0
[pid 31180] brk(0x1264000)              = 0x1264000
[pid 31180] open("/usr/lib/gconv/GBK.so", O_RDONLY) = 7
[pid 31180] read(7,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\4\0\0\0\0\0\0"...,
832) = 832
[pid 31180] fstat(7, {st_mode=S_IFREG|0644, st_size=112664, ...}) = 0
[pid 31180] mmap(NULL, 2207792, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_DENYWRITE, 7, 0) = 0x7f00571da000
[pid 31180] mprotect(0x7f00571f5000, 2093056, PROT_NONE) = 0
[pid 31180] mmap(0x7f00573f4000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 7, 0x1a000) = 0x7f00573f4000
[pid 31180] close(7)                    = 0
[pid 31180] mprotect(0x7f00573f4000, 4096, PROT_READ) = 0
[pid 31180] read(8, "", 61440)          = 0
[pid 31180] read(8, "", 61440)          = 0
[pid 31180] fstat(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
[pid 31180] mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f00585b6000
[pid 31180] write(1, ".\\\" $Id: useradd.8 1342 2007-11-"..., 4096
<unfinished ...>
[pid 27450] <... read resumed> ".\\\" $Id: useradd.8 1342 2007-11-"...,
1024) = 1024
[pid 27450] read(8, "LIED WARRANTIES OF MERCHANTABILI"..., 1024) = 1024
[pid 27450] read(8, "n_dir ] \" |\" \" \" \\-M ]\n.RB [ \\-s"..., 1024)
= 1024
[pid 27450] read(8, "\351\220\247 \351\215\217 \351\217\203 \351\216\265
\346\265\243 \351\220\242 \351\220\250 \\fIh"..., 1024) = 1024
[pid 27450] read(8,  <unfinished ...>
[pid 31180] <... write resumed> )       = 4096
[pid 31180] read(8, "", 65535)          = 0
[pid 31180] read(8, "", 65535)          = 0
[pid 31180] read(8, "", 65535)          = 0
[pid 31180] read(8, "", 65535)          = 0
[pid 31180] read(8, "", 65535)          = 0


If, in a clean minimal chroot, I install zlib1g from testing first, then
install man-db, it works fine.

My guess is that it is related to the fixing of #301283.

Lucas

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (700, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.31-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages zlib1g depends on:
ii  libc6                         2.10.2-2   GNU C Library: Shared libraries

zlib1g recommends no packages.

zlib1g suggests no packages.

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, Mark Brown <broonie@debian.org>:
Bug#562518; Package zlib1g. (Fri, 25 Dec 2009 13:54:04 GMT) (full text, mbox, link).


Acknowledgement sent to Kurt Roeckx <kurt@roeckx.be>:
Extra info received and forwarded to list. Copy sent to Mark Brown <broonie@debian.org>. (Fri, 25 Dec 2009 13:54:04 GMT) (full text, mbox, link).


Message #10 received at 562518@bugs.debian.org (full text, mbox, reply):

From: Kurt Roeckx <kurt@roeckx.be>
Cc: 562518@bugs.debian.org
Subject: Re: zlib1g 1:1.2.3.4.dfsg-1 hangs(?)
Date: Fri, 25 Dec 2009 14:51:44 +0100
On Fri, Dec 25, 2009 at 11:33:05AM +0100, Lucas Nussbaum wrote:
> Package: zlib1g
> Version: 1:1.2.3.4.dfsg-1
> Severity: grave
> Justification: renders package unusable
> 
> Hi,
> 
> It seems that zlib1g 1:1.2.3.4.dfsg-1 broke something.
> 
> To reproduce: In a clean minimal unstable chroot (amd64), install man-db
> => hangs on "Setting up man-db (2.5.6-4) ...
> Building database of manual pages ..."

Note that this causing problems on alot of the buildds.  There
is also a bug against man-db about this (#562503).


Kurt





Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#562518; Package zlib1g. (Fri, 25 Dec 2009 15:06:04 GMT) (full text, mbox, link).


Acknowledgement sent to Mark Brown <broonie@debian.org>:
Extra info received and forwarded to list. (Fri, 25 Dec 2009 15:06:04 GMT) (full text, mbox, link).


Message #15 received at 562518@bugs.debian.org (full text, mbox, reply):

From: Mark Brown <broonie@debian.org>
To: Lucas Nussbaum <lucas@lucas-nussbaum.net>, 562518@bugs.debian.org
Cc: 562503@bugs.debian.org
Subject: Re: Bug#562518: zlib1g 1:1.2.3.4.dfsg-1 hangs(?)
Date: Fri, 25 Dec 2009 15:05:13 +0000
On Fri, Dec 25, 2009 at 11:33:05AM +0100, Lucas Nussbaum wrote:

> If, in a clean minimal chroot, I install zlib1g from testing first, then
> install man-db, it works fine.

> My guess is that it is related to the fixing of #301283.

As far as I can tell zlib is performing correctly here, the man-db
process doing the decompression exits correctly having detected EOF and
closed the file, then exits.  The read() that's spinning with zero bytes
is certainly not a zlib one, it reads data in 16384 byte chunks but
that's a read of 65535 bytes (and the man-db debug output says the
process that's spinning is a manconv one.

That said, I can't immediately spot a problem in the man-db code and
reverting the explict reporting of EOF in zlib makes man-db stop falling
over so I'll upload a package just now.




Reply sent to Mark Brown <broonie@debian.org>:
You have taken responsibility. (Fri, 25 Dec 2009 16:21:03 GMT) (full text, mbox, link).


Notification sent to Lucas Nussbaum <lucas@lucas-nussbaum.net>:
Bug acknowledged by developer. (Fri, 25 Dec 2009 16:21:03 GMT) (full text, mbox, link).


Message #20 received at 562518-close@bugs.debian.org (full text, mbox, reply):

From: Mark Brown <broonie@debian.org>
To: 562518-close@bugs.debian.org
Subject: Bug#562518: fixed in zlib 1:1.2.3.4.dfsg-2
Date: Fri, 25 Dec 2009 16:17:47 +0000
Source: zlib
Source-Version: 1:1.2.3.4.dfsg-2

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

lib32z1-dev_1.2.3.4.dfsg-2_amd64.deb
  to main/z/zlib/lib32z1-dev_1.2.3.4.dfsg-2_amd64.deb
lib32z1_1.2.3.4.dfsg-2_amd64.deb
  to main/z/zlib/lib32z1_1.2.3.4.dfsg-2_amd64.deb
zlib-bin_1.2.3.4.dfsg-2_amd64.deb
  to main/z/zlib/zlib-bin_1.2.3.4.dfsg-2_amd64.deb
zlib1g-dbg_1.2.3.4.dfsg-2_amd64.deb
  to main/z/zlib/zlib1g-dbg_1.2.3.4.dfsg-2_amd64.deb
zlib1g-dev_1.2.3.4.dfsg-2_amd64.deb
  to main/z/zlib/zlib1g-dev_1.2.3.4.dfsg-2_amd64.deb
zlib1g-udeb_1.2.3.4.dfsg-2_amd64.udeb
  to main/z/zlib/zlib1g-udeb_1.2.3.4.dfsg-2_amd64.udeb
zlib1g_1.2.3.4.dfsg-2_amd64.deb
  to main/z/zlib/zlib1g_1.2.3.4.dfsg-2_amd64.deb
zlib_1.2.3.4.dfsg-2.debian.tar.gz
  to main/z/zlib/zlib_1.2.3.4.dfsg-2.debian.tar.gz
zlib_1.2.3.4.dfsg-2.dsc
  to main/z/zlib/zlib_1.2.3.4.dfsg-2.dsc



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 562518@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Mark Brown <broonie@debian.org> (supplier of updated zlib 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.8
Date: Fri, 25 Dec 2009 15:02:23 +0000
Source: zlib
Binary: zlib1g zlib1g-dev zlib1g-dbg zlib-bin zlib1g-udeb lib64z1 lib64z1-dev lib32z1 lib32z1-dev libn32z1 libn32z1-dev
Architecture: source amd64
Version: 1:1.2.3.4.dfsg-2
Distribution: unstable
Urgency: low
Maintainer: Mark Brown <broonie@debian.org>
Changed-By: Mark Brown <broonie@debian.org>
Description: 
 lib32z1    - compression library - 32 bit runtime
 lib32z1-dev - compression library - 32 bit development
 lib64z1    - compression library - 64 bit runtime
 lib64z1-dev - compression library - 64 bit development
 libn32z1   - compression library - n32 runtime
 libn32z1-dev - compression library - n32 development
 zlib-bin   - compression library - sample programs
 zlib1g     - compression library - runtime
 zlib1g-dbg - compression library - development
 zlib1g-dev - compression library - development
 zlib1g-udeb - compression library - runtime for Debian installer (udeb)
Closes: 562518
Changes: 
 zlib (1:1.2.3.4.dfsg-2) unstable; urgency=low
 .
   * Revert explict EOF indication to avoid triggering an infinite loop
     in man-db while rebuilding the caches (closes: #562518).
Checksums-Sha1: 
 d0a1b7d0d3356c20c8b4b1bc1a40183e71f05093 1330 zlib_1.2.3.4.dfsg-2.dsc
 b469d5d2cb31b419cbcb9c9abbf81decd655a431 15784 zlib_1.2.3.4.dfsg-2.debian.tar.gz
 409ba60944e340cfd2b16980be6c9264fa37ed84 79120 zlib1g_1.2.3.4.dfsg-2_amd64.deb
 7e841ed68abfcec1c65b56f7fa8a3ff123d5d96e 191416 zlib1g-dev_1.2.3.4.dfsg-2_amd64.deb
 7fccaf4644a34d2b0ae37600b8999b1204399caf 160230 zlib1g-dbg_1.2.3.4.dfsg-2_amd64.deb
 c40e062abdfd11ba9066a804a034dbb5c8f59aef 51948 zlib-bin_1.2.3.4.dfsg-2_amd64.deb
 5d1104ebb36676fe1dcc594521d0fc587330739d 49444 zlib1g-udeb_1.2.3.4.dfsg-2_amd64.udeb
 001d642c9647b598310c762745c4fa33f44dbc25 76018 lib32z1_1.2.3.4.dfsg-2_amd64.deb
 8c948da16d7834d86219854f33c254fad3342b1a 75596 lib32z1-dev_1.2.3.4.dfsg-2_amd64.deb
Checksums-Sha256: 
 7e0b3416aea7a872a9aa21042ad6ffdbbd3b476f4f2e33c0ce0350d39cd7fea2 1330 zlib_1.2.3.4.dfsg-2.dsc
 006e79d64a5d39136273217a701744ef4866776dcb731f8a45b6a01338405c59 15784 zlib_1.2.3.4.dfsg-2.debian.tar.gz
 f653d5e85c2bae11b2e15509882d45bee69223c21c776d4b144b00b4b00f762e 79120 zlib1g_1.2.3.4.dfsg-2_amd64.deb
 f2b6a51733aa0a6546e2bcf17e556241f938d6b33ef525bab9ffc0781099d57e 191416 zlib1g-dev_1.2.3.4.dfsg-2_amd64.deb
 207f1d61a4495ee1da04f882039da922c17326ceaf25cacccf9eb8310a8a0d44 160230 zlib1g-dbg_1.2.3.4.dfsg-2_amd64.deb
 4c541cd24e44444a40ad224e37d1baaf2d6d9b1b0b476896cb30e76d1ca45fb2 51948 zlib-bin_1.2.3.4.dfsg-2_amd64.deb
 69b4ec82f0c4601666e1566e63243cfccff3cf26c447bd8458f28187cb678241 49444 zlib1g-udeb_1.2.3.4.dfsg-2_amd64.udeb
 a28c6d1288551e0fc16546ba3d89e6afdb6924416a9a44499c359756260373f0 76018 lib32z1_1.2.3.4.dfsg-2_amd64.deb
 f05f06836b91810ea0a49edfb001c5707c6e098b1ed3ed9d7af70a7c1ed3b7f8 75596 lib32z1-dev_1.2.3.4.dfsg-2_amd64.deb
Files: 
 a592d34dcfe6a526b8a15a82b4da6298 1330 libs optional zlib_1.2.3.4.dfsg-2.dsc
 6ee49b281778ee94c93ef8556437a8b9 15784 libs optional zlib_1.2.3.4.dfsg-2.debian.tar.gz
 6f70641a0689a9e2001719b3521b6f9d 79120 libs required zlib1g_1.2.3.4.dfsg-2_amd64.deb
 7cca7fac144878d2354526ba856208ba 191416 libdevel optional zlib1g-dev_1.2.3.4.dfsg-2_amd64.deb
 afff3e2e8bf3cfaa53da2df16ad0435a 160230 debug extra zlib1g-dbg_1.2.3.4.dfsg-2_amd64.deb
 ef8f32c959b7578c552157c4ab9d888e 51948 utils optional zlib-bin_1.2.3.4.dfsg-2_amd64.deb
 5ca61a439a31bdea5b47422db1df7b86 49444 debian-installer optional zlib1g-udeb_1.2.3.4.dfsg-2_amd64.udeb
 2c764230eccf01a1e342a2168e812a0d 76018 libs optional lib32z1_1.2.3.4.dfsg-2_amd64.deb
 c4415233d9e29cf117f79917bbbcba01 75596 libdevel optional lib32z1-dev_1.2.3.4.dfsg-2_amd64.deb
Package-Type: udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAks04egACgkQJ2Vo11xhU60thwCg+hMqALOJhvHRG8teBjgZsrrK
bfIAoN42Lwj50Vr6yCKd1Q5mRPicu4mf
=NK3x
-----END PGP SIGNATURE-----





Information forwarded to debian-bugs-dist@lists.debian.org, Mark Brown <broonie@debian.org>:
Bug#562518; Package zlib1g. (Fri, 25 Dec 2009 17:57:04 GMT) (full text, mbox, link).


Acknowledgement sent to Joern Heissler <debianbugs@joern.heissler.de>:
Extra info received and forwarded to list. Copy sent to Mark Brown <broonie@debian.org>. (Fri, 25 Dec 2009 17:57:04 GMT) (full text, mbox, link).


Message #25 received at 562518@bugs.debian.org (full text, mbox, reply):

From: Joern Heissler <debianbugs@joern.heissler.de>
To: 562518@bugs.debian.org
Subject: how to reproduce
Date: Fri, 25 Dec 2009 18:41:16 +0100
Hi,
you can reproduce the problem with this little program, more or less copied from man-db source.

If you use it on the mandb.8 file from man-db package, it reads 4096 bytes; the second call to gzread 
returns 0, although the file size is 6554 bytes.

Upgrading to zlib_1.2.3.4.dfsg-2 seems *NOT* to fix the problem.

I don't know what other files makes problem or if you're allowed to gzopen not compressed files at all.

./program < man-db-2.5.6/man/ja/man8/mandb.8 | wc -c  ==> 4096

#include <stdlib.h>
#include <stdio.h>
#include <zlib.h>

int main(void)
{
    gzFile zlibfile;

    zlibfile = gzdopen(0, "r");
    if(!zlibfile) abort();
    for(;;) {
        char buffer[4096];
        int r = gzread (zlibfile, buffer, 4096);
        if(r <= 0)
            break;
        if(fwrite(buffer, 1, (size_t) r, stdout) < (size_t) r)
            break;
    }
    gzclose(zlibfile);
    return 0;
}


Cheers,
Joern




Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#562518; Package zlib1g. (Fri, 25 Dec 2009 18:18:04 GMT) (full text, mbox, link).


Acknowledgement sent to Mark Brown <broonie@debian.org>:
Extra info received and forwarded to list. (Fri, 25 Dec 2009 18:18:04 GMT) (full text, mbox, link).


Message #30 received at 562518@bugs.debian.org (full text, mbox, reply):

From: Mark Brown <broonie@debian.org>
To: Joern Heissler <debianbugs@joern.heissler.de>, 562518@bugs.debian.org
Subject: Re: Bug#562518: how to reproduce
Date: Fri, 25 Dec 2009 18:16:34 +0000
On Fri, Dec 25, 2009 at 06:41:16PM +0100, Joern Heissler wrote:

> you can reproduce the problem with this little program, more or less copied from man-db source.

That's one of the tests I used (plus using man-db itself).

> Upgrading to zlib_1.2.3.4.dfsg-2 seems *NOT* to fix the problem.

Works for me.  Are you postive you are running against that version of
zlib, and when you say "the problem" what exactly do you mean?

> I don't know what other files makes problem or if you're allowed to gzopen not compressed files at all.

Yes, you are.  There is also a difference in the handling of EOF for
uncompressed files, but I can't reproduce any effect on man-db or any
problem.




Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#562518; Package zlib1g. (Fri, 25 Dec 2009 19:15:08 GMT) (full text, mbox, link).


Acknowledgement sent to Mark Brown <broonie@debian.org>:
Extra info received and forwarded to list. (Fri, 25 Dec 2009 19:15:08 GMT) (full text, mbox, link).


Message #35 received at 562518@bugs.debian.org (full text, mbox, reply):

From: Mark Brown <broonie@debian.org>
To: Lucas Nussbaum <lucas@lucas-nussbaum.net>, 562518@bugs.debian.org
Cc: 562503@bugs.debian.org
Subject: Re: Bug#562518: zlib1g 1:1.2.3.4.dfsg-1 hangs(?)
Date: Fri, 25 Dec 2009 19:12:25 +0000
On Fri, Dec 25, 2009 at 03:05:12PM +0000, Mark Brown wrote:

> As far as I can tell zlib is performing correctly here, the man-db
> process doing the decompression exits correctly having detected EOF and
> closed the file, then exits.  The read() that's spinning with zero bytes
> is certainly not a zlib one, it reads data in 16384 byte chunks but
> that's a read of 65535 bytes (and the man-db debug output says the
> process that's spinning is a manconv one.

> That said, I can't immediately spot a problem in the man-db code and
> reverting the explict reporting of EOF in zlib makes man-db stop falling
> over so I'll upload a package just now.

Having looked further there was a problem with zlib truncating output
which should now be fixed with the change I made, however this shouldn't
explain the spin in man-db so there may still be a latent bug there
that's worth looking into.




Information forwarded to debian-bugs-dist@lists.debian.org, Mark Brown <broonie@debian.org>:
Bug#562518; Package zlib1g. (Tue, 29 Dec 2009 11:00:06 GMT) (full text, mbox, link).


Acknowledgement sent to Stefano Zacchiroli <zack@debian.org>:
Extra info received and forwarded to list. Copy sent to Mark Brown <broonie@debian.org>. (Tue, 29 Dec 2009 11:00:06 GMT) (full text, mbox, link).


Message #40 received at 562518@bugs.debian.org (full text, mbox, reply):

From: Stefano Zacchiroli <zack@debian.org>
To: Mark Brown <broonie@debian.org>
Cc: 562518@bugs.debian.org
Subject: Re: Bug#562503: Bug#562518: zlib1g 1:1.2.3.4.dfsg-1 hangs(?)
Date: Tue, 29 Dec 2009 11:58:57 +0100
severity 562518 normal
thanks

On Fri, Dec 25, 2009 at 07:12:25PM +0000, Mark Brown wrote:
> > That said, I can't immediately spot a problem in the man-db code and
> > reverting the explict reporting of EOF in zlib makes man-db stop falling
> > over so I'll upload a package just now.
> 
> Having looked further there was a problem with zlib truncating output
> which should now be fixed with the change I made, however this shouldn't
> explain the spin in man-db so there may still be a latent bug there
> that's worth looking into.

Agreed, but this is anyhow no longer RC. I'm hence downgrading severity
to "normal", leaving up to the maintainer investigation or closure.

Thanks for your feedback,
Cheers.

-- 
Stefano Zacchiroli -o- PhD in Computer Science \ PostDoc @ Univ. Paris 7
zack@{upsilon.cc,pps.jussieu.fr,debian.org} -<>- http://upsilon.cc/zack/
Dietro un grande uomo c'è ..|  .  |. Et ne m'en veux pas si je te tutoie
sempre uno zaino ...........| ..: |.... Je dis tu à tous ceux que j'aime




Severity set to 'normal' from 'grave' Request was from Stefano Zacchiroli <zack@debian.org> to control@bugs.debian.org. (Tue, 29 Dec 2009 11:00:07 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Mark Brown <broonie@debian.org>:
Bug#562518; Package zlib1g. (Tue, 29 Dec 2009 11:03:04 GMT) (full text, mbox, link).


Acknowledgement sent to Stefano Zacchiroli <zack@debian.org>:
Extra info received and forwarded to list. Copy sent to Mark Brown <broonie@debian.org>. (Tue, 29 Dec 2009 11:03:05 GMT) (full text, mbox, link).


Message #47 received at 562518@bugs.debian.org (full text, mbox, reply):

From: Stefano Zacchiroli <zack@debian.org>
To: Mark Brown <broonie@debian.org>
Cc: 562503@bugs.debian.org, 562518@bugs.debian.org
Subject: Re: Bug#562503: Bug#562518: zlib1g 1:1.2.3.4.dfsg-1 hangs(?)
Date: Tue, 29 Dec 2009 12:00:55 +0100
severity 562503 normal
severity 562518 grave
thanks 

[ wrong bug number in the previous post, I'm fixing up my own mess ]

On Fri, Dec 25, 2009 at 07:12:25PM +0000, Mark Brown wrote:
> > That said, I can't immediately spot a problem in the man-db code and
> > reverting the explict reporting of EOF in zlib makes man-db stop falling
> > over so I'll upload a package just now.
> 
> Having looked further there was a problem with zlib truncating output
> which should now be fixed with the change I made, however this shouldn't
> explain the spin in man-db so there may still be a latent bug there
> that's worth looking into.

Agreed, but this is anyhow no longer RC. I'm hence downgrading severity
to "normal", leaving up to the maintainer investigation or closure.

Thanks for your feedback,
Cheers.

-- 
Stefano Zacchiroli -o- PhD in Computer Science \ PostDoc @ Univ. Paris 7
zack@{upsilon.cc,pps.jussieu.fr,debian.org} -<>- http://upsilon.cc/zack/
Dietro un grande uomo c'è ..|  .  |. Et ne m'en veux pas si je te tutoie
sempre uno zaino ...........| ..: |.... Je dis tu à tous ceux que j'aime




Severity set to 'grave' from 'normal' Request was from Stefano Zacchiroli <zack@debian.org> to control@bugs.debian.org. (Tue, 29 Dec 2009 11:03:08 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Mark Brown <broonie@debian.org>:
Bug#562518; Package zlib1g. (Fri, 01 Jan 2010 13:36:04 GMT) (full text, mbox, link).


Acknowledgement sent to Colin Watson <cjwatson@debian.org>:
Extra info received and forwarded to list. Copy sent to Mark Brown <broonie@debian.org>. (Fri, 01 Jan 2010 13:36:04 GMT) (full text, mbox, link).


Message #54 received at 562518@bugs.debian.org (full text, mbox, reply):

From: Colin Watson <cjwatson@debian.org>
To: Mark Brown <broonie@debian.org>, 562503@bugs.debian.org
Cc: Lucas Nussbaum <lucas@lucas-nussbaum.net>, 562518@bugs.debian.org, tony mancill <tmancill@debian.org>, Kurt Roeckx <kurt@roeckx.be>, Joern Heissler <debianbugs@joern.heissler.de>, Jurriaan <thunder7@xs4all.nl>, Frans Pop <elendil@planet.nl>, Stefano Zacchiroli <zack@debian.org>, Guillem Jover <guillem@debian.org>, 562535@bugs.debian.org
Subject: Re: Bug#562503: Bug#562518: zlib1g 1:1.2.3.4.dfsg-1 hangs(?)
Date: Fri, 1 Jan 2010 13:34:08 +0000
On Fri, Dec 25, 2009 at 03:05:13PM +0000, Mark Brown wrote:
> On Fri, Dec 25, 2009 at 11:33:05AM +0100, Lucas Nussbaum wrote:
> > If, in a clean minimal chroot, I install zlib1g from testing first, then
> > install man-db, it works fine.
> 
> > My guess is that it is related to the fixing of #301283.
> 
> As far as I can tell zlib is performing correctly here, the man-db
> process doing the decompression exits correctly having detected EOF and
> closed the file, then exits.  The read() that's spinning with zero bytes
> is certainly not a zlib one, it reads data in 16384 byte chunks but
> that's a read of 65535 bytes (and the man-db debug output says the
> process that's spinning is a manconv one.
> 
> That said, I can't immediately spot a problem in the man-db code and
> reverting the explict reporting of EOF in zlib makes man-db stop falling
> over so I'll upload a package just now.

Thanks to those who worked on tracking this down and mitigating it. I
was away over Christmas and so didn't see this report until today.

The core problem was zlib sometimes truncating output by reporting EOF
too early, which Mark fixed in 1:1.2.3.4.dfsg-3. This in turn exposed an
infinite loop bug in manconv when it sees an incomplete multibyte
character at the end of an input file. This only happened with multibyte
legacy encodings, hence why a number of people reported this happening
with Japanese pages.

I've uploaded a fix for this in man-db 2.5.6-5. Here are the upstream
changelog entries, for the record (I made a slight mistake in the first
attempt, caught during testing):

Fri Jan  1 13:26:21 GMT 2010  Colin Watson  <cjwatson@debian.org>

        * src/manconv.c (try_iconv): Only handle iconv errors when iconv
          returned -1.

Fri Jan  1 11:37:13 GMT 2010  Colin Watson  <cjwatson@debian.org>

        * src/manconv.c (try_iconv): Handle iconv errors when attempting to
          convert the last input encoding to UTF-8 (Debian bug #562503).
        * src/tests/manconv-3: Add test for this.
        * src/tests/Makefile.am (TESTS): Add manconv-3.

Mark, as far as I can see, you can drop the workaround in zlib
1:1.2.3.4.dfsg-2. The fix in 1:1.2.3.4.dfsg-3 is sufficient even without
the fix in man-db 2.5.6-5.

-- 
Colin Watson                                       [cjwatson@debian.org]




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sat, 30 Jan 2010 07:27:23 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Jan 14 01:02:56 2024; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.