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  <cjwat...@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  <cjwat...@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                                       [cjwat...@debian.org]



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to