Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1626818 - ghostscript-9.23-6 causes "filter failed" error in cups
Summary: ghostscript-9.23-6 causes "filter failed" error in cups
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ghostscript
Version: 28
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: David Kaspar // Dee'Kej
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1627773 1627834 1628050 1628295 1628699 1628845 1629086 1629625 (view as bug list)
Depends On:
Blocks: 1626997
TreeView+ depends on / blocked
 
Reported: 2018-09-09 07:54 UTC by Davide Repetto
Modified: 2019-05-29 14:48 UTC (History)
26 users (show)

Fixed In Version: ghostscript-9.24-3.fc28 ghostscript-9.24-3.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1626997 (view as bug list)
Environment:
Last Closed: 2018-09-17 03:55:13 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Cups error log (64.71 KB, text/plain)
2018-09-09 07:54 UTC, Davide Repetto
no flags Details
simple eps logo (332.69 KB, image/x-eps)
2018-09-11 04:36 UTC, Thomas Müller
no flags Details

Description Davide Repetto 2018-09-09 07:54:12 UTC
Created attachment 1481846 [details]
Cups error log

Description of problem:
=======================
ghostscript-9.23-6 causes a “Filter failed” error when printing on HP-Photosmart-C5200-series and possibly other printer too.
The print is coming out fine but stays in the printer queue for ever, due to the failure.

Version-Release number of selected component:
=============================================
ghostscript-9.23-6.fc28.x86_64 

I did not test the ghostscript-9.24-1.fc28.x86_64 in updates-testing, but that 9.24-1 release may very well be affected too.


Additional info:
================
https://bbs.archlinux.org/viewtopic.php?id=239996
https://github.com/apple/cups/issues/5389
https://bugs.ghostscript.com/show_bug.cgi?id=699713

Comment 1 David Kaspar // Dee'Kej 2018-09-09 09:46:40 UTC
(In reply to Davide Repetto from comment #0)
> I did not test the ghostscript-9.24-1.fc28.x86_64 in updates-testing, but
> that 9.24-1 release may very well be affected too.

The ghostscript-9.24-1 has some zero-day patches regarding the CUPS. Please, test it first, before we proceed here. I'm limited by time of what can I do/fix right now. Thanks!

Comment 2 Thomas Müller 2018-09-09 15:16:33 UTC
Hi,

same here with ghostscript-9.24-1.fc28.x86_64.


Debug output:
Sep 09 17:07:11 host cupsd[24141]: [Job 281] Running command line for gs: gs -q -dNOPAUSE -dBATCH -dSAFER -dNOMEDIAATTRS -sDEVICE=ps2write -dShowAcroForm -sOUTPUTFILE=%stdout -dLanguageLevel=2 -r1200 -dCompressFonts=false -dNoT3CCITT -dNOINTERPOLATE -c \'save pop\' -f /var/spool/cups/tmp/cupsKHYBj3
Sep 09 17:07:11 host cupsd[24141]: [Job 281] Started filter gs (PID 29770)
Sep 09 17:07:11 host cupsd[24141]: [Job 281] Started filter pstops (PID 29771)
Sep 09 17:07:11 host cupsd[24141]: [Job 281] ./base/gsicc_manage.c:1244: gsicc_open_search(): Could not find ps_gray.icc
Sep 09 17:07:11 host cupsd[24141]: [Job 281] + ./base/gsicc_manage.c:255: gsicc_initialize_iccsmask(): failed to load gray smask profile
Sep 09 17:07:11 host cupsd[24141]: [Job 281] Page = 595x842; 0,0 to 595,842
Sep 09 17:07:11 host cupsd[24141]: [Job 281] slow_collate=0, slow_duplex=0, slow_order=0
Sep 09 17:07:11 host cupsd[24141]: [Job 281] This document does not conform to the Adobe Document Structuring Conventions and may not print correctly.
Sep 09 17:07:11 host cupsd[24141]: [Job 281] PAGE: 1 1
Sep 09 17:07:11 host cupsd[24141]: [Job 281] ./base/gsicc_manage.c:1244: gsicc_open_search(): Could not find default_rgb.icc
Sep 09 17:07:11 host cupsd[24141]: [Job 281] | ./base/gsicc_manage.c:2025: gsicc_set_device_profile(): cannot find device profile
Sep 09 17:07:11 host cupsd[24141]: [Job 281] GPL Ghostscript 9.24: Unrecoverable error, exit code 1
Sep 09 17:07:11 host cupsd[24141]: [Job 281] ./base/gsicc_manage.c:1244: gsicc_open_search(): Could not find default_gray.icc
Sep 09 17:07:11 host cupsd[24141]: [Job 281] | ./base/gsicc_manage.c:2025: gsicc_set_device_profile(): cannot find device profile
Sep 09 17:07:11 host cupsd[24141]: [Job 281] PID 29770 (gs) stopped with status 1!
Sep 09 17:07:11 host cupsd[24141]: [Job 281] PID 29771 (pstops) exited with no errors.
Sep 09 17:07:11 host cupsd[24141]: [Job 281] PID 29768 (/usr/lib/cups/filter/pdftops) stopped with status 1.
Sep 09 17:07:11 host cupsd[24141]: [Job 281] Hint: Try setting the LogLevel to "debug" to find out more.
Sep 09 17:07:11 host cupsd[24141]: [Job 281] GPL Ghostscript 9.24: Unrecoverable error, exit code 1
Sep 09 17:07:11 host cupsd[24141]: [Job 281] PID 29769 (/usr/lib/cups/backend/cups-pdf) exited with no errors.
Sep 09 17:07:11 host cupsd[24141]: [Job 281] End of messages
Sep 09 17:07:11 host cupsd[24141]: [Job 281] printer-state=3(idle)
Sep 09 17:07:11 host cupsd[24141]: [Job 281] printer-state-message="Filter failed"
Sep 09 17:07:11 host cupsd[24141]: [Job 281] printer-state-reasons=none


Relevant lines might be those regarding "gsicc_open_search()".
Found a similar report here: https://bugs.archlinux.org/task/59952

Comment 3 Davide Repetto 2018-09-09 19:47:11 UTC
(In reply to David Kaspar [Dee'Kej] from comment #1)
> (In reply to Davide Repetto from comment #0)
> > I did not test the ghostscript-9.24-1.fc28.x86_64 in updates-testing, but
> > that 9.24-1 release may very well be affected too.
> 
> The ghostscript-9.24-1 has some zero-day patches regarding the CUPS. Please,
> test it first, before we proceed here.

Tested just now. :(
Unfortunately I have to confirm that ghostscript-9.24-1.fc28.x86_64 causes a “Filter failed” error in cups too.

> I'm limited by time of what can I do/fix right now. Thanks!

There is activity upstream on this one, so you may just want to wait for it, and pull when it's ready.

Comment 4 David Kaspar // Dee'Kej 2018-09-10 09:14:17 UTC
This should be the upstream fix:
http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=bc3df0773fcc

I'll backport it to ghostscript-9.24-1.

Comment 5 David Kaspar // Dee'Kej 2018-09-10 09:17:58 UTC
(In reply to David Kaspar [Dee'Kej] from comment #4)
> This should be the upstream fix:
> http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=bc3df0773fcc
> 
> I'll backport it to ghostscript-9.24-1.

Scratch that, this commit is already in ghostscript-9.24-1.

(In reply to Davide Repetto from comment #3)
> There is activity upstream on this one, so you may just want to wait for it,
> and pull when it's ready.

Could you please post the link to the upstream bug regarding this issue here? Thanks!

Comment 6 David Kaspar // Dee'Kej 2018-09-10 09:25:00 UTC
I think I found the bug you were mentioning:
https://bugs.ghostscript.com/show_bug.cgi?id=699721

Upstream is not sure if the 2 commits there actually fix this. So, I'll prepare a new build, and you'll have to try it (I don't have the printer to reproduce this).

Comment 7 Thomas Müller 2018-09-10 09:39:47 UTC
(In reply to David Kaspar [Dee'Kej] from comment #6)
> I think I found the bug you were mentioning:
> https://bugs.ghostscript.com/show_bug.cgi?id=699721
> 
> Upstream is not sure if the 2 commits there actually fix this. So, I'll
> prepare a new build, and you'll have to try it (I don't have the printer to
> reproduce this).

I have observed this by printing to a PDF, i.e. using cups-pdf, so you wouldn't necessarily need a specific printer hardware to test this...

Comment 8 David Kaspar // Dee'Kej 2018-09-10 09:45:06 UTC
I've created a scratch-build for testing purposes here:
https://dkaspar.fedorapeople.org/share/scratch-build/fedora/

Please, download the the relevant packages (which you have currently installed), update them and test if the problem still persists for you.

If this scratch-build works for you, then I will submit the changes into Fedora. However, first I want to be sure the updated version actually fixes the issues.

Comment 9 David Kaspar // Dee'Kej 2018-09-10 09:46:11 UTC
(In reply to Thomas Müller from comment #7)
> I have observed this by printing to a PDF, i.e. using cups-pdf, so you
> wouldn't necessarily need a specific printer hardware to test this...

Can you provide an exact reproducer, please? It would be awesome if we could share this with upstream, so they could add this to their regression testsuite.

Comment 10 Thomas Müller 2018-09-11 04:36:33 UTC
Created attachment 1482265 [details]
simple eps logo

It's even possible to reproduce this using epspdf on the command line:

$ epspdf Ghostscript.eps
  ./base/gsicc_manage.c:1244: gsicc_open_search(): Could not find default_rgb.icc 
| ./base/gsicc_manage.c:2025: gsicc_set_device_profile(): cannot find device profile
  ./base/gsicc_manage.c:1244: gsicc_open_search(): Could not find default_rgb.icc 
| ./base/gsicc_manage.c:2025: gsicc_set_device_profile(): cannot find device profile
  ./base/gsicc_manage.c:1244: gsicc_open_search(): Could not find default_rgb.icc 
| ./base/gsicc_manage.c:2025: gsicc_set_device_profile(): cannot find device profile
Error: /rangecheck in .installpagedevice
Operand stack:
   --nostringval--   --dict:208/214(ro)(L)--   --nostringval--   --nostringval--   false
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   2015   1   3   %oparray_pop   2014   1   3   %oparray_pop   1936   1   3   %oparray_pop   --nostringval--   1920   1   3   %oparray_pop   --nostringval--   --nostringval--
Dictionary stack:
   --dict:969/1684(ro)(G)--   --dict:0/20(G)--   --dict:78/200(L)--
Current allocation mode is local
GPL Ghostscript 9.24: Unrecoverable error, exit code 1
  ./base/gsicc_manage.c:1244: gsicc_open_search(): Could not find default_gray.icc 
| ./base/gsicc_manage.c:2025: gsicc_set_device_profile(): cannot find device profile

epspdf is from a different package but appears to use ghostscript under the hood.

Comment 11 Thomas Müller 2018-09-11 04:43:21 UTC
(In reply to David Kaspar [Dee'Kej] from comment #8)
> I've created a scratch-build for testing purposes here:
> https://dkaspar.fedorapeople.org/share/scratch-build/fedora/
> 
> Please, download the the relevant packages (which you have currently
> installed), update them and test if the problem still persists for you.
> 
> If this scratch-build works for you, then I will submit the changes into
> Fedora. However, first I want to be sure the updated version actually fixes
> the issues.

Unfortunately I can't simply install them on Fedora 28 as they are built against a newer glibc (rawhide I presume?):
 Problem 1: cannot install the best update candidate for package libgs-9.24-1.fc28.x86_64
  - nothing provides libc.so.6(GLIBC_2.28)(64bit) needed by libgs-9.24-1.fc30.1.x86_64

Comment 12 Davide Repetto 2018-09-11 11:58:21 UTC
(In reply to David Kaspar [Dee'Kej] from comment #8)
> I've created a scratch-build for testing purposes here:
> https://dkaspar.fedorapeople.org/share/scratch-build/fedora/
> 
> Please, download the the relevant packages (which you have currently
> installed), update them and test if the problem still persists for you.
> 
> If this scratch-build works for you, then I will submit the changes into
> Fedora. However, first I want to be sure the updated version actually fixes
> the issues.

I've rebuilt it for fedora 28, tested it, and it works.


p.s. For those who want to test it now, mock makes building from source as simple as:

 sudo mock ghostscript-9.24-1.fc30.1.src.rpm

Comment 13 David Kaspar // Dee'Kej 2018-09-11 12:05:43 UTC
(In reply to Davide Repetto from comment #12)
> I've rebuilt it for fedora 28, tested it, and it works.

Thanks for letting me know. :) I will push this into Fedora testing repo soon.

Also, be aware there are some other issues with current CUPS in Fedora 29, which can cause another printing issues. My colleague maintaining CUPS is already looking at it... ;)

Comment 14 Zdenek Dohnal 2018-09-11 16:12:36 UTC
*** Bug 1627834 has been marked as a duplicate of this bug. ***

Comment 15 Zdenek Dohnal 2018-09-11 16:30:45 UTC
*** Bug 1627834 has been marked as a duplicate of this bug. ***

Comment 16 Edward 2018-09-12 23:42:34 UTC
Having the same "filter failed" issue. Printer is HP Deskjet 3520 all-in-one.

Comment 17 John Horne 2018-09-13 12:58:36 UTC
(In reply to David Kaspar [Dee'Kej] from comment #8)
> I've created a scratch-build for testing purposes here:
> https://dkaspar.fedorapeople.org/share/scratch-build/fedora/
> 
Thanks for that. I had this problem with a Ricoh printer.

Used the (FC30) ghostscript source RPM you provided and rebuilt it on Fedora 28. Installed the relevant (newly built) RPMs, and now printing works fine again.

Comment 18 amaxware 2018-09-13 13:45:39 UTC
(In reply to John Horne from comment #17)
> (In reply to David Kaspar [Dee'Kej] from comment #8)
> > I've created a scratch-build for testing purposes here:
> > https://dkaspar.fedorapeople.org/share/scratch-build/fedora/
> > 
> Thanks for that. I had this problem with a Ricoh printer.
> 
> Used the (FC30) ghostscript source RPM you provided and rebuilt it on Fedora
> 28. Installed the relevant (newly built) RPMs, and now printing works fine
> again.

Can you document for a novice like me, how to install the source RPM so that I can get my printer working?

My current version is : ghostscript-9.24-1.fc28.x86_64

Once Fedora upstream is fixed, will it overwrite the "source" one installed?

Comment 19 John Horne 2018-09-13 14:14:24 UTC
I did not do it this way, but perhaps as mentioned in comment 12 it would be easiest to just run 'sudo mock ghostscript-9.24-1.fc30.1.src.rpm'. You may well need to install 'mock' first using 'dnf install mock'.

I did it by installing the source rpm, and then running rpmbuild. Once that was done, then install the relevant rebuilt rpms.
Steps for this:
1) rpm -qa | grep -iE 'ghostscript|libgs' (keep this for later)
2) Download the ghostscript FC30 source rpm.
3) rpm -i ghostscript-9.24-1.fc30.1.src.rpm
4) cd rpmbuild/SPECS
5) rpmbuild -ba ghostscirpt.spec
If you don't have rpmbuild installed, then run 'dnf install rpm-build'.
The rpmbuild will probably throw up some dependency errors - missing packages. You will need to install them, and then rerun the rpmbuild command.
6) cd ../RPMS/x86_64 (or whatever architecture your machine is)
7) dnf install ghostscript...rpm libgs...rpm ...
You only need to install whatever packages you already had installed (from step 1)

As said, using mock may be easier. I've been doing the above for many years now, so it is relatively quick and easy for me.

> Once Fedora upstream is fixed, will it overwrite the "source" one installed?
>
Yes.

Comment 20 dominique 2018-09-13 16:01:25 UTC
Thers is in koji a package ghostscript-9.24-2.fc28 that solve issue : 
https://koji.fedoraproject.org/koji/buildinfo?buildID=1142736

Comment 21 Zdenek Dohnal 2018-09-14 05:56:17 UTC
*** Bug 1628699 has been marked as a duplicate of this bug. ***

Comment 22 amaxware 2018-09-14 11:05:58 UTC
(In reply to John Horne from comment #19)
> I did not do it this way, but perhaps as mentioned in comment 12 it would be
> easiest to just run 'sudo mock ghostscript-9.24-1.fc30.1.src.rpm'. You may
> well need to install 'mock' first using 'dnf install mock'.
> 
> I did it by installing the source rpm, and then running rpmbuild. Once that
> was done, then install the relevant rebuilt rpms.
> Steps for this:
> 1) rpm -qa | grep -iE 'ghostscript|libgs' (keep this for later)
> 2) Download the ghostscript FC30 source rpm.
> 3) rpm -i ghostscript-9.24-1.fc30.1.src.rpm
> 4) cd rpmbuild/SPECS
> 5) rpmbuild -ba ghostscirpt.spec
> If you don't have rpmbuild installed, then run 'dnf install rpm-build'.
> The rpmbuild will probably throw up some dependency errors - missing
> packages. You will need to install them, and then rerun the rpmbuild command.
> 6) cd ../RPMS/x86_64 (or whatever architecture your machine is)
> 7) dnf install ghostscript...rpm libgs...rpm ...
> You only need to install whatever packages you already had installed (from
> step 1)
> 
> As said, using mock may be easier. I've been doing the above for many years
> now, so it is relatively quick and easy for me.
> 
> > Once Fedora upstream is fixed, will it overwrite the "source" one installed?
> >
> Yes.

John Horne: I was able to follow that, and it worked, thanks.
It appears that there is an "official" fix making it's way into Fedora updates.

Comment 23 Michael J Gruber 2018-09-14 12:48:46 UTC
I noticed a similar problem (scribus importing CMYK-eps, the called gs fails). It is not fixed with 9.24-2 from koji. Works fine with 9.23-1 (downgrade from 9.24-1).

Comment 24 Fedora Update System 2018-09-14 13:40:57 UTC
ghostscript-9.24-3.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-c39ae23dc8

Comment 25 Fedora Update System 2018-09-14 13:44:15 UTC
ghostscript-9.24-3.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-81ee973d7c

Comment 26 David Kaspar // Dee'Kej 2018-09-14 13:45:56 UTC
*** Bug 1628050 has been marked as a duplicate of this bug. ***

Comment 27 David Kaspar // Dee'Kej 2018-09-14 13:46:50 UTC
*** Bug 1627773 has been marked as a duplicate of this bug. ***

Comment 28 David Kaspar // Dee'Kej 2018-09-14 13:47:55 UTC
*** Bug 1628295 has been marked as a duplicate of this bug. ***

Comment 29 David Kaspar // Dee'Kej 2018-09-14 13:48:30 UTC
*** Bug 1628845 has been marked as a duplicate of this bug. ***

Comment 30 Roger Noble 2018-09-14 14:36:46 UTC
(In reply to Fedora Update System from comment #24)
> ghostscript-9.24-3.fc28 has been submitted as an update to Fedora 28.
> https://bodhi.fedoraproject.org/updates/FEDORA-2018-c39ae23dc8

Fixes it for me.

Comment 31 Stefan Schwarzer 2018-09-14 18:59:11 UTC
(In reply to Fedora Update System from comment #24)
> ghostscript-9.24-3.fc28 has been submitted as an update to Fedora 28.
> https://bodhi.fedoraproject.org/updates/FEDORA-2018-c39ae23dc8

I can confirm that I don't see the problem anymore after a recent Ghostscript update on Fedora 28.

Comment 32 Fedora Update System 2018-09-14 20:01:36 UTC
ghostscript-9.24-3.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-81ee973d7c

Comment 33 Fedora Update System 2018-09-14 23:49:15 UTC
ghostscript-9.24-3.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-c39ae23dc8

Comment 34 Rudolf E. Steiner 2018-09-15 06:17:25 UTC
The reported problem is solved with "ghostscript-9.24-3.fc2[8-9]".

Comment 35 Norman Smith 2018-09-15 21:14:05 UTC
Today I updated Fedora 29 and my cups-pdf died.  I updated to 9.24-3 from updates testing and it cleared my problem.

Comment 36 Fedora Update System 2018-09-17 03:55:13 UTC
ghostscript-9.24-3.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 37 Zdenek Dohnal 2018-09-17 13:02:06 UTC
*** Bug 1629086 has been marked as a duplicate of this bug. ***

Comment 38 David Kaspar // Dee'Kej 2018-09-17 13:25:27 UTC
*** Bug 1629625 has been marked as a duplicate of this bug. ***

Comment 39 Fedora Update System 2018-09-21 05:33:55 UTC
ghostscript-9.24-3.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

Comment 40 Stormy 2019-01-14 07:00:06 UTC
(In reply to amaxware from comment #18)
> (In reply to John Horne from comment #17)
> > (In reply to David Kaspar [Dee'Kej] from comment #8)
> > > I've created a scratch-build for testing purposes here:
> > > https://whatstatus.co/guess-ill-die
> > > 
> > Thanks for that. I had this problem with a Ricoh printer.
> > 
> > Used the (FC30) ghostscript source RPM you provided and rebuilt it on Fedora
> > 28. Installed the relevant (newly built) RPMs, and now printing works fine
> > again.
> 
> Can you document for a novice like me, how to install the source RPM so that
> I can get my printer working?
> 
> My current version is : ghostscript-9.24-1.fc28.x86_64
> 
> Once Fedora upstream is fixed, will it overwrite the "source" one installed?

If this scratch-build works for you, then I will submit the changes into Fedora. However, first I want to be sure the updated version actually fixes the issues.


Note You need to log in before you can comment on or make changes to this bug.