[Debconf-devel] Bug#439763: Bug#439763: debconf: hangs on puppet installs on preseed install

Colin Watson cjwatson at debian.org
Tue Dec 18 17:16:03 UTC 2007


[Sorry for the delay in replying to this.]

On Mon, Aug 27, 2007 at 10:42:41AM +0100, Adrian Bridgett wrote:
> (Mostly cloned from #425397 at the request of Joey Hess.  I've been
> running puppet in the d-i/late-command part of the install to get these
> problems, if it helps I'll try and trim it down (I suspect a preseeded
> postfix install might be sufficient))
> 
> I'm using puppet at the end of a preseeded install and some packages
> keep hanging (sysstat and postfix namely).  I suspect it's the
> preseeding that's causing the problem.  
> 
> What I see is dpkg-preconfigure running /tmp/postfix.config.12345
> (sometimes with a zombie'd process in the middle).  dpkg-preconfigure
> is reading from FD8 (which is FD1 from the postfix.config),  the
> postfix-config in turn is reading from FD0 (which is FD7 from the
> dpkg-preconfigure).  Deadlock ensues :-(

I'm not entirely sure that this is the same thing (I'd probably need to
peruse a full strace -f -s 4096 or so to be sure), but I wonder if this
might be related to
https://bugs.launchpad.net/ubuntu/+source/tasksel/+bug/141601, which
Søren Hansen tracked down to a debconf-apt-progress bug recently. Could
you possibly try r2249 from debconf's Subversion repository? I've
attached the patch for your convenience.

postfix spawns a daemon from its postinst but I don't think sysstat does
(however, it does do other weird stuff from its postinst). Thus, it
would be particularly interesting if this patch fixed one but not the
other.

> When postfix.config runs /usr/share/debconf/confmodules, at line 45 it
> complains that FD3 is a bad file descriptor.  Listing /proc/$$/fd
> shows that FD3 doesn't exist.  FD2 points to the overall stderr, FD1
> is a pipe back to FD8 of dpkg-preconfigure.  FD0 is FD7 from
> dpkg-preconfigure.
> 
> FD3 exists and DEBCONF_REDIR is set when ConfModule::startup() is
> called, however it looks like FD3 does not persist into the open2()
> call.

On the other hand, it might be something completely different. I note
that both sysstat and postfix call db_stop. I don't think this should
actually break the cdebconf instance way down at the bottom of the
stack, but it's possible that it will confuse the debconf running
debconf-apt-progress. If you could run the whole install under
DEBCONF_DEBUG=developer (you did something like this earlier), then this
might shed some light on exactly which debconf frontend is seeing what
commands.

> As a gross hack workaround (which might break god knows what else)
> I've edited /usr/share/debconf/confmodule to unset DEBCONF_REDIR if
> /proc/$$/fd/3 does not exist.

I'm, er, not exactly sure what that will do. :-) I think I'd rather
figure out the underlying problem. It may be that we need to ignore
db_stop in some circumstances.

Cheers,

-- 
Colin Watson                                       [cjwatson at debian.org]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debconf.2249.patch
Type: text/x-diff
Size: 1496 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/debconf-devel/attachments/20071218/b4c1b68e/attachment.patch 


More information about the Debconf-devel mailing list