q-feeds-connector: "error in configd communication" every update when the Unbound DNSBL rebuild takes longer than 120s
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- cli, linux, python
- 領域
- devtools, networking
調査の方向性
失敗している呼び出しは、security/q-feeds-connector/src/opnsense/scripts/qfeeds/lib/init.py の QFeedsActions.unbound_load 内にある configctl の subprocess.run です。scripts/unbound/blocklists.py の flock ガードと合わせて読み、並行実行が引き続きブロックされることを確認してください。修正は、その configctl 呼び出しに -d フラグを追加することです。120秒を超える DNSBL の再構築が成功した後に configd のエラーがログに記録されなければ完了です。報告者は手動でテストしています。
索引モデルが issue の本文から書いたものです。
説明
Important notices
- I have read the contributing guide lines
- I have searched the existing issues, open and closed, and I'm convinced that mine is new.
- The title contains the plugin to which this issue belongs
Describe the bug
QFeedsActions.unbound_load() triggers the Unbound blocklist rebuild synchronously:
# security/q-feeds-connector/src/opnsense/scripts/qfeeds/lib/__init__.py (master, line 185)
subprocess.run(['/usr/local/sbin/configctl', 'unbound', 'dnsbl'])
configctl uses a fixed socket timeout of 120 seconds (socket.setdefaulttimeout(120) in configd_ctl.py). With larger blocklists the unbound dnsbl action takes longer than that. configctl then gives up and prints error in configd communication, see syslog for details to stderr. configd logs this as an error of the qfeeds update action. The DNSBL update itself keeps running in the background and finishes successfully, so the error is a false alarm.
To Reproduce
- Enable Q-Feeds domain feeds together with a large Unbound DNSBL configuration (here: ~11.3 million entries, parsing takes 100–140s).
- Wait for the scheduled
qfeeds updatethat results in anunbound_load. - See
/var/log/configd/latest.log.
Log excerpt (configd):
09:05:00 [22960eda-...] update QFeeds
09:07:43 [cf77059e-...] Updating Unbound DNSBLs
09:09:44 [22960eda-...] Script action stderr returned "b'error in configd communication, see syslog for details'"
Resolver log of the same run: blocklist parsing done in 135.16 seconds (11329394 records) at 09:09:58, then blocklist loaded.
System log (configctl):
error in configd communication Traceback (most recent call last):
File "/usr/local/sbin/configctl", line 66, in exec_config_cmd
line = sock.recv(65536).decode()
TimeoutError: timed out
This happens on every update with changed feeds (here every 4 hours).
Manual reproduction, same command as the plugin uses:
# time configctl unbound dnsbl
-> returns after 121s, stderr: "error in configd communication, see syslog for details"
(resolver: "blocklist parsing done in 125.96 seconds", then "blocklist loaded")
Expected behavior
No error is logged when the DNSBL update succeeds.
Proposed fix
Detach the call, the same way the default cron job does (configctl -d -- unbound dnsbl):
- subprocess.run(['/usr/local/sbin/configctl', 'unbound', 'dnsbl'])
+ subprocess.run(['/usr/local/sbin/configctl', '-d', 'unbound', 'dnsbl'])
Tested:
# time configctl -d unbound dnsbl
-> returns after 0s with the job id; configd: "[unbound dnsbl] returned OK" after ~130s,
resolver: "blocklist loaded", no error
Concurrent runs are already guarded in scripts/unbound/blocklists.py (fcntl.flock(... LOCK_EX | LOCK_NB) on /tmp/unbound-download_blocklists.tmp), so detaching does not introduce overlapping rebuilds.
Side note (core, not this plugin): on this timeout configctl still exits with code 0, so callers cannot detect the failure from the return code.
Environment
OPNsense 26.7.9_1 (amd64)
os-q-feeds-connector 1.6_1 (the line is unchanged on master, PLUGIN_VERSION 1.7.d)
Intel Core Ultra 7 155H, 48 GB RAM
AI disclosure
This report and the proposed fix were prepared with the help of an AI assistant (Claude). The analysis was done on my own OPNsense system: the log excerpts are real, and both tests (configctl unbound dnsbl vs. configctl -d unbound dnsbl) were run on my firewall. I reviewed the report before submitting.
- 主要言語
- PHP
- スター
- 1.2k
- フォーク
- 909
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 17
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
opnsense/plugins のほかの issue
-
os-intrusion-detection-content-et-open: still downloads the suricata-7.0 ruleset on Suricata 8, 14 current ET Open rules missing対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
mail/postfix: add options to disable VRFY and restrict ETRN対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
security/tailscale: add description to restart service対応中かも @drpsyko101 が 13 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
opnsense/plugins の issue をすべて見る
似ている issue
-
Old /download.php attachment links: redirect drops the subfolder, nginx.example.conf returns 404オープンBug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
0. Needs triage 35-feedback bug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
wpgenius/stackfolio#22 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
Automattic/static-site-importer#3024 ·
メンテナーはふだん 1 日以内に返信