BrowsePoll retains notification sequence across subscription replacement; new queues appear only after expiry/full refresh
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 67/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- c
- 領域
- backend, networking
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- C
- スター
- 51
- フォーク
- 21
- 平均マージ
- 22時間 49分
- マージ済み PR(30日)
- 6
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
OpenPrinting/cups-browsed のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
OpenPrinting/cups-browsed#77 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
OpenPrinting/cups-browsed#76 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 50/100
OpenPrinting/cups-browsed#75 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
OpenPrinting/cups-browsed#71 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
OpenPrinting/cups-browsed#74 · コメント 3 件 ·
OpenPrinting/cups-browsed の issue をすべて見る
似ている issue
-
`sha256()` returns a wrong hash when libsql-ffi is built with gcc 11 or later対応中かも @colinhacks が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
tursodatabase/libsql#2333 ·
メンテナーはふだん 11 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
OpenPrinting/cups#1826 ·
メンテナーはふだん 1 日以内に返信
-
Backport to 3.0 advertises a suffix that does not exist対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
389ds/389-ds-base#8152 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
RetroAchievements/rcheevos#580 · コメント 1 件 ·
メンテナーはふだん 5 日以内に返信