| Summary: | Printing to postscript printer fails with status "Idle - Filter failed" : caused by failure in pdftops stage of CUPS filter pipeline | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | Martin Whitaker <mageia> |
| Component: | RPM Packages | Assignee: | Mageia Bug Squad <bugsquad> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | critical | ||
| Priority: | High | CC: | anssi.hannula, dmorganec, doktor5000, eatdirt, guichard.adrien, lists.jjorge, mageia, marja11, nicolas.brouard, paul, phartmann, phb, piernov, qa-bugs, steve, thierry.vignaud |
| Version: | 4 | ||
| Target Milestone: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| See Also: | https://bugs.mageia.org/show_bug.cgi?id=12137 | ||
| Whiteboard: | |||
| Source RPM: | cups-filters 1.0.41-3.mga4.x86_64 | CVE: | |
| Status comment: | |||
| Bug Depends on: | |||
| Bug Blocks: | 12856 | ||
| Attachments: |
The /etc/cups/printers.conf file
The /var/log/cups/error_log file CUPS error_log with log level set to debug Input file to failing stage of CUPS filter pipeline |
||
|
Description
Martin Whitaker
2013-11-16 15:49:44 CET
Still broken in beta 2. Hi Martin,
according to some specifications I saw, your printer can be used over the USB port and over the parallel port.
Which one are you using? Is it directly attached to your pc, or do you use a printserver?
Also, can you please attach:
/etc/cups/printers.conf
/var/log/cups/error_log
and the output of (as root)
journalctl -f
from when you try to printKeywords:
(none) =>
NEEDINFO Hi Marja,
The printer is directly attached to the PC I'm using to test Mageia 4 via a USB port. When asked to choose a driver, I select "Postscript-Kyocera" (which is the default - selecting the alternative "Local Driver" just causes the "Choose Driver" dialogue to hang indefinitely (with a spinning "busy" icon).
Here is the output from journalctl -f after selecting "Print Test Page":
Dec 15 13:44:25 wotan systemd[1]: Started CUPS Printing Service.
Dec 15 13:44:25 wotan kernel: usblp2: removed
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/gi/overrides/GLib.py", line 633, in <lambda>
return (lambda data: callback(*data), user_data)
File "/usr/share/system-config-printer/system-config-printer.py", line 2064, in deferred_refresh
self.populateList (prompt_allowed=False)
File "/usr/share/system-config-printer/system-config-printer.py", line 989, in populateList
model.foreach (maybe_select, None)
AttributeError: 'NoneType' object has no attribute 'foreach'
Dec 15 13:44:30 wotan kernel: usblp 3-3:1.0: usblp2: USB Bidirectional printer dev 2 if 0 alt 0 proto 2 v...0x000E
Dec 15 13:44:31 wotan systemd[1]: Started CUPS Printing Service.
Dec 15 13:44:31 wotan systemd[1]: Started CUPS Printing Service.
Created attachment 4622 [details]
The /etc/cups/printers.conf file
Created attachment 4623 [details]
The /var/log/cups/error_log file
Martin Whitaker
2013-12-15 14:58:11 CET
Attachment 4622 mime type:
application/octet-stream =>
text/plain
Martin Whitaker
2013-12-15 14:58:34 CET
Attachment 4623 mime type:
application/octet-stream =>
text/plain
Marja Van Waes
2013-12-15 15:01:44 CET
Keywords:
NEEDINFO =>
(none) cc'ing some more, because I've seen odd things in cauldron, with regard to printing and adding printers, too, even if I didn't get around to filing bug reports CC:
(none) =>
anssi.hannula, dmorganec, mageia In error_log there are issues with the filters: D [15/Dec/2013:11:50:59 +0000] [Job 1] PID 6673 (gs) stopped with status 1! [...] D [15/Dec/2013:11:50:59 +0000] [Job 1] PID 6667 (/usr/lib/cups/filter/pdftops) stopped with status 1. D [15/Dec/2013:11:50:59 +0000] [Job 1] Hint: Try setting the LogLevel to "debug" to find out more. Print job ends with D [15/Dec/2013:11:50:59 +0000] [Job 1] printer-state-message="Filter failed" So there are some filter errors, can you please change the loglevel to debug as proposed by CUPS to see why that happens? Created attachment 4626 [details]
CUPS error_log with log level set to debug
I can't spot anything helpful in here.
Please try with latest system-config-printer (and update the RPM package field accordingly) Source RPM:
(none) =>
system-config-printer # urpmi system-config-printer Package system-config-printer-1.4.2-9.mga4.x86_64 is already installed So unless the mirror I'm using is out of date, I'm already using the latest version. Source RPM:
system-config-printer =>
system-config-printer 1.4.2-9.mga4.x86_64 (In reply to Martin Whitaker from comment #10) > # urpmi system-config-printer > Package system-config-printer-1.4.2-9.mga4.x86_64 is already installed > > So unless the mirror I'm using is out of date, I'm already using the latest > version. system-config-printer-1.4.3-1.mga4 was pushed 3 days ago. If it's still not on your mirror, then please try another one and tell which one is out-of-date Hi Marja, I've found another mirror with the new version. The filter error bug (problem 3) is still present. Is there any way to test the missing task-printing-misc package bug (problem 2) without doing a clean install? The out-of-date mirror is ftp.sunet.se Source RPM:
system-config-printer 1.4.2-9.mga4.x86_64 =>
system-config-printer 1.4.3-1.mga4.x86_64 Created attachment 4925 [details]
Input file to failing stage of CUPS filter pipeline
OK, I've spent some time debugging this problem, and it lies in the pdftops filter. The attached PDF file was generated by manually running the preceding filter steps (bannertopdf, pdftopdf). To reproduce the fault:
/usr/lib/cups/filter/pdftops 1 me '' 1 '' pdftopdf.pdf > pdftops.ps
This results in the following messages:
DEBUG: Using image rendering resolution 300 dpi
DEBUG: Started filter gs (PID 6119)
DEBUG: Started filter pstops (PID 6120)
DEBUG: slow_collate=0, slow_duplex=0, slow_order=0
DEBUG: This document does not conform to the Adobe Document Structuring Conventions and may not print correctly.
PAGE: 1 1
DEBUG: PID 6119 (gs) stopped with status 1!
DEBUG: PID 6120 (pstops) exited with no errors.
Looking in the resulting pdftops.ps file, the problem is apparently:
%%BeginDocument: nondsc
Unknown device: pswrite
Unrecoverable error: undefined in .uninstallpagedevice
Operand stack:
defaultdevice
%%EndDocument
Replacing /usr/lib/cups/filter/pdftops with the old version from Mageia-2 fixes the problem.
Changing bug summary to reflect the real problem Version:
Cauldron =>
4 I do have the same problem, tracing cupsd,
# strace -o cups2.txt -ff -p 29055
$ grep exec cups2*
[. . .]
29721:execve("/usr/lib/cups/filter/pdftops", ["SagemDir", "118", "adrien", "Test Page", "1", "job-uuid=urn:uuid:6f9389e4-577f-"...], [/* 31 vars */]) = 0
29722:execve("/usr/lib/cups/backend/http", ["http://10.109.55.121:631/ipp", "118", "adrien", "Test Page", "1", "job-uuid=urn:uuid:6f9389e4-577f-"...], [/* 31 vars */]) = 0
29723:execve("/usr/lib/cups/filter/gs", ["gs", "-q", "-dNOPAUSE", "-dBATCH", "-dSAFER", "-sDEVICE=pswrite", "-sOUTPUTFILE=%stdout", "-dLanguageLevel=3", "-r600", "-dCompressFonts=false", "-dNoT3CCITT", "-dNOINTERPOLATE", "-c", "save pop", "-f", "/var/spool/cups/tmp/cupsFV3LWh", ...], [/* 31 vars */]) = -1 ENOENT (No such file or directory)
29723:execve("/usr/lib64/cups/filter/gs", ["gs", "-q", "-dNOPAUSE", "-dBATCH", "-dSAFER", "-sDEVICE=pswrite", "-sOUTPUTFILE=%stdout", "-dLanguageLevel=3", "-r600", "-dCompressFonts=false", "-dNoT3CCITT", "-dNOINTERPOLATE", "-c", "save pop", "-f", "/var/spool/cups/tmp/cupsFV3LWh", ...], [/* 31 vars */]) = -1 ENOENT (No such file or directory)
29723:execve("/usr/bin/gs", ["gs", "-q", "-dNOPAUSE", "-dBATCH", "-dSAFER", "-sDEVICE=pswrite", "-sOUTPUTFILE=%stdout", "-dLanguageLevel=3", "-r600", "-dCompressFonts=false", "-dNoT3CCITT", "-dNOINTERPOLATE", "-c", "save pop", "-f", "/var/spool/cups/tmp/cupsFV3LWh", ...], [/* 31 vars */]) = 0
the problem might come from gs, I do have this error at the end of 29723 process:
[. . .]
write(1, "Unknown device: pswrite\n", 24) = 24
[. . .]
let me know if you want the complete strace output. I do not know what to do from here.CC:
(none) =>
guichard.adrien digging further: # strings /usr/lib/cups/filter/pdftops | grep pswrite -sDEVICE=pswrite # gs --help | grep ps2write pr1000_4 pr150 pr201 ps2write psdcmyk psdrgb pxlcolor pxlmono r4081 rinkj is it possible "pswrite" be obsoleted by "ps2write" as gs device? is there a way to change "-sDEVICE=pswrite" to "-sDEVICE=ps2write"? what does give strings /usr/lib/cups/filter/pdftops | grep sDEVICE in mageia 2? (In reply to Adrien Guichard from comment #16) > digging further: > # strings /usr/lib/cups/filter/pdftops | grep pswrite > -sDEVICE=pswrite > > > # gs --help | grep ps2write > pr1000_4 pr150 pr201 ps2write psdcmyk psdrgb pxlcolor pxlmono r4081 rinkj > > is it possible "pswrite" be obsoleted by "ps2write" as gs device? > is there a way to change "-sDEVICE=pswrite" to "-sDEVICE=ps2write"? > > what does give > strings /usr/lib/cups/filter/pdftops | grep sDEVICE in mageia 2? see. http://www.cups.org/str.php?L3766 looks like we have to use older gs, or compile cups with "ps2write" enabled. Hi, I'm facing the exact same problem. As a (dirty) temporary workaround, I'm using this wrapper script in place of /usr/bin/gs (after renaming the original one to /usr/bin/gs.orig) : #!/usr/bin/bash if echo "$@" | grep --quiet pswrite; then /usr/bin/gs.orig `echo "$@" | sed "s|pswrite|ps2write|g"` else /usr/bin/gs.orig "$@" fi CC:
(none) =>
piernov Some other solution is to remove "--with-pdftops=hybrid" configure option from "cups-filter.spec", or modify directly "./filter/pdftops.c". the problem is I do not know the side effects. This configure option is supposed to allow to switch to poppler pdftops implementation for some buggy postscript printer (see cups-filter/README file). gs option "pswrite" has been obsoleted by "epswrite", which in turn seems to be obslete... According to "cups-filters-1.0.44/README", keeping "--with-pdftops=hybrid" allow per printer /per job pdftops-renderer selection (for example poppler impl). We can keep "--with-pdftops=hybrid", but to patch "./filter/pdftops.c" to change "pswrite" in either "ps2write" or "epswrite". Could you test changing "ps2write" in "epswrite"? I have the same "filter failed" error with my Kyocera printers FS-1800 and FS-C5016N on MGA4 32bit. Your workaround (see comment 18) is working for me. CC:
(none) =>
phartmann As quite some users are affected from forums reports and ml posts, added to Errata until we have a final fix: https://wiki.mageia.org/en/Mageia_4_Errata#CUPS_.2F_ghostscript_filters Thanks for sharing dirty workarounds :) CC:
(none) =>
doktor5000 hi guys, just to mention that workaround c18 works only if the printing calling program uses that kind of call. I am still getting filter crash errors by using "lpr" on the command line, or printing pdf/ps files from xpdf, gv etc... cheers, chris. CC:
(none) =>
dirteat The workaround worked for me, LaserjetPro 200 MFP. Many thanks. CC:
(none) =>
paul
Florian Hubold
2014-02-15 21:10:57 CET
See Also:
(none) =>
https://bugs.mageia.org/show_bug.cgi?id=12137 (In reply to Pierre-Emmanuel Novac from comment #18) > Hi, I'm facing the exact same problem. > As a (dirty) temporary workaround, I'm using this wrapper script in place of > /usr/bin/gs (after renaming the original one to /usr/bin/gs.orig) : > > #!/usr/bin/bash > if echo "$@" | grep --quiet pswrite; then > /usr/bin/gs.orig `echo "$@" | sed "s|pswrite|ps2write|g"` > else > /usr/bin/gs.orig "$@" > fi This workaround also worked for me. This bug should be at highest priority, as printing is currently broken on Mageia 4! Priority:
Normal =>
High It is a good news workaround works most of the time. For those it does not work, could you try to use poppler pstopdf implementation as described in: http://ubuntuforums.org/showthread.php?t=2022997 lpadmin -p <printer> -o pdftops-renderer-default=gs lpadmin -p <printer> -o pdftops-renderer-default=pdftops For postcrypt 1.1 printer or with buggy postscript implementation, it should work better. I think the good solution is to change directly pdftops sources as in #19 Thanks for your support, Adrien This bug is still assigned to bugsquad. Is the maintainer of this package reading this? (In reply to Martin Whitaker from comment #26) > This bug is still assigned to bugsquad. Is the maintainer of this package > reading this? Well, he's on CC. FWIW, our package uses the same configuration as the Fedora one, although we have 4 Fedora patches which are not existent anymore in Fedora ... Oo @tv: the 4 patches were dropped by Fedora as upstreamed with 1.42 http://pkgs.fedoraproject.org/cgit/cups-filters.git/commit/?id=167d5a24a2c5f5b8ce0d4ff01c44b3345cddde59 and 1.43 http://pkgs.fedoraproject.org/cgit/cups-filters.git/commit/?id=5484796d899add88cd4bd433634ad6f1513ff3bc Shouldn't we drop them too? Apart from that, not sure who's at fault here? cups-filters? ghostscript? ...? No. We have 1.0.41 in mga4. And 1.0.45 w/o the patches has the same issue in mga5 Foomatic filters look also screwed (printing from emacs, with workaround) ---> --- D [20/Feb/2014:11:48:36 +0100] [Job 853] Found: %%BeginProlog D [20/Feb/2014:11:48:36 +0100] [Job 853] Inserting option code into "Prolog" section. D [20/Feb/2014:11:48:36 +0100] [Job 853] ricoh: options.c:823: build_foomatic_custom_command: Assertion `choice' failed. PID 24410 (/usr/lib/cups/filter/foomatic-rip) crashed on signal 6. D [20/Feb/2014:11:48:36 +0100] [Job 853] Hint: Try setting the LogLevel to "debug" to find out more. D [20/Feb/2014:11:48:36 +0100] [Job 853] hrDeviceDesc="Unknown" D [20/Feb/2014:11:48:36 +0100] [Job 853] prtGeneralCurrentLocalization type is 0, expected 2! D [20/Feb/2014:11:48:36 +0100] [Job 853] backendWaitLoop(snmp_fd=6, addr=0x7f8864dd6878, side_cb=0x7f88633f5ed0) Fixed in cups-filters-1.0.46-2.mga5 in cauldron: ./configure script needs /bin/gs in order to check whether ps2write is available or not... And cups-filters-1.0.41-3.mga4 was just pushed into core/updates_testing Please test Actually the bug could have been seen the other way: ghostscript-devel (really lib{,64}gs-devel could have required the full ghostscript).
The fix I choose is simpler...
(In reply to Thierry Vignaud from comment #32) > And cups-filters-1.0.41-3.mga4 was just pushed into core/updates_testing > Please test Note to self: write an advisory and pass to QA if nobody else beats me to it after initial testing :) (In reply to Thierry Vignaud from comment #32) > And cups-filters-1.0.41-3.mga4 was just pushed into core/updates_testing > Please test This caused me some difficulty, because you haven't changed the version number. But having found the necessary urpmi options to force the package to be updated, I can confirm it fixes the bug for me. (In reply to Martin Whitaker from comment #35) > This caused me some difficulty, because you haven't changed the version > number. Yes he did: http://svnweb.mageia.org/packages/updates/4/cups-filters/current/SPECS/cups-filters.spec?r1=576130&r2=595477 But seems subrel wasn't respected as the built package has the same version as the one in core/release ... :/ (In reply to Florian Hubold from comment #36) > But seems subrel wasn't respected as the built package has the same version > as the one in core/release ... :/ subrel has to be defined before mkrel to work. Added hint to https://wiki.mageia.org/en/Updates_policy#Maintainer_.28or_any_interested_packager.29 and pushed new candidate: cups-filters-1.0.41-3.1.mga4 closing then Status:
NEW =>
RESOLVED
Thierry Vignaud
2014-02-23 11:28:42 CET
Blocks:
(none) =>
12856 (In reply to Thierry Vignaud from comment #38) > closing then Sorry? Do you think this will be magically validated by QA? Please check https://wiki.mageia.org/en/Updates_policy#Maintainer_.28or_any_interested_packager.29 for the procedure and my previous comment https://bugs.mageia.org/show_bug.cgi?id=11684#c34 Status:
RESOLVED =>
REOPENED there is a blocker witch is assigned to qa ;) (In reply to Florian Hubold from comment #39) > Sorry? Do you think this will be magically validated by QA? Are you blind? Status:
REOPENED =>
RESOLVED Thanks a lot. It was a ugly bug. Can't print on a Samsung printer. CC:
(none) =>
nicolas.brouard |