Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#597756: iconv: conversion stopped due to problem in writing the output

280 views
Skip to first unread message

Stephen Powell

unread,
Sep 22, 2010, 4:10:01 PM9/22/10
to
Package: eglibc
Version: 2.11.2-5

I'm not sure if this bug is in iconv itself or in another package which
calls iconv, but since I have discovered the problem in at least two
packages (bash and dash) I will report it against iconv and you may
reassign it as you see fit.

When looking at the man page for bash or dash, then quitting immediately
on the first screen by pressing q, I sometimes get the following error message:

iconv: conversion stopped due to problem in writing the output

But I can't seem to reproduce the problem consistently. Sometimes I
get the error, and sometimes I don't. I have yet to come up with a
scenario that always causes the failure symptoms.

--
.''`. Stephen Powell
: :' :
`. `'`
`-

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

Aurelien Jarno

unread,
Sep 23, 2010, 3:40:01 AM9/23/10
to
reassign 597756 man-db
thanks

Stephen Powell a écrit :


> Package: eglibc
> Version: 2.11.2-5
>
> I'm not sure if this bug is in iconv itself or in another package which
> calls iconv, but since I have discovered the problem in at least two
> packages (bash and dash) I will report it against iconv and you may
> reassign it as you see fit.
>
> When looking at the man page for bash or dash, then quitting immediately
> on the first screen by pressing q, I sometimes get the following error message:
>
> iconv: conversion stopped due to problem in writing the output
>
> But I can't seem to reproduce the problem consistently. Sometimes I
> get the error, and sometimes I don't. I have yet to come up with a
> scenario that always causes the failure symptoms.
>

This message is printed by iconv when data is sent for conversion on
stdin, and stdout is suddenly closed. This is not a problem of iconv,
thus reassigning the bug to man-db.

--
Aurelien Jarno GPG: 1024D/F1BCDB73
aure...@aurel32.net http://www.aurel32.net

Colin Watson

unread,
Dec 1, 2010, 8:10:02 PM12/1/10
to
On Thu, Sep 23, 2010 at 09:37:35AM +0200, Aurelien Jarno wrote:
> Stephen Powell a écrit :

> > I'm not sure if this bug is in iconv itself or in another package which
> > calls iconv, but since I have discovered the problem in at least two
> > packages (bash and dash) I will report it against iconv and you may
> > reassign it as you see fit.
> >
> > When looking at the man page for bash or dash, then quitting immediately
> > on the first screen by pressing q, I sometimes get the following error message:
> >
> > iconv: conversion stopped due to problem in writing the output
> >
> > But I can't seem to reproduce the problem consistently. Sometimes I
> > get the error, and sometimes I don't. I have yet to come up with a
> > scenario that always causes the failure symptoms.
>
> This message is printed by iconv when data is sent for conversion on
> stdin, and stdout is suddenly closed. This is not a problem of iconv,
> thus reassigning the bug to man-db.

It's more interesting than that. Normally, iconv should get SIGPIPE
when it tries to write to stdout and finds that it's been closed. In
normal circumstances that should kill iconv before it prints that
message.

My leading theory is that Stephen is hitting the format_display_and_save
path, which ignores SIGPIPE in the wrong place such that it could be
ignored while forking iconv. My secondary theory is that there is
something else funny about Stephen's environment such that SIGPIPE is
already ignored when starting man.

Stephen, can you reproduce this with 'man -d'? If so (or even if not),
the output could help me.

Also, can you reproduce this under 'strace -f -o man.trace -s 4096'? If
so (or even if not), man.trace could help me.

Thanks,

--
Colin Watson [cjwa...@debian.org]

Colin Watson

unread,
Jan 7, 2011, 7:00:01 PM1/7/11
to
user man...@packages.debian.org
usertags 597756 target-2.6.0
tags 597756 fixed-upstream
thanks

On Thu, Dec 02, 2010 at 12:58:15AM +0000, Colin Watson wrote:
> It's more interesting than that. Normally, iconv should get SIGPIPE
> when it tries to write to stdout and finds that it's been closed. In
> normal circumstances that should kill iconv before it prints that
> message.
>
> My leading theory is that Stephen is hitting the format_display_and_save
> path, which ignores SIGPIPE in the wrong place such that it could be
> ignored while forking iconv.

Based on this theory, I think I've fixed this bug for man-db 2.6.0.

Fri Jan 7 23:49:55 GMT 2011 Colin Watson <cjwa...@debian.org>

* src/man.c (format_display_and_save): Drop SIGPIPE handling.
pipeline_pump handles this itself, and doing it here means that
SIGPIPE is incorrectly ignored in subprocesses (Debian bug
#597756).

Cheers,

0 new messages