package cups 1.5.0-8 failed to install/upgrade: ErrorMessage: subprocess installed post-installation script returned error exit status 1

Bug #860765 reported by Scanning
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cups (Ubuntu)
Fix Released
Low
Martin Pitt
Natty
Won't Fix
Undecided
Unassigned
Oneiric
Fix Released
Low
Martin Pitt

Bug Description

When updating

ProblemType: Package
DistroRelease: Ubuntu 11.10
Package: cups 1.5.0-8
ProcVersionSignature: Ubuntu 3.0.0-12.19-generic 3.0.4
Uname: Linux 3.0.0-12-generic x86_64
NonfreeKernelModules: fglrx
ApportVersion: 1.23-0ubuntu1
Architecture: amd64
CupsErrorLog:

Date: Tue Sep 27 19:38:19 2011
ErrorMessage: ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
Lpstat: Error: command ['lpstat', '-v'] failed with exit code 1: lpstat: Connection refused
MachineType: System manufacturer System Product Name
Papersize: a4
PpdFiles: Deskjet-F2200-series: HP Deskjet f2200 Series, hpcups 3.11.7
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.0.0-12-generic root=UUID=d24629c7-4942-4042-a27c-5b949e31cf39 ro quiet splash vt.handoff=7
SourcePackage: cups
Title: package cups 1.5.0-8 failed to install/upgrade: ErrorMessage: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: Upgraded to oneiric on 2011-09-27 (0 days ago)
dmi.bios.date: 11/16/2010
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 1101
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: M4A87TD EVO
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: Rev 1.xx
dmi.chassis.asset.tag: Asset-1234567890
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr1101:bd11/16/2010:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKComputerINC.:rnM4A87TDEVO:rvrRev1.xx:cvnChassisManufacture:ct3:cvrChassisVersion:
dmi.product.name: System Product Name
dmi.product.version: System Version
dmi.sys.vendor: System manufacturer

Revision history for this message
Scanning (jan-norrland) wrote :
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

pitti, as usual, whenever a new CUPS gets uploaded, an Upstart issue comes up ...

Revision history for this message
Martin Pitt (pitti) wrote :

Can you please download http://people.canonical.com/~pitti/tmp/cups.conf, install it with

  sudo cp cups.conf /etc/init/

and then do

  sudo stop cups
  sudo start cups

let it fail, and attach /tmp/log here? Thanks!

Changed in cups (Ubuntu):
status: New → Incomplete
Revision history for this message
Scanning (jan-norrland) wrote : Re: [Bug 860765] Re: package cups 1.5.0-8 failed to install/upgrade: ErrorMessage: subprocess installed post-installation script returned error exit status 1

+ [ -x /usr/sbin/cupsd ]
+ [ -r /etc/default/cups ]
+ . /etc/default/cups
+ LOAD_LP_MODULE=yes
+ [ yes = yes -a -f /usr/lib/cups/backend/parallel -a -f /proc/modules
-a -x /sbin/modprobe ]
+ modprobe -q -b lp
+ modprobe -q -b ppdev
+ modprobe -q -b parport_pc
+ mkdir -p /var/run/cups/certs
+ [ -x /lib/init/apparmor-profile-load ]
+ /lib/init/apparmor-profile-load usr.sbin.cupsd
+ timeout=6
+ [ ! -e /var/run/cups/cups.sock ]
+ sleep 0.5
+ timeout=5
+ [ 5 -eq 0 ]
+ [ ! -e /var/run/cups/cups.sock ]
+ sleep 0.5
+ timeout=4
+ [ 4 -eq 0 ]
+ [ ! -e /var/run/cups/cups.sock ]
+ sleep 0.5
+ timeout=3
+ [ 3 -eq 0 ]
+ [ ! -e /var/run/cups/cups.sock ]
+ sleep 0.5
+ timeout=2
+ [ 2 -eq 0 ]
+ [ ! -e /var/run/cups/cups.sock ]
+ sleep 0.5
+ timeout=1
+ [ 1 -eq 0 ]
+ [ ! -e /var/run/cups/cups.sock ]
+ sleep 0.5
+ timeout=0
+ [ 0 -eq 0 ]
+ echo cupsd failed to create /var/run/cups/cups.sock, skipping
automatic printer configuration
cupsd failed to create /var/run/cups/cups.sock, skipping automatic
printer configuration
+ exit 0

On 2011-09-28 06:32, Martin Pitt wrote:
> Can you please download
> http://people.canonical.com/~pitti/tmp/cups.conf, install it with
>
> sudo cp cups.conf /etc/init/
>
> and then do
>
> sudo stop cups
> sudo start cups
>
> let it fail, and attach /tmp/log here? Thanks!
>
> ** Changed in: cups (Ubuntu)
> Status: New => Incomplete
>

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks. Unfortunately this doesn't help us much. It showed that something in cups is wrong, it failed to start and create the /var/run/cups.sock socket, but it didn't fail with a nonzero exit code as it did in your original upgrade.

I tried to deliberately disable the socket in /etc/cups/cupsd.conf, and the upgrade still succeeds as expected.

Anyway, can you please attach /var/log/cups/error_log here? It might have the reason why it failed.

Revision history for this message
Scanning (jan-norrland) wrote :

if life was that simple, the error_log is a Zero byte file :)

Best regards / Jan

On 2011-09-28 11:15, Martin Pitt wrote:
> Thanks. Unfortunately this doesn't help us much. It showed that
> something in cups is wrong, it failed to start and create the
> /var/run/cups.sock socket, but it didn't fail with a nonzero exit code
> as it did in your original upgrade.
>
> I tried to deliberately disable the socket in /etc/cups/cupsd.conf, and
> the upgrade still succeeds as expected.
>
> Anyway, can you please attach /var/log/cups/error_log here? It might
> have the reason why it failed.
>

Revision history for this message
Martin Pitt (pitti) wrote :

It was worth a try :)

If you do "sudo cupsd -f", does that keep running, or fail immediately? If it's running, does "lpstat" and "lpstat -p" work?

Revision history for this message
Scanning (jan-norrland) wrote :

sudo cupsd -f gives
cupsd: error while loading shared libraries: libz.so.1: failed to map
segment from shared object: Permission denied

Strange, i have no power :P

On 2011-09-28 16:25, Martin Pitt wrote:
> It was worth a try :)
>
> If you do "sudo cupsd -f", does that keep running, or fail immediately?
> If it's running, does "lpstat" and "lpstat -p" work?
>

Revision history for this message
Martin Pitt (pitti) wrote :

Ah, now that's at least a proper error message now :-)

Looks like it's using a non-standard libz somewhere, I suspect this strange error message is due to the AppArmor profile. Can you please attach /var/log/kern.log after running "sudo cupsd -f", and give me the output of

  ldd /usr/sbin/cupsd

?

Revision history for this message
Scanning (jan-norrland) wrote :

sudo cupsd -f

Gives :

Sep 29 08:09:54 LOG-TRAF kernel: [27615.386783] type=1400
audit(1317276594.474:37): apparmor="DENIED" operation="file_mmap"
parent=8943 profile="/usr/sbin/cupsd"
name="/usr/local/lib/libz.so.1.2.5" pid=9049 comm="cupsd"
requested_mask="m" denied_mask="m" fsuid=0 ouid=0

and

ldd /usr/sbin/cupsd
     linux-vdso.so.1 => (0x00007fff4178b000)
     libcupsmime.so.1 => /usr/lib/x86_64-linux-gnu/libcupsmime.so.1
(0x00007f144496f000)
     libgnutls.so.26 => /usr/lib/x86_64-linux-gnu/libgnutls.so.26
(0x00007f14446c7000)
     libslp.so.1 => /usr/lib/libslp.so.1 (0x00007f14444b5000)
     libldap_r-2.4.so.2 => /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2
(0x00007f1444267000)
     libpam.so.0 => /lib/x86_64-linux-gnu/libpam.so.0 (0x00007f1444059000)
     libpaper.so.1 => /usr/lib/libpaper.so.1 (0x00007f1443e55000)
     libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3
(0x00007f1443c12000)
     libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
(0x00007f14439f5000)
     libavahi-common.so.3 =>
/usr/lib/x86_64-linux-gnu/libavahi-common.so.3 (0x00007f14437e6000)
     libavahi-client.so.3 =>
/usr/lib/x86_64-linux-gnu/libavahi-client.so.3 (0x00007f14435d3000)
     libcups.so.2 => /usr/lib/x86_64-linux-gnu/libcups.so.2
(0x00007f1443380000)
     libgssapi_krb5.so.2 =>
/usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007f1443141000)
     libkrb5.so.3 => /usr/lib/x86_64-linux-gnu/libkrb5.so.3
(0x00007f1442e78000)
     libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1442ad9000)
     libtasn1.so.3 => /usr/lib/x86_64-linux-gnu/libtasn1.so.3
(0x00007f14428c7000)
     libz.so.1 => /usr/local/lib/libz.so.1 (0x00007f14426ae000)
     libgcrypt.so.11 => /lib/x86_64-linux-gnu/libgcrypt.so.11
(0x00007f1442430000)
     libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00007f1442215000)
     libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2
(0x00007f1441ffa000)
     liblber-2.4.so.2 => /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2
(0x00007f1441dec000)
     libsasl2.so.2 => /usr/lib/x86_64-linux-gnu/libsasl2.so.2
(0x00007f1441bd0000)
     libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f14419cc000)
     librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f14417c4000)
     /lib64/ld-linux-x86-64.so.2 (0x00007f1444e03000)
     libk5crypto.so.3 => /usr/lib/x86_64-linux-gnu/libk5crypto.so.3
(0x00007f144159b000)
     libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2
(0x00007f1441397000)
     libkrb5support.so.0 =>
/usr/lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007f144118e000)
     libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1
(0x00007f1440f8b000)
     libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0
(0x00007f1440d86000)

Best regards / Jan

On 2011-09-29 06:29, Martin Pitt wrote:
> Ah, now that's at least a proper error message now :-)
>
> Looks like it's using a non-standard libz somewhere, I suspect this
> strange error message is due to the AppArmor profile. Can you please
> attach /var/log/kern.log after running "sudo cupsd -f", and give me the
> output of
>
> ldd /usr/sbin/cupsd
>
> ?
>

Revision history for this message
Martin Pitt (pitti) wrote :

Ah, there we go:

  name="/usr/local/lib/libz.so.1.2.5" pid=9049 comm="cupsd"

So you have a custom version of libz installed in /usr/local/, and the AppArmor profile does not allow that. I updated the profile in bzr to do so.

For now, you can run "sudo aa-complain cups" to disable apparmor if you want to keep the local library (you need the apparmor-utils package for this).

Changed in cups (Ubuntu):
importance: Undecided → Low
status: Incomplete → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Scanning, or anyone else affected,

Accepted cups into oneiric-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in cups (Ubuntu Natty):
status: New → Won't Fix
Changed in cups (Ubuntu Oneiric):
assignee: nobody → Martin Pitt (pitti)
tags: added: verification-needed
Revision history for this message
Scanning (jan-norrland) wrote : Re: [Bug 860765] Re: package cups 1.5.0-8 failed to install/upgrade: ErrorMessage: subprocess installed post-installation script returned error exit status 1

Big thanks, seams to be working great so far

Best regards

Jan

On 2011-10-09 10:46, Martin Pitt wrote:
> Hello Scanning, or anyone else affected,
>
> Accepted cups into oneiric-proposed, the package will build now and be
> available in a few hours. Please test and give feedback here. See
> https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to
> enable and use -proposed. Thank you in advance!
>
> ** Also affects: cups (Ubuntu Natty)
> Importance: Undecided
> Status: New
>
> ** Also affects: cups (Ubuntu Oneiric)
> Importance: Low
> Status: Fix Committed
>
> ** Changed in: cups (Ubuntu Natty)
> Status: New => Won't Fix
>
> ** Changed in: cups (Ubuntu Oneiric)
> Assignee: (unassigned) => Martin Pitt (pitti)
>
> ** Tags added: verification-needed
>

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cups - 1.5.0-8ubuntu1

---------------
cups (1.5.0-8ubuntu1) oneiric-proposed; urgency=low

  [ Till Kamppeter ]
  * debian/patches/cups-avahi.patch: Updated patch from upstream (Red Hat)
    to fix crashes of the CUPS daemon when using the timeout function call
    functionality (LP: #860691, LP: #860498).

  [ Martin Pitt ]
  * debian/local/apparmor-profile: Also allow cups to map libraries under
    /usr/local/. (LP: #860765)
 -- Till Kamppeter <email address hidden> Fri, 7 Oct 2011 17:01:43 +0200

Changed in cups (Ubuntu):
status: Fix Committed → Fix Released
Changed in cups (Ubuntu Oneiric):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.