Bug 473506

Summary: cups doesn't print PDF or PS
Product: [Fedora] Fedora Reporter: Horst H. von Brand <vonbrand>
Component: cupsAssignee: Tim Waugh <twaugh>
Status: CLOSED CANTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: medium    
Version: rawhideCC: aldudko, atu, corbet, emcnabb, marioitalo, twaugh, valdis.kletnieks
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-06-04 11:47:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
CUPS error_log for failed print
none
Rquested troubleshoot output
none
Output for printing an PDF
none
The requested printing troubleshoot output
none
An error showing text/plain being rejected as an invalid format none

Description Horst H. von Brand 2008-11-28 23:09:09 UTC
Description of problem:
When trying to print to a LaserJet 3020 via IPP lpr(1) says:

 lpr: successful-ok

and nothing gets printed. Had to downgrade to cups-1.3.9-2.fc10.x86_64 and install cupsddk-drivers-1.2.3-5.fc10.x86_64.rpm to get printing to work.

Version-Release number of selected component (if applicable):
cups-1.4-0.b1.3.fc11.x86_64

How reproducible:
With PDF and PS here

Steps to Reproduce:
1. lpr something.pdf
2.
3.
  
Actual results:
"lpr: successful-ok", no printout. /var/log/cups/error_log excerpt after restarting cups and trying to print attached.


Expected results:


Additional info:

Comment 1 Horst H. von Brand 2008-11-28 23:10:18 UTC
Created attachment 325048 [details]
CUPS error_log for failed print

Comment 2 Horst H. von Brand 2008-11-29 03:54:07 UTC
*** Bug 473505 has been marked as a duplicate of this bug. ***

Comment 3 Horst H. von Brand 2008-12-09 21:43:18 UTC
Tried again with cups-1.4-0.b1.4.fc11.x86_64, same results

Comment 4 Jonathan Corbet 2008-12-15 18:31:38 UTC
<metoo>

Don't know if this is related, but I also see behavior like this:

% enscript 
lpr: Unsupported format 'application/postscript'!
[ 1 pages * 1 copy ] sent to printer

Comment 5 Horst H. von Brand 2008-12-18 20:33:56 UTC
Just tried cups-1.4-0.b2.2.fc11.x86_64.rpm, same results.

Comment 6 Tim Waugh 2008-12-19 13:00:26 UTC
E [28/Nov/2008:19:38:07 -0300] Returning IPP client-error-document-format-not-supported for Send-Document (ipp://localhost:631/printers/LaserJet-3020) from localhost

That's quite odd.  Could you try running the printing troubleshooter and attach the resulting troubleshoot.txt file here please?

Comment 7 Horst H. von Brand 2008-12-19 18:28:06 UTC
Created attachment 327478 [details]
Rquested troubleshoot output

First I had to find it...

System -> Administration -> Printing -> Help -> Troubleshoot

I tried to print the test page, it failed with a message saying the format isn't supported. The result is attached.

Comment 8 Horst H. von Brand 2008-12-19 18:32:34 UTC
Created attachment 327479 [details]
Output for printing an PDF

Same as before, but now explicitly printing a PDF file.
lpr(1) again says:

  lpr: successful-ok
  
The "Test Page" window shows the job (77) as cancelled.

Comment 9 Horst H. von Brand 2008-12-19 18:34:10 UTC
Created attachment 327480 [details]
The requested printing troubleshoot output

Output from printing the test page

Comment 10 John Himpel 2008-12-20 00:07:35 UTC
Created attachment 327506 [details]
An error showing text/plain being rejected as an invalid format

I have attached an error log showing text/plain being an unsupported format.  I am printing from firefox 3.0.4 (from rawhide) to an HP 882C.  Cups=1.4-0.b2.2.fc11.i386

Comment 11 Mario Filizzola 2009-01-08 03:58:36 UTC
I'm using Fedora 10 and I'm having the same problem. Here the problem seems related to Selinux. Below is the information from setroubleshoot. I already have "use_nfs_home_dirs=1"


Sumário:

O SELinux prevented cups-pdf reading files in a NFS file system.

Permitindo Acesso:

Changing Boolean "use_nfs_home_dirs" will allow this access:
"setsebool -P use_nfs_home_dirs=1"

Reparar Comando:

setsebool -P use_nfs_home_dirs=1

Informação adicional:

Contexto Fonte                system_u:system_r:cups_pdf_t:s0-s0:c0.c1023
Contexto Alvo                 system_u:object_r:nfs_t:s0
Objetos target                /home [ dir ]
Fonte                         cups-pdf
Caminho source                /usr/lib/cups/backend/cups-pdf
Porta                         <Desconhecido>
Máquina                       fedora
Pacotes do RPM source          cups-pdf-2.4.8-1.fc10
Pacotes do RPM target           filesystem-2.4.19-1.fc10
RPM da Política              selinux-policy-3.5.13-34.fc10
Selinux Ativado               True
Tipo de Política             targeted
MLS Ativado                   True
Modo Enforcing                Enforcing
Nome do Plugin                use_nfs_home_dirs
Nome do Host                  fedora
Plataforma                    Linux fedora 2.6.27.9-159.fc10.x86_64 #1 SMP Tue
                              Dec 16 14:47:52 EST 2008 x86_64 x86_64
Conta de Alerta               9
Visto Primeiro em             Qua 07 Jan 2009 08:20:25 BRST
Visto pela última vez em     Qui 08 Jan 2009 00:07:57 BRST
ID Local                      e913b5fc-e4c0-4aa6-98c1-c3e4e69d1c98
Números de Linha             

Mensagens de Auditoria de Mat 

node=fedora type=AVC msg=audit(1231380477.707:57): avc:  denied  { getattr } for  pid=6113 comm="cups-pdf" path="/home" dev=sda2 ino=2 scontext=system_u:system_r:cups_pdf_t:s0-s0:c0.c1023 tcontext=system_u:object_r:nfs_t:s0 tclass=dir

node=fedora type=SYSCALL msg=audit(1231380477.707:57): arch=c000003e syscall=4 success=no exit=-13 a0=7fffa53a19b0 a1=7fffa53a0850 a2=7fffa53a0850 a3=fe items=0 ppid=2635 pid=6113 auid=4294967295 uid=0 gid=7 euid=0 suid=0 fsuid=0 egid=7 sgid=7 fsgid=7 tty=(none) ses=4294967295 comm="cups-pdf" exe="/usr/lib/cups/backend/cups-pdf" subj=system_u:system_r:cups_pdf_t:s0-s0:c0.c1023 key=(null)

Comment 12 Tim Waugh 2009-01-08 12:28:06 UTC
(In reply to comment #11)
> I'm using Fedora 10 and I'm having the same problem. Here the problem seems
> related to Selinux. Below is the information from setroubleshoot. I already
> have "use_nfs_home_dirs=1"

This is a different issue from the looks of it.  Please file a separate bug report against selinux-policy.

Comment 13 Horst H. von Brand 2009-02-25 19:50:14 UTC
Latest cups (cups-1.4-0.b2.7.fc11.x86_64.rpm) still shows the same problem, got  

  cups-libs-1.3.9-8.fc10.x86_64.rpm 
  cupsddk-drivers-1.2.3-5.fc10.x86_64.rpm
  cups-1.3.9-8.fc10.x86_64.rpm

from Koji, those do work.

Comment 14 Horst H. von Brand 2009-03-04 17:09:29 UTC
Again, cups-1.4-0.b2.7.fc11.1.x86_64.rpm doesn't work. Now with cupsddk-drivers-1.2.3-6.fc11.x86_64, cups{,-libs} as above.

Comment 15 Tim Waugh 2009-03-11 17:10:08 UTC
Please try cups-1.4-0.b2.11.fc11, which is based on newer code than the 1.4b2 release.  Is it any different? (There have been lots of changes that may have a bearing on this problem.)

Comment 16 Horst H. von Brand 2009-03-11 20:06:51 UTC
Got cups-{,libs-}1.4-0.b2.11.fc11 from Koji, installed that via rpm. This gave  /etc/cups/{classes,printers,subscriptions}.conf.rpmnew, overwrote the originals with the rpmnew ones and restarted cups. Had to configure the printer again from scratch (not nice!). After that, it printed a testpage and a PDF just fine. No error messages.

Seems fixed, but I'd see if it cures the problem for all affected.

Many thanks!

Comment 17 Valdis Kletnieks 2009-03-13 15:19:45 UTC
Still broken for me, in different ways...

'enscript /etc/profile' reports

% enscript /etc/profile
lpr: Unsupported format 'application/postscript'!
[ 1 pages * 1 copy ] sent to printer

and logs:

localhost - - [13/Mar/2009:10:59:01 -0400] "POST /printers/hp4300 HTTP/1.1" 200 382 Create-Job successful-ok
localhost - - [13/Mar/2009:10:59:01 -0400] "POST /printers/hp4300 HTTP/1.1" 200 15635 Send-Document client-error-document-format-not-supported

Then when I try to release the job to the printer, cupsd goes into a 100% CPU bound state, about 45% user and 55% kernel.  gdb reports:

(gdb) where
#0  0x00007f07a9be04b3 in __epoll_wait_nocancel () from /lib64/libc.so.6
#1  0x00007f07acca18fc in ?? () from /usr/sbin/cupsd
#2  0x00007f07acc7c04c in main () from /usr/sbin/cupsd

Installing debuginfo would be 14 RPMs totalling 162M, so I'm not in a mood to do that unless needed.

Comment 18 Tim Waugh 2009-03-13 15:54:30 UTC
Hmm, I don't see this at all.

I would very much like to track down the busy-loop problem first.  You don't need to download any debuginfo RPMs except cups-debuginfo -- install it with 'rpm -ivh --nodeps' if need be.  We only need to know about symbols in cupsd/libcups, as that's where the problem is.

Comment 19 Alex Dudko 2009-05-25 15:12:10 UTC
Had the same problem in FC11. The error message was "Send-Document client-error-document-format-not-supported"
Solved by changing /usr/lib/cups/filter and enclosed files owner to root.

Comment 20 Tim Waugh 2009-06-03 11:32:29 UTC
What owner did they have before?

The package manifest has them as owned by root:root so I'm not sure how they were changed in the first place.

Comment 21 Alex Dudko 2009-06-03 22:56:41 UTC
After driver installation they were owned by a not root user, the user which particularly installed the driver.

Comment 22 Tim Waugh 2009-06-04 09:36:57 UTC
Which driver?

Comment 23 Alex Dudko 2009-06-04 11:21:46 UTC
A UnifiedLinuxDriver, downloaded from http://www.samsung.com/us/support/download/supportDownDetail.do?group=&type=&subtype=&model_nm=SCX-4100&language=&cate_type=all&mType=DR&dType=D&vType=&cttID=2048258&prd_ia_cd=&disp_nm=SCX-4100&model_cd=&menu=download&menu2=detail
Was installed running the installation script.
The same driver was installed on FC9 without any problem.

Comment 24 Tim Waugh 2009-06-04 11:47:57 UTC
OK, problem is in third party driver.

I was unable to reproduce the problem noted in comment #17, so closing.