DEBUG: Failed to read cmd on fd (2)
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
issue に示されている recv() の処理から始め、接続が閉じられる前に、戻り値が 1 未満の場合にどのように扱われるかを追跡してください。クライアントの正常な切断が失敗としてログに記録されていないか、またそのメッセージがキャッシュやパフォーマンスに影響するかを確認してください。ログが正常な終了とエラーを正確に区別するか、誤解を招くメッセージが削除されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Sorry for duplicating this issue, but the original one #77 became messy as there were discussed not-related things, including "doesn't work" problems. This one is dedicated only to a DEBUG message which you can see in your logs, e.g.:
renderd[17]: DEBUG: Failed to read cmd on fd 4
renderd[17]: DEBUG: Sending render cmd(3 osmcarto 8/159/93) with protocol version 2 to fd 8
renderd[17]: DEBUG: Connection 0, fd 4 closed, now 5 left
renderd[17]: DEBUG: Failed to read cmd on fd 11
renderd[17]: DEBUG: Connection 4, fd 11 closed, now 4 left
renderd[17]: DEBUG: Failed to read cmd on fd 8
renderd[17]: DEBUG: Sending render cmd(3 osmcarto 8/159/92) with protocol version 2 to fd 7
renderd[17]: DEBUG: Connection 1, fd 8 closed, now 3 left
renderd[17]: DEBUG: Failed to read cmd on fd 10
renderd[17]: DEBUG: Connection 2, fd 10 closed, now 2 left
renderd[17]: DEBUG: Failed to read cmd on fd 7
renderd[17]: DEBUG: Connection 0, fd 7 closed, now 1 left
renderd[17]: DEBUG: Failed to read cmd on fd 9
renderd[17]: DEBUG: Connection 0, fd 9 closed, now 0 lef
According the this reply https://github.com/openstreetmap/mod_tile/issues/77#issuecomment-50244923 which I quote here:
The "failed to read cmd" message was added by Kai in 9d4e10e. It will be triggered any time a connection is closed because recv() returns 0 for this case. I don't think it is any cause for concern but maybe we want to set this at LOG_DEBUG or differentiate between -1 (errors) and 0 (successful close).
-- there is even nothing to worry about.
But let's make it clear: if you print a message like that into a log, they you assume it's to be seen by a sysadmin and some actions to be done, correct? Anyway, such fail-messages are always making us a bit nervous. I didn't get into details, but just looking at this code:
ret = recv(fd, cmd, sizeof(struct protocol_v1), block?MSG_WAITALL:MSG_DONTWAIT);
if (ret < 1) {
syslog(LOG_INFO, "DEBUG: Failed to read cmd on fd %i", fd);
return -1;
} else if (ret < sizeof(struct protocol_v1)) {
syslog(LOG_INFO, "DEBUG: Read incomplete cmd on fd %i", fd);
return 0;
}
-- I assume that getting ret < 1 is not what this code "treats" as normal instantly exiting the function. It'd rather want to see some other value and continue the execution flow. But if contrariwise exiting the function is totally normal (sort of EOF) then why print this message after all? Who needs it and what is supposed to do? Does it sign about some bad situation at server-side or client-side or not at all? Please clarify.
What I want to say is:
- if this message really doesn't signal about internal errors
OR - if it doesn't affect caching
OR - if it doesn't affect performance
THEN - this message could be probably simply removed.
- 主要言語
- C++
- スター
- 318
- フォーク
- 200
- 平均マージ
- 3日 1時間
- マージ済み PR(30日)
- 21
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
openstreetmap/mod_tile のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
openstreetmap/mod_tile#501 · コメント 2 件 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
openstreetmap/mod_tile#292 · コメント 4 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
openstreetmap/mod_tile#477 · コメント 7 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
openstreetmap/mod_tile#466 · コメント 2 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
openstreetmap/mod_tile#462 · コメント 7 件 ·
メンテナーはふだん 2 日以内に返信
openstreetmap/mod_tile の issue をすべて見る
似ている issue
-
Remove source files from packaging for deb, zip, etc対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
OpenSpace/OpenSpace#4353 · コメント 1 件 ·
メンテナーはふだん 5 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
justcallmekoko/ESP32Marauder#1656 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
Decompiler: convertCharRef() in xml.y overflows its int4 accumulator on long character references対応中かも @kaayzouee が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
NationalSecurityAgency/ghidra#10009 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
mutationpp/Mutationpp#337 ·