From: Matt Z. <md...@de...> - 2002-03-16 17:28:39
|
And no sooner do I announce this than it breaks...debootstrap 0.1.17 just hit the archive, and rootstrap no longer works (though it does with 0.1.16.4). It looks like yet another race that only occurs under UML (debootstrap 0.1.17 works fine outside of UML) A very similar problem has always occurred when I tried to build potato systems with rootstrap, but I ignored it because I don't build potato images very often, and it's possible to work around the problem. This new incarnation, though, is very painful to work around. The old symptom (debootstrap 0.1.16.4 and potato installation) was that the installation would hang during the postinst of perl-5.005-base. A copy of that script is attached. If I strace the hung process inside UML (a shell), I get: write(1, "\n", 1) = -1 EPIPE (Broken pipe) --- SIGPIPE (Broken pipe) --- At which point strace exits, but the process does not. I can repeat this as many times as I like with the same result. If I send a SIGHUP to the process, everything continues on, and installation is successful. So I never bothered tracking it down. The new problem (debootstrap 0.1.17 and woody) manifests itself as a similar hang during configuration of base-files, which is the second package configured. strace inside UML produces suspiciously similar results: write(1, "\n", 1) = -1 EPIPE (Broken pipe) --- SIGPIPE (Broken pipe) --- The key seems to be that in 0.1.16.4, debootstrap runs "smallyes ''", where smallyes is a shell function: smallyes() { YES="${1-y}" while true ; do echo "$YES" ; done } and pipes the output into for dpkg --configure perl-5.005-base. debootstrap 0.1.17 does the equivalent for all packages. It appears to be this echo which I am seeing in strace above. I would think that after receiving SIGPIPE, the while loop would be broken, but it doesn't seem to happen that way, and the process goes on forever. Indeed, if I replace 'echo' (shell builtin) with /bin/echo, I get: /bin/echo: write error: Broken pipe after each package configuration, and installation continues, though much more slowly. This problem goes away if I replace my shell (ash) with bash, so I suspect this is an ash bug. I can't seem to reproduce it outside of UML, though. Any ideas? -- - mdz |