postinst using both update-inetd and debconf hangs on first install
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
approx (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Lucid |
Invalid
|
Undecided
|
Unassigned | ||
Maverick |
Invalid
|
Undecided
|
Unassigned | ||
cernlib (Debian) |
Fix Released
|
Unknown
|
|||
cernlib (Ubuntu) |
Invalid
|
Low
|
Unassigned | ||
Lucid |
Invalid
|
Undecided
|
Unassigned | ||
Maverick |
Invalid
|
Undecided
|
Unassigned | ||
update-inetd (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Lucid |
Fix Released
|
Undecided
|
Unassigned | ||
Maverick |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: cernlib
update-inetd's Perl module will start, stop, or restart the installed inetd as appropriate, by calling "invoke-rc.d $service $action". However, if a postinst calling update-inetd is also using the debconf shell script module, it will have an open fd 3 which it uses to communicate with debconf.
openbsd-inetd, at least, doesn't clean up file descriptors when it starts, meaning it keeps the fd 3 which was opened by the shell script, then passed to update-inetd, then passed to invoke-rc.d, then passed to inetd.
The debconf frontend waits for that fd to close to indicate that the postinst is finished running. Since inetd has the fd open forever, that doesn't happen, and the postinst hangs.
IMPACT: Installing a package that uses update-intd and debconf when inetd previously had no jobs configured will hang.
DEVELOPMENT: This was fixed in update-inetd 4.37 by having update-inetd's Perl module explicitly close fd 3 when it starts inetd.
PATCH: Available in the associated branches (~broder/
INSTRUCTIONS:
1. Make sure that inetd is stopped, and has no services configured.
2. Install pawserv or approx or any package that uses both inetd and debconf.
3. Observe hang (or hopefully lack thereof)
REGRESSION: Should be limited. The diff adds several lines of explanatory comments, but only changes one line of code in a pretty straightforward way.
========
Old summary: package pawserv 2006.dfsg.
Old description [changed by broder]:
During postinst 'pawserv.postinst' become a zombie process - further installation/
ProblemType: Package
DistroRelease: Ubuntu 10.04
Package: pawserv 2006.dfsg.
ProcVersionSign
Uname: Linux 2.6.32-23-generic x86_64
NonfreeKernelMo
Architecture: amd64
Date: Mon Jul 5 02:25:10 2010
ErrorMessage: subprocess installed post-installation script killed by signal (Terminated)
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
SourcePackage: cernlib
Title: package pawserv 2006.dfsg.
Related branches
- Ubuntu Development Team: Pending requested
-
Diff: 33 lines (+14/-1)2 files modifiedDebianNet.pm (+7/-1)
debian/changelog (+7/-0)
- Dave Walker (community): Approve
-
Diff: 33 lines (+14/-1)2 files modifiedDebianNet.pm (+7/-1)
debian/changelog (+7/-0)
Changed in cernlib (Debian): | |
status: | Unknown → New |
description: | updated |
description: | updated |
summary: |
- package pawserv 2006.dfsg.2-14ubuntu2 failed to install/upgrade: - postinst hang in /usr/bin/perl -w /usr/share/debconf/frontend - /var/lib/dpkg/info/pawserv.postinst configure + postinst using both update-inetd and debconf hangs on first install |
description: | updated |
Changed in cernlib (Debian): | |
status: | New → Fix Released |
Thanks for your report.
I can reproduce it but only on the first installation of the package. The running processes at the time of the hang were: gfortran libpacklib1- gfortran pawserv debconf/ frontend /var/lib/ dpkg/info/ pawserv. postinst configure
root 13761 0.0 1.3 9832 6784 pts/5 Ss+ 11:14 0:00 /usr/bin/dpkg --status-fd 30 --configure cernlib-base libgfortran3 libkernlib1-
root 13777 0.1 1.7 11980 8832 pts/5 S+ 11:14 0:00 /usr/bin/perl -w /usr/share/
root 13784 0.0 0.0 0 0 pts/5 Z+ 11:14 0:00 [pawserv.postins] <defunct>
This could be a problem with debconf. killing the perl process and running the install again allow to install the package.
Purging and reinstalling the package doesn't reproduce the issue.