P2POutputStream: write error

Bug #276573 reported by Dustin Kirkland 
6
Affects Status Importance Assigned to Milestone
cups (Ubuntu)
Invalid
High
Unassigned
foomatic-filters (Ubuntu)
Fix Released
High
Lars Karlitski

Bug Description

Binary package hint: cups

I recently started getting this error on my intrepid system when printing over the network to my HP OfficeJet 6310:

P2POutputStream: write error

I'm currently unable to print to it. Continuing to debug.

:-Dustin

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Changing the driver to Generic Postscript sends a bunch of blank pages through the printer (some with garbage). But there is at least something going through.

:-Dustin

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Changing the driver back to "HP Officejet 6300 series Foomatic/hpijs, hpijs 2.8.7" yields the P2P error again.

:-Dustin

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Changing the driver to "HP OfficeJet 6110 - CUPS+Gutenprint v5.2.0-beta4" gets me printing again.

:-Dustin

Changed in cups:
importance: Undecided → High
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Attaching the output of the troubleshoot.txt from system-config-printer.

:-Dustin

Changed in hplip:
importance: Undecided → High
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

More debugging output...

:-Dustin

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

It seems that CUPS does not set the TMPDIR variable any more. Lars, can you add to foomatic-rip that it sets TMPDIR to /tmp when TMPDIR is not a writable directory and also uses /tmp then? In reality it is a CUPS bug, but we should allow the use of foomatic-rip also with these versions.

Changed in hplip:
assignee: nobody → larsuebernickel
milestone: none → ubuntu-8.10
status: New → Triaged
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Seems that CUPS is not setting TMPDIR any more. Will report it upstream.

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

Problem reported to CUPS upstream:

http://www.cups.org/str.php?L2962

Revision history for this message
Lars Karlitski (larsu) wrote :

Fixed upstream (in foomatic-filters).

Changed in foomatic-filters:
status: Triaged → Fix Committed
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Uploaded upstream fix: foomatic-filters_4.0.0~bzr174-0ubuntu1

Changed in foomatic-filters:
status: Fix Committed → Fix Released
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Dustin Kirkland, before you update to the fixed foomatic-rip, can you try to print again and see if any messages with "audit" appear in /var/log/syslog or /var/log/messages? Thanks.

Revision history for this message
Dustin Kirkland  (kirkland) wrote : Re: [Bug 276573] Re: P2POutputStream: write error

/var/log/syslog
Oct 6 12:38:52 t61p kernel: [ 9486.969802] type=1503
audit(1223314732.763:5): operation="inode_create" requested_mask="a::"
denied_mask="a::" fsuid=7 name="/dev/shm/foomatic-kzhZaS" pid=14140
profile="/usr/sbin/cupsd"

/var/log/messages:
Oct 6 12:38:52 t61p kernel: [ 9486.969802] type=1503
audit(1223314732.763:5): operation="inode_create" requested_mask="a::"
denied_mask="a::" fsuid=7 name="/dev/shm/foomatic-kzhZaS" pid=14140
profile="/usr/sbin/cupsd"

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

After some discussion on IRC it turned out that Dustin Kirkland has linked /tmp to /dev/shm (shared memory, something like a RAM disk). AppArmor is blocking the access to /dev/shm as it is not explicitly allowed in /etc/apparmor.d/usr.sbin.cupsd (See below). So there is no bug in upstream CUPS or in our AppArmor configuration.

The new foomatic-rip works around the problem by trying several temporary file locations. Especially it starts with CUPS' own temporary file directory, usually

/var/spool/cups/tmp

So you either need to install the new foomatic-filters package or edit your /etc/apparmor.d/usr.sbin.cupsd giving the same permissions to /dev/shm as to /tmp.

Closing CUPS task.

----------------------------

/var/log/syslog:

Oct 6 12:38:52 t61p kernel: [ 9486.969802] type=1503 audit(1223314732.763:5): operation="inode_create" requested_mask="a::" denied_mask="a::" fsuid=7 name="/dev/shm/foomatic-kzhZaS" pid=14140 profile="/usr/sbin/cupsd"

/var/log/messages:

Oct 6 12:38:52 t61p kernel: [ 9486.969802] type=1503 audit(1223314732.763:5): operation="inode_create" requested_mask="a::" denied_mask="a::" fsuid=7 name="/dev/shm/foomatic-kzhZaS" pid=14140 profile="/usr/sbin/cupsd"

Changed in cups:
status: Triaged → Invalid
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Perfect, thanks Till for your hard work.

I have tested the updated packages and verified the fix.

Thanks!
:-Dustin

Revision history for this message
maximi89 (maximi89) wrote :

Men, if you have another driver for your device try it, i have a HP Larserjet p1005, and when i print with hpijs driver only i get numbers with the top saying it's "pdf-1.3 pdftopdf", so i change the driver to foomatic/foo2xqx and the hpijs to foomatic/hpijs-ZJS now i can print without that error, that error was only with "hpijs", so i get now the foo2xqx that's normal quality, and hpijs-ZJS draft quality.

greetings

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.