[Bug 828895] Re: Bash loses track of background children sometimes
Ben Harris
bjh21 at cam.ac.uk
Thu Apr 6 11:15:34 UTC 2017
Just a quick note: having moved some affected systems back to Ubuntu,
this bug has just manifested in production on Ubuntu 16.04 LTS:
/opt/dump/bin/dump_multi: line 11: wait: pid 56652 is not a child of
this shell
My test script above no longer demonstrates it though. I'll see if I
can come up with one that does.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/828895
Title:
Bash loses track of background children sometimes
Status in bash package in Ubuntu:
Confirmed
Bug description:
Under some circumstances (I've not worked out precisely what), bash
can forget about background child processes. For instance, if the
file "simpletest" contains:
#! /bin/bash
count=0
while [ $count -lt 51 ]; do
count=$((count+1))
/nonexist
true &
bgpids="$bgpids $!"
done
for pid in $bgpids; do
wait $pid
done
then running "bash simpletest", seems to reliably report "simpletest:
line 13: wait: pid 28850 is not a child of this shell" (with different
PIDs each time, obviously). Increasing the "51" in the script
increases the number of errors. Curiously, removing the call to a
nonexistent program causes the problem to stop manifesting.
"getconf CHILD_MAX" returns "undefined", which I think means that Bash
should support an unlimited number of unwaited children.
I've observed this on two different amd64 boxes running Ubuntu 10.04
LTS, and it persisted after I upgraded the bash package to
4.2-0ubuntu4. I couldn't reproduce it on an i386 box running Ubuntu
11.04.
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: bash 4.1-2ubuntu3
ProcVersionSignature: Ubuntu 2.6.32-33.72-server 2.6.32.41+drm33.18
Uname: Linux 2.6.32-33-server x86_64
Architecture: amd64
Date: Thu Aug 18 17:04:23 2011
InstallationMedia: Ubuntu-Server 10.04.3 LTS "Lucid Lynx" - Release amd64 (20110719.2)
ProcEnviron:
LANG=en_GB.UTF-8
SHELL=/bin/bash
SourcePackage: bash
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/828895/+subscriptions
More information about the foundations-bugs
mailing list