-
Notifications
You must be signed in to change notification settings - Fork 464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MaxJobTime does not match documentation for a value of 0 #5438
Comments
Investigating... |
Analysis from an Ubuntu user who kindly looked into the issue: I enabled "debug2" log level and tested again. I found the following entries in the log:
In the first run of cupsdCheckJobs, the cancel_time of the job is zero, which means to wait indefinitely as expected. In the second run, the cancel_time has been updated to the time of the creation of the job which is wrong. There is now an individual cancellation time for each job, which is initialized to MaxJobTime if it's not explicitely set. See printers.c around line 3450:
So if MaxJobTime is set to 0 - which means never to kill the job - the default for job-cancel-after is set to 0 - which means to kill the job immediately. So I guess there is a missing check for the special value of 0. We're tracking this in Ubuntu 18.04 at: https://bugs.launchpad.net/cups/+bug/1804576 Temporary workaround is to set the MaxJobTime to a very large value instead (e.g. 3 years) |
Probably best to set the job-cancel-after-default value to "no-value" (IPP_TAG_NOVALUE) so that we don't default it... |
According to the documentation:
But setting "MaxJobTime 0" as the document suggests, instead of disabling the cancellation of stuck jobs, causes jobs to be canceled as "stuck" basically immediately. In my testing, perhaps half of the jobs made it through and were printed and half were canceled immediately by CUPS before they could be printed.
Relevant log line:
I [13/Nov/2018:21:41:11 -0600] [Job 2513920] Canceling stuck job after 0 seconds.
The text was updated successfully, but these errors were encountered: