Bug 1838449

Summary: ipp/socket backends connect to turned off device for eternity (contimeout is not applied)
Product: Red Hat Enterprise Linux 8 Reporter: Zdenek Dohnal <zdohnal>
Component: cupsAssignee: Zdenek Dohnal <zdohnal>
Status: CLOSED ERRATA QA Contact: Petr Dancak <pdancak>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.4CC: omejzlik, pdancak, thozza
Target Milestone: rcKeywords: Patch, TestCaseProvided, Triaged
Target Release: 8.0Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: cups-2.2.6-36.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1838455 (view as bug list) Environment:
Last Closed: 2020-11-04 01:42:20 UTC Type: Bug
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: 1689207    
Attachments:
Description Flags
Proposed patch none

Description Zdenek Dohnal 2020-05-21 07:59:34 UTC
Created attachment 1690547 [details]
Proposed patch

The bug was found during solving https://bugzilla.redhat.com/show_bug.cgi?id=1689207 .

It was found out that httpAddrConnect2() now sets errno EINPROGRESS when it tries to connect to a device which is turned off/network is down/ or when any 'device unreachable' scenarios.

It influences ipp and socket backends, which don't catch EINPROGRESS -> contimeout is not applied, resulting into the backend is running with a job till the job is cancelled manually.

Reported upstream here https://github.com/apple/cups/pull/5782

The fix will set 2 different errnos now:

1) ETIMEDOUT when remaining time in httpAddrConnect2() is reached
2) EHOSTDOWN when all addresses are tried and there are no open file descriptors

This will make backends to apply contimeout and the job will be retried/aborted (according print queue error policy) and queue disabled in the future.

Comment 12 errata-xmlrpc 2020-11-04 01:42:20 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Low: cups security and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:4469