USB backend never ends if the printer is not connected
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cups (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
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(
{
_cupsLangPr
_("Waiting for printer to become available."));
sleep(5);
}
```
It's also easy to test by invoking the backend by hand:
```
# export DEVICE_
# /usr/lib/
DEBUG: Loading USB quirks from "/usr/share/
DEBUG: Loaded 159 quirks.
DEBUG: Printing on printer with URI: usb://Printer/
DEBUG: libusb_
INFO: Waiting for printer to become available.
DEBUG: libusb_
INFO: Waiting for printer to become available.
DEBUG: libusb_
INFO: Waiting for printer to become available.
DEBUG: libusb_
INFO: Waiting for printer to become available.
DEBUG: libusb_
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.
description: | updated |
description: | updated |
description: | updated |
description: | updated |
Changed in cups (Ubuntu): | |
importance: | Undecided → Low |
Changed in cups: | |
status: | Unknown → New |
Changed in cups: | |
status: | New → Fix Released |
no longer affects: | cups |
We have prepared a patch for the package in Ubuntu 18.04 (CUPS 2.2.7). We would like to request to include a solution like this for at least Ubuntu 18.04.
We also made a pull request in the official CUPS repository:
https:/ /github. com/apple/ cups/issues/ 5817 /github. com/apple/ cups/pull/ 5818
https:/
However, we don't have plans to upgrade or change the distribution we use (Ubuntu 18.04), and this issue is affecting us considerably.