Control: clone -1 -2 Control: reassign -2 apt/1.0.9.4 Control: tag -2 - patch Control: retitle -2 apt-get: improper tty handling, causes dpkg zombies if STDIN is a pipe Control: block -1 by -2
Hi again, Axel Beckert wrote: > > → echo bar > /tmp/bar.txt > > → bash -c 'echo foo | cat -v < /tmp/bar.txt' > > bar > > → dash -c 'echo foo | cat -v < /tmp/bar.txt' > > bar > > > > i.e. the initial "yes '' |" in the patch would be ignored. > > > > Need to dig deeper... > > Digging deeper revealed two things: > > 1) The above simplification is too simple. It does not take into > account that the tool in the middle may fiddle around with file > descriptors and pseudo ttys besides plain STDIN/STDOUT handling as > "cat" does. Maybe not. Maybe the reason why we initially added the "yes '' |" is gone and dpkg handles existing conffiles upon first installation properly according to --force-conf{old,def} now -- although I haven't found anything in that direction in dpkg's changelog. > 2) I now know that the trigger for these issues wasn't the dpkg > 1.17.13 → 1.17.21 update, but the apt 1.0.9.3 → 1.0.9.4 update. > Downgrading apt to 1.0.9.3 makes the issue vanish. > > I suspect that either the fix for https://bugs.debian.org/767774 or > the one for https://bugs.debian.org/765687 are the actual culprit. I've now also checked if the patch at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=772641#10 solves this issue, but it doesn't. Steps how to reproduce this with pure apt-get (including APT binaries and libraries with the above mentioned patch): # dpkg --purge less # yes '' | apt-get install -y less This will hang with a dpkg zombie child process after outputing a bunch of blank lines to the terminal. (If you use any other parameter than '' that one will be printed instead of the blank lines.) I can make apt-get continue (and the zombie to vanish) after a few seconds if I "cat" the /dev/pts/<somenumber> which has been opened by apt-get. The "yes '' |" is supposed to answer potential dpkg conffile or debconf critical questions, but imagine someone wants to pipe a deliberately chosen set of answers into apt-get. (I also know that there is --force-conf{old,def} for dpkg, but at least with older dpkg versions (either Wheezy or Squeeze) there were cases (see above) where --force-conf{old,def} didn't suffice.) Regards, Axel -- ,''`. | Axel Beckert <a...@debian.org>, http://people.debian.org/~abe/ : :' : | Debian Developer, ftp.ch.debian.org Admin `. `' | 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE `- | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5 -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org