Printing fails after printing first document

Bug #936629 reported by Pavel Kukacka
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
cups (Ubuntu)
Fix Released
High
Martin Pitt

Bug Description

When I turn the system on, I can print the first document I try - no matter in which application. The second and further documents get stuck in the print queue with the status "Processing" (my translation of "Provádění" in czech) or "waiting" for the further documents. This behaviour started on Oneiric after some time when the printing was normal.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: cups 1.5.2-4
ProcVersionSignature: Ubuntu 3.2.0-17.26-generic 3.2.6
Uname: Linux 3.2.0-17-generic i686
NonfreeKernelModules: fglrx
ApportVersion: 1.91-0ubuntu1
Architecture: i386
Date: Mon Feb 20 01:22:16 2012
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Beta i386 (20110921.2)
Lpstat: device for DESKJET-710C: usb://HP/DESKJET%20710C
MachineType: Gigabyte Technology Co., Ltd. GA-E350N-USB3
Papersize: a4
PpdFiles: DESKJET-710C: HP DeskJet 710C Foomatic/pnm2ppa (recommended)
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-17-generic root=UUID=d25463d9-c60d-4ac7-b4b3-5242216e80a4 ro quiet splash vt.handoff=7
SourcePackage: cups
UpgradeStatus: Upgraded to precise on 2012-02-19 (0 days ago)
dmi.bios.date: 01/10/2011
dmi.bios.vendor: Award Software International, Inc.
dmi.bios.version: F1
dmi.board.name: GA-E350N-USB3
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.board.version: x.x
dmi.chassis.type: 3
dmi.chassis.vendor: Gigabyte Technology Co., Ltd.
dmi.modalias: dmi:bvnAwardSoftwareInternational,Inc.:bvrF1:bd01/10/2011:svnGigabyteTechnologyCo.,Ltd.:pnGA-E350N-USB3:pvr:rvnGigabyteTechnologyCo.,Ltd.:rnGA-E350N-USB3:rvrx.x:cvnGigabyteTechnologyCo.,Ltd.:ct3:cvr:
dmi.product.name: GA-E350N-USB3
dmi.sys.vendor: Gigabyte Technology Co., Ltd.

Revision history for this message
Pavel Kukacka (pavel-kukacka) wrote :
Revision history for this message
Pavel Kukacka (pavel-kukacka) wrote :

One log from the troubleshooting wizard - trying to prínt a document after clearing print queue (some time after printing the first document that gets printed without problems).

After restarting the system, I can print again one document without problem, but then the same situation occurs.

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

Can you run the following commands in a terminal window:

sudo apt-get install apparmor-utils
sudo aa-complain cupsd

and then try to print again? Can you now print any arbitrary number of jobs?

Can you post all lines containing "audit" from your /var/log/syslog file? For that you can run

grep audit /var/log/syslog > audit.log

Attach the audit.log file.

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

pitti, this seems to be an AppArmor problem, can you have a look into this?

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

Can you, in addition to the steps of comment #3, reboot your system and then follow the instructions of "CUPS error_log" and "Capturing print job data" in https://wiki.ubuntu.com/DebuggingPrintingProblems for the first two jobs after boot, one which prints and one which does not print.

If after running the command "sudo aa-complain cupsd" you can print normally, run

sudo aa-enforce cupsd

and follow the instructions in the beginning of this comment.

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

If I create a print queue with the same PPD as the original poster (printing into a file) and print the test page /usr/share/cups/data/testprint, I get the following in my /var/log/syslog (in aa-complain mode):

Feb 20 22:29:23 till-precise kernel: [ 9064.784640] type=1400 audit(1329773363.116:34): apparmor="ALLOWED" operation="open" parent=9150 profile="/usr/sbin/cupsd" name="/proc/9151/auxv" pid=9151 comm="gs" requested_mask="r" denied_mask="r" fsuid=7 ouid=7

pitti, do we need to open up the permissions here? Why does Ghostscript (gs) try to read /proc/9151/auxv?

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

What is process 9151 in your case? I. e. which other process does ghostscript try to look into? auxv contains memory addresses which could aid with circumventing ASLR, so I don't want to open it up for entire cups or ghostscript.

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

To reproduce without having an HP DeskJet 710C, run the commands:

cupsctl LogLevel=debug
cupsctl FileDevice=yes
lpadmin -p dj710c -E -v file:/tmp/printout -m foomatic-db-compressed-ppds:0/ppd/foomatic-ppd/HP-DeskJet_710C-pnm2ppa.ppd
lpadmin -p dj710c -o PageSize=A4
lp -d dj710c /usr/share/cups/data/testprint

See the entries in /var/log/cups/error_log and /var/log/syslog.

Revision history for this message
Pavel Kukacka (pavel-kukacka) wrote :

Wow,
  good advice, Till, thank you!

After running

sudo apt-get install apparmor-utils
and
sudo aa-complain cupsd

I'm printing without issues.

I'm attaching the logs also:

Revision history for this message
Pavel Kukacka (pavel-kukacka) wrote :

cannot find howto add them together, so...:
log from the first three runs (surprisingly the error came not with the second doc, but with the third)

Revision history for this message
Pavel Kukacka (pavel-kukacka) wrote :

and the printouts: the one that was printed:

Revision history for this message
Pavel Kukacka (pavel-kukacka) wrote :

...and the one that did not:

Revision history for this message
Pavel Kukacka (pavel-kukacka) wrote :

And new error_log of three successfull printouts.

Changed in cups (Ubuntu):
importance: Undecided → High
milestone: none → ubuntu-12.04-beta-2
assignee: nobody → Martin Pitt (pitti)
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Jean-Louis Dupond suffers the same problem and provided me his error_log entries via IRC:

----------
Feb 29 19:06:20 laptop-jl foo2qpdl-wrapper: gs -sPAPERSIZE=a4 -g9920x7016 -r1200x600 -sDEVICE=pbmraw -dCOLORSCREEN -dMaxBitmap=500000000
Feb 29 19:06:20 laptop-jl foo2qpdl-wrapper: foo2qpdl -r1200x600 -g9920x7016 -p2 -m0 -n1 -d1 -s1 -z2 -u 150x100 -l 150x100
Feb 29 19:09:05 laptop-jl kernel: [ 5912.858944] type=1400 audit(1330538945.274:30): apparmor="DENIED" operation="open" parent=4855 profile="/usr/sbin/cupsd" name="/proc/4856/auxv" pid=4856 comm="gs" requested_mask="r" denied_mask="r" fsuid=7 ouid=7
Feb 29 19:09:05 laptop-jl kernel: [ 5913.019474] type=1400 audit(1330538945.434:31): apparmor="DENIED" operation="open" parent=4857 profile="/usr/sbin/cupsd" name="/proc/4858/auxv" pid=4858 comm="gs" requested_mask="r" denied_mask="r" fsuid=7 ouid=7
----------

Jean-Louis Dupond, can you completely eliminate the problem by running the command

sudo aa-complain cupsd

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

The problems with the foo2qpdl driver in bug 898986 can be this bug, too.

Martin Pitt (pitti)
Changed in cups (Ubuntu):
status: Incomplete → In Progress
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.5.2-7

---------------
cups (1.5.2-7) unstable; urgency=low

  * Add fix-empty-translations.patch: Do not translate msgids to empty
    strings. Backported from upstream SVN. (LP: #953321)
  * Add test-i18n-nonlinux.patch: Do not run the CUPS_EUC_JP test case on
    BSD/Hurd either, as glibc's iconv behavior is different than what the test
    expects. (Closes: #662996)
  * debian/local/apparmor-profile: Allow gs to read /proc/*/auxv; it's
    harmless information. (LP: #936629)
  * debian/cups.dirs, debian/rules: Disable /usr/local/share/ppd/ directory
    for now, until dh_usrlocal stops failing on those.
 -- Martin Pitt <email address hidden> Tue, 13 Mar 2012 11:46:09 +0100

Changed in cups (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Rodrigo Alvarez (rodrigo-alvarez-i) wrote :

I'm sorry to report that I'm experiencing this on Ubuntu 12.04 with CUPS 1.5.3 printing to a Canon MP160. This setup used to work perfectly before upgrading from 10.04.

If I run `sudo aa-complain cupsd`, then I can print multiple documents. As soon as I revert by running `sudo aa-enforce cupsd`, then I can only print one job and then printing halts. Actually, even with apparmor disabled, there are issues if I try to print from different computers.

I'm attaching output from /var/log/cups/error_log and from grep audit /var/log/syslog

Let me know if I can provide any more info.

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.