Bug 153065

Summary: Disappearing printjobs/cups backend error handling
Product: Red Hat Enterprise Linux 3 Reporter: Harry Venema <h.venema>
Component: cupsAssignee: Tim Waugh <twaugh>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 3.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2005-631 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-09-28 16:57:44 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:
Bug Depends On:    
Bug Blocks: 156320    
Attachments:
Description Flags
error_log/debug2 output none

Description Harry Venema 2005-04-01 08:24:24 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050323 Firefox/1.0.2 Fedora/1.0.2-1.3.1

Description of problem:
When printing to a HP JetDirect or Castelle Lanpress LPD printserver, and the job is not accepted by the printerserver, the print job is canceled and removed by cups.
Browsing through the debug2 output it looks like the printjob is removed from the queue before the exit status of the backend is checked.

Printing works correctly in Fedora Core 3.



Version-Release number of selected component (if applicable):
cups-1.1.17-13.3.27

How reproducible:
Always

Steps to Reproduce:
1. Turn a printer connected to a printserver off. 
2. Send a number of large print jobs to the printserver.

  

Actual Results:  Print jobs are removed/deleted from queue.

Expected Results:  printer queue should be disabled  when printjob is not accepted by printserver.

Additional info:

Comment 1 Harry Venema 2005-04-01 08:27:04 UTC
Created attachment 112574 [details]
error_log/debug2 output

Comment 2 Tim Waugh 2005-04-12 13:49:09 UTC
Please try these packages:

ftp://people.redhat.com/twaugh/tmp/cups-153065/

I suspect that the lpd backend has a negative exit status, which throws out the
logic in the scheduler for differentiating backends from filters.

Comment 3 Harry Venema 2005-04-13 06:52:37 UTC
The new packages don't solve the problem, cups keeps canceling the rejected
printjobs.

Part of error_log:

I [12/Apr/2005:16:07:38 +0200] [Job 33] Attempting to connect to host pstest for
printer raw
I [12/Apr/2005:16:07:38 +0200] [Job 33] Connected from port 515...
D [12/Apr/2005:16:07:38 +0200] [Job 33] lpd_command 02 raw
D [12/Apr/2005:16:07:38 +0200] [Job 33] Sending command string (5 bytes)...
D [12/Apr/2005:16:07:38 +0200] [Job 33] Reading command status...
D [12/Apr/2005:16:07:38 +0200] [Job 33] lpd_command returning 1
D [12/Apr/2005:16:07:38 +0200] UpdateJob: job 33, file 0 is complete.
d [12/Apr/2005:16:07:38 +0200] UpdateJob: Removing fd 5 from InputSet...
D [12/Apr/2005:16:07:38 +0200] CancelJob: id = 33
D [12/Apr/2005:16:07:38 +0200] StopJob: id = 33, force = 0
D [12/Apr/2005:16:07:38 +0200] StopJob: printer state is 3
d [12/Apr/2005:16:07:38 +0200] StopJob: Freeing status buffer...
E [12/Apr/2005:16:07:38 +0200] PID 29499 stopped with status 1!



Comment 4 Tim Waugh 2005-04-13 15:37:46 UTC
Ah, I see what you mean quite clearly now.

I have reported this upstream to see what direction they will go to fix this:
http://www.cups.org/str.php?L1138

In the mean time I will work on a patch to do what I suggested in that report.

Comment 5 Tim Waugh 2005-04-13 16:51:24 UTC
Please try these packages (1.1.17-13.3.27.0.0.3):

ftp://people.redhat.com/twaugh/tmp/cups-153065/


Comment 6 Harry Venema 2005-04-14 07:00:21 UTC
With the latest packages the cupsd daeamon just dies. After removing the history
files from /var/spool/cups the cupsd daemon starts. But after submmiting a new
job the cupsd dies again.

Last few lines of debug2 output:

d [14/Apr/2005:08:56:43 +0200] StartJob: Adding fd 4 to InputSet...
d [14/Apr/2005:08:56:43 +0200] add_job_state_reasons(0xb6f1f008[3], 1)
D [14/Apr/2005:08:56:43 +0200] ProcessIPPRequest: 3 status_code=0
d [14/Apr/2005:08:56:43 +0200] WriteClient: Removing fd 3 from OutputSet...
I [14/Apr/2005:08:56:43 +0200] [Job 1] Attempting to connect to host pstest for
printer raw
I [14/Apr/2005:08:56:43 +0200] [Job 1] Connected from port 515...
D [14/Apr/2005:08:56:43 +0200] [Job 1] lpd_command 02 raw
D [14/Apr/2005:08:56:43 +0200] [Job 1] Sending command string (5 bytes)...
D [14/Apr/2005:08:56:43 +0200] [Job 1] Reading command status...
D [14/Apr/2005:08:56:43 +0200] [Job 1] lpd_command returning -1
E [14/Apr/2005:08:56:43 +0200] PID 26387 stopped with status 1!
D [14/Apr/2005:08:56:43 +0200] UpdateJob: job 1, file 0 is complete.
d [14/Apr/2005:08:56:43 +0200] UpdateJob: Removing fd 4 from InputSet...
D [14/Apr/2005:08:56:43 +0200] StopJob: id = 1, force = 0
D [14/Apr/2005:08:56:43 +0200] StopJob: printer state is 3
d [14/Apr/2005:08:56:43 +0200] StopJob: Freeing status buffer...
d [14/Apr/2005:08:56:43 +0200] ReadClient() 3, used=0
D [14/Apr/2005:08:56:43 +0200] CloseClient() 3
d [14/Apr/2005:08:56:43 +0200] CloseClient: Removing fd 3 from InputSet and
OutputSet...


Comment 7 Tim Waugh 2005-04-14 15:58:27 UTC
This was due to a change in main.c that I missed.  I have rectified this and can
no longer produce this crash.

Please try these packages (1.1.17-13.3.27.0.0.4):

ftp://people.redhat.com/twaugh/tmp/cups-153065/

I hope this time we'll get it!  Thanks for your continued testing.

Comment 8 Harry Venema 2005-04-15 06:35:44 UTC
The 1.1.17-13.3.27.0.0.4 packages do the trick. No more disappearing print jobs.
The only minor thing missing is an error message in the lpstat output that the
print job failed. But I can live with that. 
Tnx.


Comment 9 Tim Waugh 2005-04-15 15:56:25 UTC
Fixed in CVS.  This fix will be included in any future bug-fix update.  Red Hat
Enterprise Linux 4 is not affected.  Thanks again for the report and for testing.

Comment 14 Red Hat Bugzilla 2005-09-28 16:57:44 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2005-631.html