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 1625108

Summary: Message 'Waiting for job to complete.' stays after successful printing
Product: [Fedora] Fedora Reporter: Zdenek Dohnal <zdohnal>
Component: ghostscriptAssignee: David Kaspar // Dee'Kej <deekej>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: ajschorr, deekej, jpopelka, twaugh, zdohnal
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ghostscript-9.24-1.fc28 ghostscript-9.24-3.fc29 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-11 16:54:06 UTC Type: Bug
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
journald logs for job in question none

Description Zdenek Dohnal 2018-09-04 07:03:53 UTC
Bug found when solving https://bugzilla.redhat.com/show_bug.cgi?id=1621949 .

However: on both 2.2.6-19 and 2.2.6-20, I am having a different problem. After printing a job to my network printer, it never disappears from the queue on my Fedora laptop. It says "Waiting for job to complete.", even though it printed long ago. For example, the test I just printed:

bash$ lpstat -t
scheduler is running
system default destination: Epson-XP-830
device for Epson-XP-830: ipp://epson-xp-830/ipp/print
Epson-XP-830 accepting requests since Mon 03 Sep 2018 10:55:17 PM EDT
printer Epson-XP-830 is idle.  enabled since Mon 03 Sep 2018 10:55:17 PM EDT
        Waiting for job to complete.
Epson-XP-830-180        schorr           15360   Mon 03 Sep 2018 10:54:45 PM EDT

But the printout is already on the printer!

So there seems to be a new bug.
-------------------------------------------

Comment 1 Zdenek Dohnal 2018-09-04 07:46:13 UTC
Created attachment 1480683 [details]
journald logs for job in question

I managed to reproduce the issue (test.txt -> $ echo "test" > test.txt):

$ lp -d HP_Officejet_Pro_8500_A909a test.txt

$ lpstat -t
printer HP_Officejet_Pro_8500_A909a is idle.  enabled since Tue 04 Sep 2018 09:08:23 AM CEST
	Waiting for printer to finish.

$ journalctl -u cups JID=381 > job-381.out (attached)

The error seems to happen in ghostscript, because gstoraster filter from cups-filter calls ghostscript as:

gs -dQUIET -dPARANOIDSAFER -dNOPAUSE -dBATCH -dNOINTERPOLATE -dNOMEDIAATTRS -sstdout=%stderr -sOutputFile=%stdout -sDEVICE=pdfwrite -dCompatibilityLevel=1.3 -dAutoRotatePages=/None -dAutoFilterColorImages=false -dNOPLATFONTS -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/printer -dColorConversionStrategy=/LeaveColorUnchanged -r600x600 -dDEVICEWIDTHPOINTS=612 -dDEVICEHEIGHTPOINTS=792 -I/usr/share/cups/fonts -c \'<</.HWMargins[9.360000 9.360000 9.359985 9.359985] /Margins[0 0]>>setpagedevice\' -f -_

I think it is connected to https://github.com/apple/cups/issues/5392 , where Chris Liddel, the ghostscript maintainer, told us so.
Here is the patch http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=150c8f69646b .
David, would you mind looking into it?

Comment 3 Zdenek Dohnal 2018-09-04 08:14:32 UTC
(In reply to Zdenek Dohnal from comment #1)
> $ lpstat -t
> printer HP_Officejet_Pro_8500_A909a is idle.  enabled since Tue 04 Sep 2018
> 09:08:23 AM CEST
> 	Waiting for printer to finish.
> 
After this, you can see the job in the queue, although it is correctly printed.

$ lpstat -o HP_Officejet_pro_8500_A909a
HP_Officejet_Pro_8500_A909a-381 zdohnal           1024 ...

When you open cups web ui at localhost:631, you can see the job in the queue  with message 'Filter failed'. Similar message you can find in journald.

Comment 4 Zdenek Dohnal 2018-09-04 08:20:26 UTC
(In reply to Zdenek Dohnal from comment #1)
> I think it is connected to https://github.com/apple/cups/issues/5392 , where
> Chris Liddel, the ghostscript maintainer, told us so.
At least it is similar to it - I do not think it is coincidence to have such similar error on the same filter in such small time frame.

Comment 5 David Kaspar // Dee'Kej 2018-09-04 09:11:48 UTC
I will be doing a rebase to ghostscript-9.24 as soon as it is out, which should also resolve this issue.

Comment 6 Andrew Schorr 2018-09-04 14:25:30 UTC
Hi, would you still like me to troubleshoot this on my system, or did you already gather all the necessary information?

Thanks,
Andy

Comment 7 Zdenek Dohnal 2018-09-05 10:58:39 UTC
I think I'm able to get necessary info by myself, so you don't need to troubleshoot it for now. But it would be great if you are willing to check if it works after the fix.

Thanks!
Zdenek

Comment 8 Fedora Update System 2018-09-06 15:02:02 UTC
ghostscript-9.24-1.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-ce5fba9e1a

Comment 9 Fedora Update System 2018-09-07 09:40:14 UTC
ghostscript-9.24-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-56221eb24b

Comment 10 Fedora Update System 2018-09-11 16:54:06 UTC
ghostscript-9.24-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

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

Comment 12 Fedora Update System 2018-09-14 20:02:20 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 13 Fedora Update System 2018-09-21 05:34:48 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.