All of lore.kernel.org
 help / color / mirror / Atom feed
From: наб <nabijaczleweli@nabijaczleweli.xyz>
To: Chris Hofstaedtler <zeha@debian.org>
Cc: 1003095@bugs.debian.org, util-linux@vger.kernel.org
Subject: Re: Bug#1003095: /usr/bin/script: hangs when child doesn't read input fast enough
Date: Tue, 4 Jan 2022 18:31:24 +0100	[thread overview]
Message-ID: <20220104173124.lv2fyxuxuvc34jdo@tarta.nabijaczleweli.xyz> (raw)
In-Reply-To: <20220104162454.3agbsfqfpvaxr5ny@percival.namespace.at>

[-- Attachment #1: Type: text/plain, Size: 1413 bytes --]

Control: tags -1 + upstream

On Tue, Jan 04, 2022 at 05:24:54PM +0100, Chris Hofstaedtler wrote:
> * наб <nabijaczleweli@nabijaczleweli.xyz> [220104 00:06]:
> > (This, at least, responds to ^\, but it also seems to function
> >  slightly differently. Also, this is a race and you're more
> >  likely to lose it under strace. The loopy thing seems
> >  like it's pretty good at hitting it 100% of the time.)
As an additional note, because it's a race, if you're using bash,
  script < some-photo.jpeg
also hangs, because setup takes long enough.

> 1) is this Debian-specific or already present upstream?
Debian doesn't patch script.c at all, so this is an upstream bug.

> 2) did this work with previous versions of util-linux?
The oldest one I fould from the site at Homepage: in d/control is
"util-linux-ng 2.13", dated 19.1.2012. It's much closer to the original
4.4BSD-Lite implementation and still forks twice. As expected, testing
reveals it does not have the bug.

Performing a simple manual bisect across the versions available therein
reveals that 2.25 is the first broken version. (Though, skimming the
source, with a slightly different code path (select(2)?), since it still
double-forks and is not so hard-stuck so as to be immune to ^\.)

The first version that does get hard-stuck (because it forks once
and only uses poll) is 2.27.

> Best,
> Chris
Best,
наб

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2022-01-04 17:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220103230422.syzm2ryzcixuhl7r@tarta.nabijaczleweli.xyz>
2022-01-04 16:24 ` Bug#1003095: /usr/bin/script: hangs when child doesn't read input fast enough Chris Hofstaedtler
2022-01-04 17:31   ` наб [this message]
2022-01-05 15:45     ` Karel Zak
2022-01-08 14:54     ` наб
2022-01-13 23:28       ` наб
2022-02-02 14:49         ` наб
2022-02-03 10:55           ` Karel Zak
2022-04-07 14:22             ` наб
2022-04-11 10:08         ` Karel Zak
2022-04-12 14:25           ` наб
2022-04-19 10:36             ` Karel Zak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220104173124.lv2fyxuxuvc34jdo@tarta.nabijaczleweli.xyz \
    --to=nabijaczleweli@nabijaczleweli.xyz \
    --cc=1003095@bugs.debian.org \
    --cc=util-linux@vger.kernel.org \
    --cc=zeha@debian.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.