Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

A stored payload that does not deserialize keeps the reaper in a loop

オープン
#73 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
lua, python, redis

調査の方向性

Start in threadmill/backends/redis.py at RedisBroker._reap_task and compare its deserialization failure path with the replaced Lua reaper's finalize step. Trace the raw JSON fields and verify that an unde­serializable task is finalized as FAILED, publishes a result, and is not re-claimed indefinitely.

索引モデルが issue の本文から書いたものです。

説明

bug real

Found by the SuperJoe review of the lease-expiry retry patch (4ec9068..d5a1fdb).

RedisBroker._reap_task deserializes the stored task before it decides the fate of the task:

# threadmill/backends/redis.py
data = self.backend.client.hget(task_key, "data")
if data is None:
    logger.warning("Claimed task %r has no task data; skipping", task_id)
    return
task_result = self.backend.deserialize_task_result(data)

deserialize_task_result imports the task and its retry callback from the serialized dotted paths. A deployment can remove or rename the callback while the task waits in the queue. Then the import fails and the call raises on every pass. The surrounding logger.exception only writes a log record. The claim stays:

  • The reaper claims the task again every CLAIM_TTL and the same error occurs.
  • The task never reaches FAILED and never publishes a result.
  • Only expiry of the task hash or a late acknowledgement removes the running entry.

The replaced Lua reaper decoded the same payload with cjson and finalized it as FAILED without any import. This error is a regression from that rewrite.

Suggested correction: add a salvage branch to the reap path. The branch finalizes a payload that the code cannot deserialize. The raw JSON already carries status, errors, and the task fields. Patch it and publish it as FAILED. A small Lua script that copies the finalize step of the old reaper can do this. Then the behavior matches the pre-rewrite state and the retry decision does not return to Lua.

主要言語
Python
スター
17
フォーク
1
平均マージ
2時間 31分
マージ済み PR(30日)
16

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

codingjoe/threadmill のほかの issue

codingjoe/threadmill の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。