BrowsePoll retains notification sequence across subscription replacement; new queues appear only after expiry/full refresh
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 67/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- c
- Ambito
- backend, networking
Direzione di ricerca
Read the subscription creation and lease-expiry paths in cups-browsed, using the source excerpts in source-review.txt as a starting point; then trace how later notification requests use context->sequence_number + 1. Reproduce with the attached configuration and logs, letting a subscription expire before adding a shared dummy queue. Done when a replacement subscription tracks notifications from its own sequence position and the new queue is discovered without waiting for another full refresh.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
New shared queues on a remote CUPS server are not promptly discovered by cups-browsed despite regular BrowsePoll requests. Discovery recovers when the remote subscription expires, cups-browsed creates a replacement subscription, and it requests the full printer list.
Architecture: remote CUPS server → local CUPS server. The problem was initially observed on a remote server in our deployed environment and then in a separate container test using a 180-second default lease and 10-second polling interval.
The test uses shared dummy raw queues; no physical printer or print job is needed. This concerns queue discovery, so application names, sample documents, spool files and physical printer models are not applicable to the reproduction. The dummy upstream raw queues have no PPD.
Observed behaviour — 9 November 2026
Time - Observation
14:43:45 - Subscription 399 created; full printer-list request follows.
14:45:33 - Remote queue cb_after3 successfully added; authenticated request returns HTTP 200 / IPP successful-ok.
14:46:19 - Local lpstat -p still does not list cb_after3.
14:46:35 - Remote notification poll reports no events.
14:46:45 - Subscription 399 expires; subscription 401 created; full printer-list request follows.
14:46:46 - cb_after3 discovered, approximately 73 seconds after remote creation.
14:46:56 onward - Captured requests for replacement subscription 401 ask for sequence 1015, also seen for earlier subscription 352.
The key expiry/discovery sequence is:
14:46:45 [BrowsePoll REMOTE-IP:631]: Lease expired
14:46:45 [BrowsePoll REMOTE-IP:631]: IPP-Create-Subscription
14:46:45 [BrowsePoll REMOTE-IP:631]: subscription ID=401
14:46:45 [BrowsePoll REMOTE-IP:631]: CUPS-Get-Printers
14:46:46 Found CUPS queue/class: cb_after3 on host REMOTE-IP.
Prefixes are shortened here; the attached logs preserve the available original context. The first captured request for the replacement subscription includes:
2026-11-09T14:46:56.645674+00:00 cupsdProcessIPPRequest: notify-subscription-ids integer '401'
2026-11-09T14:46:56.645695+00:00 cupsdProcessIPPRequest: notify-sequence-numbers integer '1015'
This request is approximately 11 seconds after subscription creation. “First captured” refers to the supplied excerpts; they do not prove that no earlier request occurred. Further requests at 14:47:06 and 14:48:16 also request 1015.
The supplied excerpts do not show the requested sequence for subscription 399 or enumerate the events available on subscription 401. Delayed discovery occurred under 399; the requests for 401 show that the high requested sequence persisted after the refresh that recovered discovery. We therefore distinguish the observed behaviour from the suspected cause.
To Reproduce
- Use a separate test CUPS server and cups-browsed client. Configure the client with
BrowsePoll REMOTE-SERVER:631,BrowseInterval 10, and debug logging. SetDefaultLeaseDuration 180andLogLevel debug2on the upstream test server before starting the client. - Create and share a dummy seed queue. Generate printer-state changes and let cups-browsed consume notifications, confirming that its requested sequence advances.
- Let the remote subscription expire and be replaced without restarting cups-browsed. Wait for the accompanying full printer-list refresh to finish.
- Add and share another dummy queue, then observe notification requests and local queue availability.
- Check whether discovery occurs only at the next expiry/full refresh, and capture the requested sequence for the replacement subscription.
Exact commands and the lab's configuration template are attached in reproduction.txt, client-config-template.txt and upstream-test-settings.txt. These describe the test setup.
Expected behavior
New shared queues should be discovered through the normal notification/polling cycle without waiting for subscription expiry. Notification tracking should be initialised for a new subscription rather than retaining the previous subscription's sequence position.
System information
- Reported environment: Ubuntu 24.04;
cupsandcups-daemon2.4.7-1.2ubuntu7.14;cups-browsed2.0.0-0ubuntu10.3. - Separate test client: Ubuntu 24.04 container; cups-browsed pinned to
2.0.0-0ubuntu10.3; CUPS dependencies installed from Ubuntu repositories. - Exact upstream and test-container package inventories have not yet been captured separately. The reported versions above should not be assumed to apply to both hosts.
- Distribution binaries, not a custom cups-browsed build; custom
./configureoptions are not applicable to this test.
Latest upstream source check
Source inspection on 9 November 2026 found the missing sequence reset in both the latest release 2.1.1 (089450357e61673fa9871b927c4b3b6cea4690a1) and master (8f9b98b5f7a7f2ae073ef03d90a53b1c2c8a4a46). Successful subscription creation assigns the new ID without resetting the sequence; the expiry branch calls it and requests a full refresh. Later requests use context->sequence_number + 1.
There is a reset to zero in the separate generic-error branch, but not in the lease-expiry branch. See source-review.txt for exact source excerpts and permanent links.
Attachments and evidence limits
upstream-test-settings.txt
annotated-findings.txt
client-config-template.txt
creation-success-confirmation.txt
latest-logs.txt
reproduction.txt
source-review.txt
latest-logs.txt: latest user-supplied batch, with host/model identifiers anonymised; contains selected excerpts and gaps, not continuous logs.creation-success-confirmation.txt: later successful HTTP 200 confirmation, supplied separately from that batch; prefix omitted explicitly.annotated-findings.txt: detailed explanations alongside selected excerpts.source-review.txt: verified release/master code paths.reproduction.txt,client-config-template.txt,upstream-test-settings.txt: reproduction instructions and template configuration.
Timestamps, subscription IDs, sequence numbers and test queue names have been retained to allow correlation.
- Lingua principale
- C
- Stelle
- 51
- Fork
- 21
- Merge medio
- 22h 49m
- PR unite (30g)
- 6
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di OpenPrinting/cups-browsed
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
OpenPrinting/cups-browsed#77 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
OpenPrinting/cups-browsed#76 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 50/100
OpenPrinting/cups-browsed#75 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
OpenPrinting/cups-browsed#71 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
OpenPrinting/cups-browsed#74 · 3 commenti ·
Tutte le issue di OpenPrinting/cups-browsed
Issue simili
-
`sha256()` returns a wrong hash when libsql-ffi is built with gcc 11 or laterForse già presa @colinhacks l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
tursodatabase/libsql#2333 ·
I maintainer di solito rispondono entro 11 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
OpenPrinting/cups#1826 ·
I maintainer di solito rispondono entro 1 giorno
-
Backport to 3.0 advertises a suffix that does not existForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
389ds/389-ds-base#8152 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
RetroAchievements/rcheevos#580 · 1 commento ·
I maintainer di solito rispondono entro 5 giorni