[Bug 1890572] [NEW] USB backend never ends if the printer is not connected

Launchpad Bug Tracker 1890572 at bugs.launchpad.net
Fri Aug 7 09:41:10 UTC 2020


You have been subscribed to a public bug by Sebastien Bacher (seb128):

USB backend never ends if the printer is not connected. We have been
able to identify a infinity loop in print_device function in usb-
libusb.c file:

```
  fprintf(stderr, "DEBUG: Printing on printer with URI: %s\n", uri);
  while ((g.printer = find_device(print_cb, uri)) == NULL)
  {
    _cupsLangPrintFilter(stderr, "INFO",
    _("Waiting for printer to become available."));
    sleep(5);
  }
```

It's also easy to test by invoking the backend by hand:

```
# export DEVICE_URI='usb://Printer/Model?serial=?'
# /usr/lib/cups/backend/usb 0 root title 1 '' data.file

DEBUG: Loading USB quirks from "/usr/share/cups/usb".
DEBUG: Loaded 159 quirks.
DEBUG: Printing on printer with URI: usb://Printer/Model?serial=?
DEBUG: libusb_get_device_list=6
INFO: Waiting for printer to become available.
DEBUG: libusb_get_device_list=6
INFO: Waiting for printer to become available.
DEBUG: libusb_get_device_list=6
INFO: Waiting for printer to become available.
DEBUG: libusb_get_device_list=6
INFO: Waiting for printer to become available.
DEBUG: libusb_get_device_list=6
INFO: Waiting for printer to become available.
...

```

Setting a job timeout policy or manually stopping work are not options
for us. We may have jobs that take hours to complete.

** Affects: cups (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: patch
-- 
USB backend never ends if the printer is not connected
https://bugs.launchpad.net/bugs/1890572
You received this bug notification because you are a member of Ubuntu Sponsors Team, which is subscribed to the bug report.



More information about the Ubuntu-sponsors mailing list