[Pkg-cups-devel] Bug#629419: lpadmin in postinst configure should timeout early

John Feuerstein john at feurix.com
Mon Jun 6 16:42:06 UTC 2011


Package: cups-pdf
Version: 2.5.1-3

I've installed "cups" and the "cups-pdf" packages using aptitude on 
current unstable. There was no previous cups configuration, none of 
these packages was installed earlier.

The installation worked out fine in the end, however, the following step 
took about 20 minutes without any output:

------------------------------------------------
Setting up cups-pdf (2.5.1-3) ...
Reloading Common Unix Printing System: cupsd.
*hang for about 20 minutes*
------------------------------------------------

I've traced this down to the multiple lpadmin(8) calls in 
"cups-pdf.postinst configure". Running this on the command-line:

$ sudo lpstat -h localhost -v

while the installation stalled resulted in the same behaviour. Running 
it under strace shows that it hangs while connecting:

connect(5, {sa_family=AF_INET, sin_port=htons(631), 
sin_addr=inet_addr("127.0.0.1")}, 16^C <unfinished ...>


So I suspect there is something wrong with cups-pdf's postinst. Perhaps 
there should be some check before even trying to run lpadmin, or there 
should be a sane timeout. Waiting 20 minutes without any feedback looks 
wrong?

On the other hand, this could be a problem in the way cups' or 
cups-pdf's dependencies are handled, or the order in which they are 
installed. This is why I'm attaching the full log. If you are unable to 
reproduce this, then I have no problem if you close the bug. In the end, 
everything works as expected. It's this silent accumulation of long 
timeouts which looks wrong here.

Hope this helps,
John


> john at lenovo:~$ sudo aptitude # selected "cups" and "cups-pdf" for install (interactively)
> Reading package fields... Done
> Reading package status... Done
> Retrieving bug reports... Done
> Parsing Found/Fixed information... Done
> grave bugs of cups-driver-gutenprint (-> 5.2.6-1) <forwarded>
>  #625925 - Uses incorrect path to default colour profile
> Summary:
>  cups-driver-gutenprint(1 bug)
> Are you sure you want to install/upgrade the above packages? [Y/n/?/...] y
> Extracting templates from packages: 100%
> Preconfiguring packages ...
> Selecting previously deselected package foomatic-filters.
> (Reading database ... 66203 files and directories currently installed.)
> Unpacking foomatic-filters (from .../foomatic-filters_4.0.7-1_amd64.deb) ...
> Selecting previously deselected package foomatic-db-engine.
> Unpacking foomatic-db-engine (from .../foomatic-db-engine_4.0.7-2_amd64.deb) ...
> Selecting previously deselected package bc.
> Unpacking bc (from .../bc_1.06.95-2_amd64.deb) ...
> Selecting previously deselected package libcap2.
> Unpacking libcap2 (from .../libcap2_1%3a2.21-1_amd64.deb) ...
> Selecting previously deselected package libgeoip1.
> Unpacking libgeoip1 (from .../libgeoip1_1.4.7+dfsg-2_amd64.deb) ...
> Selecting previously deselected package libisc62.
> Unpacking libisc62 (from .../libisc62_1%3a9.7.3.dfsg-1+b1_amd64.deb) ...
> Selecting previously deselected package libdns69.
> Unpacking libdns69 (from .../libdns69_1%3a9.7.3.dfsg-1+b1_amd64.deb) ...
> Selecting previously deselected package libisccc60.
> Unpacking libisccc60 (from .../libisccc60_1%3a9.7.3.dfsg-1+b1_amd64.deb) ...
> Selecting previously deselected package libisccfg62.
> Unpacking libisccfg62 (from .../libisccfg62_1%3a9.7.3.dfsg-1+b1_amd64.deb) ...
> Selecting previously deselected package libbind9-60.
> Unpacking libbind9-60 (from .../libbind9-60_1%3a9.7.3.dfsg-1+b1_amd64.deb) ...
> Selecting previously deselected package liblwres60.
> Unpacking liblwres60 (from .../liblwres60_1%3a9.7.3.dfsg-1+b1_amd64.deb) ...
> Selecting previously deselected package bind9-host.
> Unpacking bind9-host (from .../bind9-host_1%3a9.7.3.dfsg-1+b1_amd64.deb) ...
> Selecting previously deselected package libavahi-core7.
> Unpacking libavahi-core7 (from .../libavahi-core7_0.6.30-3_amd64.deb) ...
> Selecting previously deselected package libdaemon0.
> Unpacking libdaemon0 (from .../libdaemon0_0.14-2_amd64.deb) ...
> Selecting previously deselected package avahi-daemon.
> Unpacking avahi-daemon (from .../avahi-daemon_0.6.30-3_amd64.deb) ...
> Selecting previously deselected package libcupscgi1.
> Unpacking libcupscgi1 (from .../libcupscgi1_1.4.6-6_amd64.deb) ...
> Selecting previously deselected package libcupsdriver1.
> Unpacking libcupsdriver1 (from .../libcupsdriver1_1.4.6-6_amd64.deb) ...
> Selecting previously deselected package libcupsmime1.
> Unpacking libcupsmime1 (from .../libcupsmime1_1.4.6-6_amd64.deb) ...
> Selecting previously deselected package libcupsppdc1.
> Unpacking libcupsppdc1 (from .../libcupsppdc1_1.4.6-6_amd64.deb) ...
> Selecting previously deselected package libslp1.
> Unpacking libslp1 (from .../libslp1_1.2.1-7.8_amd64.deb) ...
> Selecting previously deselected package poppler-utils.
> Unpacking poppler-utils (from .../poppler-utils_0.12.4-1.2_amd64.deb) ...
> Selecting previously deselected package cups-common.
> Unpacking cups-common (from .../cups-common_1.4.6-6_all.deb) ...
> Selecting previously deselected package cups-client.
> Unpacking cups-client (from .../cups-client_1.4.6-6_amd64.deb) ...
> Selecting previously deselected package ssl-cert.
> Unpacking ssl-cert (from .../ssl-cert_1.0.28_all.deb) ...
> Selecting previously deselected package ttf-freefont.
> Unpacking ttf-freefont (from .../ttf-freefont_20100919-1_all.deb) ...
> Selecting previously deselected package cups-ppdc.
> Unpacking cups-ppdc (from .../cups-ppdc_1.4.6-6_amd64.deb) ...
> Selecting previously deselected package cups.
> Unpacking cups (from .../cups_1.4.6-6_amd64.deb) ...
> Selecting previously deselected package libgutenprint2.
> Unpacking libgutenprint2 (from .../libgutenprint2_5.2.6-1_amd64.deb) ...
> Selecting previously deselected package ghostscript-cups.
> Unpacking ghostscript-cups (from .../ghostscript-cups_9.02~dfsg-2_amd64.deb) ...
> Selecting previously deselected package cups-driver-gutenprint.
> Unpacking cups-driver-gutenprint (from .../cups-driver-gutenprint_5.2.6-1_amd64.deb) ...
> Selecting previously deselected package cups-pdf.
> Unpacking cups-pdf (from .../cups-pdf_2.5.1-3_amd64.deb) ...
> Selecting previously deselected package foomatic-db-compressed-ppds.
> Unpacking foomatic-db-compressed-ppds (from .../foomatic-db-compressed-ppds_20110520-1_all.deb) ...
> Selecting previously deselected package geoip-database.
> Unpacking geoip-database (from .../geoip-database_20110505-1_all.deb) ...
> Selecting previously deselected package libsnmp-base.
> Unpacking libsnmp-base (from .../libsnmp-base_5.4.3~dfsg-2.2_all.deb) ...
> Selecting previously deselected package libsnmp15.
> Unpacking libsnmp15 (from .../libsnmp15_5.4.3~dfsg-2.2_amd64.deb) ...
> Selecting previously deselected package libhpmud0.
> Unpacking libhpmud0 (from .../libhpmud0_3.11.5-1_amd64.deb) ...
> Selecting previously deselected package hpijs.
> Unpacking hpijs (from .../hpijs_3.11.5-1_amd64.deb) ...
> Selecting previously deselected package libnss-mdns.
> Unpacking libnss-mdns (from .../libnss-mdns_0.10-3.1_amd64.deb) ...
> Selecting previously deselected package libtalloc2.
> Unpacking libtalloc2 (from .../libtalloc2_2.0.5-1_amd64.deb) ...
> Selecting previously deselected package libwbclient0.
> Unpacking libwbclient0 (from .../libwbclient0_2%3a3.5.8~dfsg-5_amd64.deb) ...
> Selecting previously deselected package min12xxw.
> Unpacking min12xxw (from .../min12xxw_0.0.9-4_amd64.deb) ...
> Selecting previously deselected package pnm2ppa.
> Unpacking pnm2ppa (from .../pnm2ppa_1.13-2_amd64.deb) ...
> Selecting previously deselected package samba-common.
> Unpacking samba-common (from .../samba-common_2%3a3.5.8~dfsg-5_all.deb) ...
> Selecting previously deselected package samba-common-bin.
> Unpacking samba-common-bin (from .../samba-common-bin_2%3a3.5.8~dfsg-5_amd64.deb) ...
> Selecting previously deselected package smbclient.
> Unpacking smbclient (from .../smbclient_2%3a3.5.8~dfsg-5_amd64.deb) ...
> Processing triggers for man-db ...
> Processing triggers for install-info ...
> Processing triggers for fontconfig ...
> Setting up foomatic-filters (4.0.7-1) ...
> Creating config file /etc/foomatic/filter.conf with new version
> Setting up foomatic-db-engine (4.0.7-2) ...
> Setting up bc (1.06.95-2) ...
> Setting up libcap2 (1:2.21-1) ...
> Setting up libgeoip1 (1.4.7+dfsg-2) ...
> Setting up libisc62 (1:9.7.3.dfsg-1+b1) ...
> Setting up libdns69 (1:9.7.3.dfsg-1+b1) ...
> Setting up libisccc60 (1:9.7.3.dfsg-1+b1) ...
> Setting up libisccfg62 (1:9.7.3.dfsg-1+b1) ...
> Setting up libbind9-60 (1:9.7.3.dfsg-1+b1) ...
> Setting up liblwres60 (1:9.7.3.dfsg-1+b1) ...
> Setting up bind9-host (1:9.7.3.dfsg-1+b1) ...
> Setting up libavahi-core7 (0.6.30-3) ...
> Setting up libdaemon0 (0.14-2) ...
> Setting up avahi-daemon (0.6.30-3) ...
> Reloading system message bus config...done.
> Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
> Setting up libcupscgi1 (1.4.6-6) ...
> Setting up libcupsdriver1 (1.4.6-6) ...
> Setting up libcupsmime1 (1.4.6-6) ...
> Setting up libcupsppdc1 (1.4.6-6) ...
> Setting up libslp1 (1.2.1-7.8) ...
> Setting up poppler-utils (0.12.4-1.2) ...
> Setting up cups-common (1.4.6-6) ...
> Setting up cups-client (1.4.6-6) ...
> Adding group `lpadmin' (GID 110) ...
> Done.
> Setting up ssl-cert (1.0.28) ...
> Setting up ttf-freefont (20100919-1) ...
> Setting up cups-ppdc (1.4.6-6) ...
> Setting up cups (1.4.6-6) ...
> Starting Common Unix Printing System: cupsd.
> Setting up libgutenprint2 (5.2.6-1) ...
> Setting up ghostscript-cups (9.02~dfsg-2) ...
> Setting up cups-driver-gutenprint (5.2.6-1) ...
> No Gutenprint PPD files to update.
> Reloading Common Unix Printing System: cupsd.
> lpstat: No destinations added.
> Setting up cups-pdf (2.5.1-3) ...
> Reloading Common Unix Printing System: cupsd.

--- HANGS HERE FOR 20 MINUTES ---

> Setting up foomatic-db-compressed-ppds (20110520-1) ...
> Setting up geoip-database (20110505-1) ...
> Setting up libsnmp-base (5.4.3~dfsg-2.2) ...
> Setting up libsnmp15 (5.4.3~dfsg-2.2) ...
> Setting up libhpmud0 (3.11.5-1) ...
> Setting up hpijs (3.11.5-1) ...
> Setting up libnss-mdns (0.10-3.1) ...
> First installation detected...
> Checking NSS setup...
> Setting up libtalloc2 (2.0.5-1) ...
> Setting up libwbclient0 (2:3.5.8~dfsg-5) ...
> Setting up min12xxw (0.0.9-4) ...
> Setting up pnm2ppa (1.13-2) ...
> Setting up samba-common (2:3.5.8~dfsg-5) ...
> Creating config file /etc/samba/smb.conf with new version
> Setting up samba-common-bin (2:3.5.8~dfsg-5) ...
> update-alternatives: using /usr/bin/nmblookup.samba3 to provide /usr/bin/nmblookup (nmblookup) in auto mode.
> update-alternatives: using /usr/bin/net.samba3 to provide /usr/bin/net (net) in auto mode.
> update-alternatives: using /usr/bin/testparm.samba3 to provide /usr/bin/testparm (testparm) in auto mode.
> Setting up smbclient (2:3.5.8~dfsg-5) ...
> Press return to continue.





More information about the Pkg-cups-devel mailing list