Bug 2218123

Summary: Delays printing to lpd when reserved ports are exhausted
Product: [Fedora] Fedora Reporter: Zdenek Dohnal <zdohnal>
Component: cupsAssignee: Zdenek Dohnal <zdohnal>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: twaugh, zdohnal
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: cups-2.4.6-1.fc38 cups-2.4.6-1.fc37 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-06-30 01:22:35 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:

Description Zdenek Dohnal 2023-06-28 08:48:19 UTC
This bug was initially created as a copy of Bug #2217177

I am copying this bug because Fedora is affected as well.

Description of problem:

  cups_rresvport() doesn't reserve ports less than 512; however,
  lpd_queue() continues decrementing the port number to 0.  This leads
  to delays of ~511 seconds once all ports between 512-1023 are
  exhausted.  Even when ports become available, lpd_queue() still tries
  calling cups_rresvport() with port numbers less than 512, waiting one
  second between each call.

Version-Release number of selected component (if applicable):

  cups-2.3.3op2-16.el9.x86_64

How reproducible:

  100%

Steps to Reproduce:

  1. Create a print queue that sends jobs to an LPD print device.
  2. Submit ~550 jobs to the LPD printer.

  After ~511 jobs have been transfered via LPD, the lpd backend will
  block waiting for reserved ports to move out of TIME_WAIT and become
  available for re-use.

Actual results:

  Even after reserved ports become available for re-use, the lpd backend
  waits ~511 seconds before continuing to send jobs to the LPD print
  device.

Expected results:

  After reserved ports become available for re-use, the lpd backend
  should immediately continue sending jobs to the LPD print device.

Additional info:

  Upstream PR to fix the issue:
  
  Fix delays printing to lpd when reserved ports are exhausted
  https://github.com/OpenPrinting/cups/pull/741

Comment 1 Fedora Update System 2023-06-28 10:04:28 UTC
FEDORA-2023-fac5968b55 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-fac5968b55

Comment 2 Fedora Update System 2023-06-28 10:24:11 UTC
FEDORA-2023-9dbd5b28d4 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-9dbd5b28d4

Comment 3 Fedora Update System 2023-06-29 01:11:42 UTC
FEDORA-2023-9dbd5b28d4 has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-9dbd5b28d4`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-9dbd5b28d4

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 4 Fedora Update System 2023-06-29 01:46:29 UTC
FEDORA-2023-fac5968b55 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-fac5968b55`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-fac5968b55

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2023-06-30 01:22:35 UTC
FEDORA-2023-fac5968b55 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 6 Fedora Update System 2023-07-14 01:19:34 UTC
FEDORA-2023-9dbd5b28d4 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.