I have just verified bionic with version 2.2.7-1ubuntu2.3.

My testing procedure:
1. Switch cups log level to info.
2. Restart cups.
3. Install printer-driver-cups-pdf to have a virtual printer.
4. Replace imagetopdf filter:
sudo mv /usr/lib/cups/filter/imagetopdf /usr/lib/cups/filter/imagetopdf.bkp
5. Install wrapper from comment #6 as replacement:
sudo install -m 755 ~/imagetopdf /usr/lib/cups/filter/imagetopdf
6. Print an image (so it gets picked by the filter wrapper):
lp -d PDF some_image.tiff

With 2.2.7-1ubuntu2.3 (Job 1):
$ grep -i cancel /var/log/cups/error_log 
I [13/Dec/2018:08:49:02 +0100] [Job 1] Canceling stuck job after 0 seconds.

After upgrading to 2.2.7-1ubuntu2.3 (please look at Job 2)
$ grep -i -e cancel -e complete /var/log/cups/error_log
I [13/Dec/2018:08:49:02 +0100] [Job 1] Canceling stuck job after 0 seconds.
I [13/Dec/2018:08:50:09 +0100] Full reload complete.
I [13/Dec/2018:08:50:41 +0100] [Job 2] Job completed.


** Tags removed: verification-needed-bionic
** Tags added: verification-done-bionic

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to cups in Ubuntu.
https://bugs.launchpad.net/bugs/1804576

Title:
  MaxJobTime=0 results in jobs being cancelled immediately instead of
  never

Status in CUPS:
  Fix Released
Status in cups package in Ubuntu:
  Fix Released
Status in cups source package in Trusty:
  Invalid
Status in cups source package in Xenial:
  Fix Committed
Status in cups source package in Bionic:
  Fix Committed
Status in cups source package in Cosmic:
  Fix Committed
Status in cups source package in Disco:
  Fix Released
Status in cups package in Debian:
  Fix Released

Bug description:
  [Impact]

   Setting the cupsd option MaxJobTime to 0 should make the server wait 
indefinitely for the job to be ready for print. Instead, after updating 
job-cancel-after option with MaxJobTime=0 value it results in immediate 
cancelling.
  This leads to problems with using filters that take some time to process - 
the user needs to set MaxJobTime to a ridiculously high value to ensure the job 
is not going to get cancelled instead of just disabling the cancelling timeout.

  [Test Case]

   1. Add MaxJobTime 0 option to /etc/cups/cupsd.conf.
   2. Setup a filter that takes at least several seconds to process.
      (please find a sample imagetopdf wrapper introducing 5s delay)
   3. Submit a print job matching the filter, e.g.
      lp -d my-printer someimage.jpg # jpg uses the imagetopdf wrapper

  Expected result:
  The job is printed after the 5s delay.

  Actual result:
  The job is cancelled.

  [Regression Potential]

   The scope of the change is limited to fixing the MaxJobTime handling
   in scheduler/job.c and scheduler/printers.c. There should be no
   difference in behavior except for the special value of MaxJobTime=0.

  [Other Info]
  Original bug description:

  When using CUPS filters, these filters can take a few seconds to
  complete.

  In this case no documents are allowed to be lost on printing failures,
  so we used to set "MaxJobTime 0" in cupsd.conf which worked on Ubuntu
  14.04.

  With cups on 18.04, you get the following message in /var/log/cups/error_log 
whenever the filter takes a little longer:
  I [12/Nov/2018:14:43:26 +0100] [Job 18] Canceling stuck job after 0 seconds.

  Then, the job is deleted and lost.

  "MaxJobTime 0" is documented as "indefinite wait", but apparently cups
  treats is as "wait almost not at all".

  This issue appears to have also been filed upstream:
  https://github.com/apple/cups/issues/5438

  Temporary workaround is to set the MaxJobTime to a very large value
  instead (e.g. 3 years)

  Trusty is not affected by this bug.

To manage notifications about this bug go to:
https://bugs.launchpad.net/cups/+bug/1804576/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to