Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15870 > unrolled thread

Re: Bizarre interaction bug involving bash w/ lastpipe + Almquist 'wait'

Started byRobert Elz <kre@munnari.OZ.AU>
First post2020-02-07 03:43 +0700
Last post2020-02-07 03:43 +0700
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Bizarre interaction bug involving bash w/ lastpipe + Almquist 'wait' Robert Elz <kre@munnari.OZ.AU> - 2020-02-07 03:43 +0700

#15870 — Re: Bizarre interaction bug involving bash w/ lastpipe + Almquist 'wait'

FromRobert Elz <kre@munnari.OZ.AU>
Date2020-02-07 03:43 +0700
SubjectRe: Bizarre interaction bug involving bash w/ lastpipe + Almquist 'wait'
Message-ID<mailman.391.1581022934.2412.bug-bash@gnu.org>
    Date:        Thu, 6 Feb 2020 19:29:41 +0000
    From:        Harald van Dijk <harald@gigawatt.nl>
    Message-ID:  <f8b210f5-dd59-2c7f-05d4-be0a89316d3d@gigawatt.nl>

  | Nice test.

Yes!

  | and the various ash-based shells do not unblock it.

We do now, the fix for that will be in 9.0 when it is released.
("now" as in as of the past half hour...)

  | Because of that, 
  | they do not pick up on the fact that the child process has terminated.

It was actually a race condition, for me it 'worked' about half the time
(seems to depend whether the wait happens in the parent before or after
the sub-process exits).

kre

ps: that core dump was an "impossible to happen" condition that this
actually made happen, that will be fixed as well, both by actually now
making it impossible like it was supposed to be (by not blocking or
ignoring SIGCHLD, ever) and by testing for it happening anyway...

The secondary fix for that one is still to be committed after I investigate
some more - I know what happened, just need to make sure what will happen
now if this situation which should never occur ever does happen again.

That the 8.1 NetBSD sh seems to work is more just an artifact of how
it runs the race I believe (or guess) - the wait & process invocation code
has changed a lot in 9 (well, 9.0RC2 for now) which seems to have made the
race a close call, instead of one sided.   But that was not an artifact of
the environment for the test, it happens for me on a real -8(ish) type
system as well.

kre

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web