cupsd: Child exited on signal 6

Bug #335898 reported by David Rekowski
38
This bug affects 4 people
Affects Status Importance Assigned to Milestone
cups (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Binary package hint: cups

Ubuntu 9.04 Jaunty
cups version 1.3.9-14ubuntu2

Cups fails to start via
$ sudo /etc/init.d/cups start
as well as via
$ sudo cupsd

output in /var/log/messages:
Feb 28 17:17:21 my-hostname kernel: [19909.891937] type=1503 audit(1235837841.111:50): operation="sysctl" requested_mask="r::" denied_mask="r::" fsuid=0 name="/proc/sys/crypto/fips_enabled" pid=13142 profile="/usr/sbin/cupsd"

Causes printers to not being available nor configurable.

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Try to reinstall libgcrypt11 package:

$ sudo apt-get --reinstall install libgcrypt

Revision history for this message
David Rekowski (david-rekowski) wrote :

For some reason, libgcrypt was 1.4.3 instead of the current 1.4.1. Changing to that version helped as cups can now be started.
Just for the sake of completeness, 11 is part of the package name, so it has to be:

$ sudo apt-get --reinstall install libgcrypt11

Changed in cups (Ubuntu):
status: New → Invalid
Revision history for this message
Matteo Bertini (naufraghi) wrote :

matteo@focault:~$ sudo /etc/init.d/cups restart
 * Restarting Common Unix Printing System: cupsd
cupsd: Child exited on signal 6!

matteo@focault:~$ sudo tail -f /var/log/messages
Apr 18 13:30:16 focault kernel: [ 7661.846831] type=1503 audit(1240054216.044:25): operation="sysctl" requested_mask="r::" denied_mask="r::" fsuid=0 name="/proc/sys/crypto/fips_enabled" pid=18394 profile="/usr/sbin/cupsd"

Revision history for this message
Matteo Bertini (naufraghi) wrote :

matteo@focault:~$ sudo apt-get --reinstall install libgcrypt11
Lettura della lista dei pacchetti in corso... Fatto
Generazione dell'albero delle dipendenze in corso
Lettura informazioni sullo stato... Fatto
La reinstallazione di libgcrypt11 non è possibile, non può essere scaricato.
0 aggiornati, 0 installati, 0 da rimuovere e 10 non aggiornati.

unable to install libgcrypt11, impossible to download.

Changed in cups (Ubuntu):
status: Invalid → Incomplete
Revision history for this message
David Rekowski (david-rekowski) wrote :

For some reasons, during the alpha phase, there was a newer version of libgcrypt11 installed. Thus, you have to force a version. I don't know how to do so on commandline, but with synaptic Package -> force Version or Ctrl+E should work. Select the jaunty one in the dialog that appears, should be 1.4.1-2

Revision history for this message
hoganrobert (robert-roberthogan) wrote :

robert@mwenge:~$ sudo apt-get --reinstall install libgcrypt11
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 12 not upgraded.
Need to get 0B/232kB of archives.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]? y
(Reading database ... 197615 files and directories currently installed.)
Preparing to replace libgcrypt11 1.4.1-2ubuntu1 (using .../libgcrypt11_1.4.1-2ubuntu1_i386.deb) ...
Unpacking replacement libgcrypt11 ...
Setting up libgcrypt11 (1.4.1-2ubuntu1) ...

Processing triggers for libc6 ...
ldconfig deferred processing now taking place
robert@mwenge:~$ sudo /etc/init.d/cups restart
 * Restarting Common Unix Printing System: cupsdcupsd: Child exited on signal 6!
                                                                           [fail]

So the workaround doesn't work for me. Any thoughts?

Revision history for this message
Lutz (skandal) wrote :

Could be an AppArmor issue. Try

sudo aa-complain cupsd
sudo /etc/init.d/cups restart

Revision history for this message
andon (andonsmith) wrote :

I was having the same problem, i'm not sure what that command did but it fixed it for me.
I'll restart when i'm done and see if the problem returns.

Changed in cups (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
hoganrobert (robert-roberthogan) wrote :

I had the same problem and Lutz's advice fixed it for me. I think if this bug is going to be closed the person should close it with a link to the corresponding bug for apparmor so the tracking can move there. This was a genuine issue experienced by a number of people when upgrading to jaunty. It is certainly not 'invalid'.

Changed in cups (Ubuntu):
status: Invalid → New
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Everyone for whom the instructions in Lutz' comment helped, please attach your /var/log/syslog file. Especially all lines containing "audit" are important.

Revision history for this message
hoganrobert (robert-roberthogan) wrote :

here you go!

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

hoganrobert, your system is using a libgcrypt library which does not come from Ubuntu. For this the AppArmor configuration for CUPS is not prepared. The config file is /etc/apparmor.d/usr.sbin.cupsd. Please restart AppArmor if you modify this file.

Revision history for this message
hoganrobert (robert-roberthogan) wrote :

Hi Till,

Ah I see! Cupsd is linking against that local libgcrypt installation:

robert@mwenge:~$ ldd /usr/sbin/cupsd
<snip>
        libgcrypt.so.11 => /usr/local/lib/libgcrypt.so.11 (0xb7a7c000)
<snip>

Well I guess that's the sort of thing apparmor should protect against, so it's only doing its job. But how should ubuntu really handle this? I installed that library before upgrading, many moons ago, and cupsd continued working merrily so was completely puzzled by this. Oh well - clearly a corner case so 'invalid' is probably a fair call.

Thanks for the enlightenment!

Revision history for this message
genell (anders-genell) wrote :

I had the same problem, and was helped by Lutz.
syslog attached

/genell

Martin Pitt (pitti)
Changed in cups (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → High
status: New → In Progress
tags: added: regression-potential
Revision history for this message
Justin Chudgar (justinzane) wrote :

This started, for me, after an upgrade to Karmic. When I try the apparmor fix, I get the following:

root@justin-mininote:~# aa-complain cupsd
Setting /etc/apparmor.d/usr.sbin.cupsd to complain mode.
Warning: unable to find a suitable fs in /proc/mounts, is it mounted?
Use --subdomainfs to override.

The subdomainfs switch does not help. When looking through the syslog, I see that apparmor fails to start. Why this should affect cups, I know not. However, cups is critical to me. Apparmor I'll risk living without if need be.

Martin Pitt (pitti)
summary: - cupsd: Child exited on signal 6!
+ cupsd: Child exited on signal 6! (AppArmor violation)
Revision history for this message
Justin Chudgar (justinzane) wrote : Re: cupsd: Child exited on signal 6! (AppArmor violation)
Download full text (8.1 KiB)

After the latest upgrade to cups from Karmic:

Setting up cups (1.3.10-3) ...
 * Starting AppArmor * Loading AppArmor module... [fail]
invoke-rc.d: initscript apparmor, action "force-reload" failed.
 * Starting Common Unix Printing System: cupsd cupsd: Child exited on signal 6!
                                                                                                                                                      [fail]
*** stack smashing detected ***: lpstat terminated
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0x9d1038]
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x0)[0x9d0ff0]
/lib/libgcrypt.so.11[0x6654a4]
/lib/libgcrypt.so.11[0x65cd14]
[0x0]
======= Memory map: ========
00110000-00125000 r-xp 00000000 08:01 2959950 /lib/tls/i686/cmov/libpthread-2.9.so
00125000-00126000 r--p 00014000 08:01 2959950 /lib/tls/i686/cmov/libpthread-2.9.so
00126000-00127000 rw-p 00015000 08:01 2959950 /lib/tls/i686/cmov/libpthread-2.9.so
00127000-00129000 rw-p 00000000 00:00 0
00129000-001d5000 r-xp 00000000 08:01 1550119 /usr/lib/libkrb5.so.3.3
001d5000-001da000 r--p 000ac000 08:01 1550119 /usr/lib/libkrb5.so.3.3 ...

Read more...

Martin Pitt (pitti)
Changed in cups (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cups - 1.3.10-4

---------------
cups (1.3.10-4) unstable; urgency=low

  * Add ghostscript-cups dependency. (LP: #385606)
  * debian/control: Add back dropped comma, which led to the ssl-cert
    dependency being dropped. (Closes: #532845)
  * debian/local/apparmor-profile: Allow reading /proc/sys/crypto/**.
    (LP: #335898)
  * debian/local/apparmor-profile: Allow dac_override to cups-pdf. This is
    unfortunate, but required with some $HOME permissions; the profile is very
    tight, so this shouldn't actually considerably increase privileges.
    (LP: #224365)

 -- Martin Pitt <email address hidden> Fri, 12 Jun 2009 11:32:28 +0200

Changed in cups (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Justin Chudgar (justinzane) wrote :
Download full text (28.2 KiB)

Unfortunately, not fixed for me:

root@justin-mininote:~# apt-get dist-upgrade -V
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
   lxpanel (0.3.8.1-2 => 0.4.1+svn20090524-1)
The following packages will be upgraded:
   apport (1.3-0ubuntu1 => 1.3-0ubuntu2)
   cups (1.3.10-3 => 1.3.10-4)
   cups-bsd (1.3.10-3 => 1.3.10-4)
   cups-client (1.3.10-3 => 1.3.10-4)
   cups-common (1.3.10-3 => 1.3.10-4)
   cupsys (1.3.10-3 => 1.3.10-4)
   cupsys-bsd (1.3.10-3 => 1.3.10-4)
   cupsys-client (1.3.10-3 => 1.3.10-4)
   cupsys-common (1.3.10-3 => 1.3.10-4)
   dnsmasq-base (2.48-2 => 2.49-1)
   finger (0.17-12 => 0.17-13)
   gnome-doc-utils (0.16.1-0ubuntu1 => 0.16.1-1ubuntu1)
   inkscape (0.46-5ubuntu4 => 0.46-9ubuntu1)
   libapr1 (1.3.4-1 => 1.3.5-1)
   libbeecrypt6 (4.1.2-7 => 4.1.2-8)
   libcups2 (1.3.10-3 => 1.3.10-4)
   libcups2-dev (1.3.10-3 => 1.3.10-4)
   libcupsimage2 (1.3.10-3 => 1.3.10-4)
   libcupsys2 (1.3.10-3 => 1.3.10-4)
   libidn11 (1.14-3 => 1.15-1)
   libksba8 (1.0.5-1 => 1.0.6-1)
   libtext-wrapi18n-perl (0.06-6 => 0.06-7)
   libxpm-dev (3.5.7-1build1 => 3.5.7-2)
   libxpm4 (3.5.7-1build1 => 3.5.7-2)
   openvpn-blacklist (0.3 => 0.4)
   python-apport (1.3-0ubuntu1 => 1.3-0ubuntu2)
   python-problem-report (1.3-0ubuntu1 => 1.3-0ubuntu2)
   tzdata (2009h-1 => 2009i-0ubuntu1)
   tzdata-java (2009h-1 => 2009i-0ubuntu1)
29 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Need to get 0B/21.9MB of archives.
After this operation, 524kB of additional disk space will be used.
Do you want to continue [Y/n]?
Preconfiguring packages ...
(Reading database ... 390190 files and directories currently installed.)
Preparing to replace libxpm-dev 1:3.5.7-1build1 (using .../libxpm-dev_1%3a3.5.7-2_i386.deb) ...
Unpacking replacement libxpm-dev ...
Preparing to replace libxpm4 1:3.5.7-1build1 (using .../libxpm4_1%3a3.5.7-2_i386.deb) ...
Unpacking replacement libxpm4 ...
Preparing to replace libtext-wrapi18n-perl 0.06-6 (using .../libtext-wrapi18n-perl_0.06-7_all.deb) ...
Unpacking replacement libtext-wrapi18n-perl ...
Processing triggers for man-db ...
Setting up libtext-wrapi18n-perl (0.06-7) ...
(Reading database ... 390191 files and director...

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 335898] Re: cupsd: Child exited on signal 6! (AppArmor violation)

justinchudgar [2009-06-12 14:34 -0000]:
> Unfortunately, not fixed for me:

Can you please do

  sudo aa-complain cups
  sudo /etc/init.d/cups restart

and then attach /var/log/kern.log?

(Sorry, I still can't reproduce this failure at all, so I depend on
your debugging info).

Thanks, Martin

Revision history for this message
Justin Chudgar (justinzane) wrote : Re: cupsd: Child exited on signal 6! (AppArmor violation)

Well, I tried the aa-complain command again and still fail. Specifically:

root@justin-mininote:~# aa-complain cupsd
Setting /usr/sbin/cupsd to complain mode.
Warning: unable to find a suitable fs in /proc/mounts, is it mounted?
Use --subdomainfs to override.

I've attached the kern.log and some other info.

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

OK, seems it wasn't apparmor's fault after all then. Can you please attach /var/log/cups/error_log after a failed cups start attempt?

summary: - cupsd: Child exited on signal 6! (AppArmor violation)
+ cupsd: Child exited on signal 6
Changed in cups (Ubuntu):
importance: High → Medium
status: Fix Released → Incomplete
Revision history for this message
Justin Chudgar (justinzane) wrote :

I tried; however, it is empty. I ran /etc/init.d/cups restart, got the signal 6 failure, but the log is blank. I will be away until Monday. Thank you.

Revision history for this message
Justin Chudgar (justinzane) wrote :

Well, it turns out that there is not apparmor kernel module on my system. Running 2.6.30-9-generic at the moment. This would be why the apparmor init script fails and why aa-complain also fails.

Could someone tell me what package provides apparmor? I had assumed it was part of the normal ***-generic kernel packages.

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 335898] Re: cupsd: Child exited on signal 6

justinchudgar [2009-06-13 15:01 -0000]:
> Well, it turns out that there is not apparmor kernel module on my
> system. Running 2.6.30-9-generic at the moment. This would be why the
> apparmor init script fails and why aa-complain also fails.

Ah, I guess it wasn't ported yet for the Karmic kernel. So indeed it
cannot be this then.

If the log is empty, can you please do this

  sudo strace -fv -o /tmp/trace /usr/sbin/cupsd

then let it crash, and attach /tmp/trace here?

Thanks,

Martin

--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

Revision history for this message
Robert Collins (lifeless) wrote :

On Sun, 2009-06-14 at 08:17 +0000, Martin Pitt wrote:
> justinchudgar [2009-06-13 15:01 -0000]:
> > Well, it turns out that there is not apparmor kernel module on my
> > system. Running 2.6.30-9-generic at the moment. This would be why the
> > apparmor init script fails and why aa-complain also fails.
>
> Ah, I guess it wasn't ported yet for the Karmic kernel. So indeed it
> cannot be this then.
>
> If the log is empty, can you please do this
>
> sudo strace -fv -o /tmp/trace /usr/sbin/cupsd
>
> then let it crash, and attach /tmp/trace here?

FWIW cupsd is now running for me, my bug was marked as a dup of this but
I think they are actually different.

-Rob

Revision history for this message
newstar212 (abdelrahman212) wrote :

Thanks Alot For Help
This post solved my problem:

David Rekowski wrote on 2009-04-18: (permalink)

For some reasons, during the alpha phase, there was a newer version of libgcrypt11 installed. Thus, you have to force a version. I don't know how to do so on commandline, but with synaptic Package -> force Version or Ctrl+E should work. Select the jaunty one in the dialog that appears, should be 1.4.1-2

Thanks alot David
Abdelrahman ahmed salah

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

Ah, I remember, in this bug report the reason was the local libgcrypt:

  libgcrypt.so.11 => /usr/local/lib/libgcrypt.so.11 (0xb7a7c000)

Changed in cups (Ubuntu):
assignee: Martin Pitt (pitti) → nobody
status: Incomplete → Invalid
Revision history for this message
Justin Chudgar (justinzane) wrote :

Here is my strace

Revision history for this message
Ari (ari-reads) wrote :

Same problem with HP PSC 1210, as reported here:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/364437

Revision history for this message
Philippe Coval (rzr) wrote :

happended w/ "hp laserjet 1320n" too

but restarted this way :
  sudo aa-complain cups && sudo invoke-rc.d cups restart

Regards

Revision history for this message
Leon (leonbo) wrote :

I added this line to /etc/apparmor.d/usr.sbin.cupsd:
/proc/sys/crypto/fips_enabled r,

Restarted apparmor and it worked.

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

Leon, this is actually a different issue than the other reporters had.

However, this was already fixed in Karmic:

cups (1.3.10-4) unstable; urgency=low
[...]
  * debian/local/apparmor-profile: Allow reading /proc/sys/crypto/**.
    (LP: #335898)
[...]

so don't bother opening a new bug report. Thanks!

Revision history for this message
hydroo (hydroo) wrote :

And what about Jaunty users?

Revision history for this message
Feistybird (bryanjen-tw) wrote :

#2 David Rekowski wrote on 2009-04-17:

For some reason, libgcrypt was 1.4.3 instead of the current 1.4.1. Changing to that version helped as cups can now be started.
Just for the sake of completeness, 11 is part of the package name, so it has to be:

$ sudo apt-get --reinstall install libgcrypt11
---

This worked for me, thanks.

I added a karmic main repositories to my jaunty's sources.list, that's why....

Revision history for this message
clax (clax) wrote :

Lutz's advice worked for me. Thank you very much.

As desired, I attached my /var/log/syslog file, in case you're still looking out for them.

Revision history for this message
Jonathan Lambrechts (jonathanlambrechts) wrote :

aa-complain made it work. Here is my syslog.

Revision history for this message
1v4n (descent89) wrote :

aa-complain solved it
Jaunty amd64

Revision history for this message
Bruneel Michaël (mbruneel) wrote :

Same issue after "sudo apt-get update && sudo apt-get dist-upgrade".

Reinstall libgcrypt11 and cups, "sudo aa-complain cupsd", "sudo aa-complain cups" does not fix it.

/var/log/cups/error_log is empty.

In attachement /tmp/trace generated with "strace -fv -o /tmp/trace /usr/sbin/cupsd"

Revision history for this message
Paul Flint (flint) wrote :

Lutz on 2009-05-29 nailed this one.

My /var/log/kern.log is attached.

Thanks for the insight and Merry Christmas!

Revision history for this message
GercoKees (gercokees) wrote :

Had the same problem here, Lutz's advice fixed it for me

Revision history for this message
Jhonatan Alvarez Aguilar (jhonatan009) wrote :

Can you please do

  sudo aa-complain cups
  sudo /etc/init.d/cups restart

correction worked

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.