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

One failed session lock renewal loses the session: no retry, no log, no signal to running activities

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
rust

調査の方向性

Start at the renewal loop in src/runtime/dispatchers/worker.rs around lines 899-926, where the error branch only warns and waits for the next tick, and read the defaults in src/runtime/mod.rs lines 365-366 that set the 25 s interval against a 30 s lock timeout. Then follow the renewal call into the provider (duroxide-pg renews only rows with locked_until > now and returns Ok(0) on a mismatch) to see why a late retry silently matches nothing. Done means a failed renewal is retried before expiry, a row-count shortfall against in-flight sessions is logged, and lost sessions reach their activities' cancellation token.

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

説明

bug

Summary

The session manager renews all session locks of a runtime with one renew_session_lock call per interval. If that call fails once, it is not tried again before the locks expire. The sessions are then lost without a log line, and the activities that run on those sessions are not told.

Where

How it fails

  1. The renewal at T+25 s fails once, for example on a dropped connection or a pool timeout.
  2. The next attempt is the next tick, at T+50 s. The locks expired at T+30 s.
  3. A provider renews only a lock that is still valid (duroxide-pg requires locked_until > now). So the renewal at T+50 s matches 0 rows. It returns Ok(0), and a count of 0 is not logged.
  4. From T+30 s another worker can claim the session. The activities of the first worker for that session still run. Two workers now work on the same session.

How this was checked

Read in the code. Not reproduced.

Suggested fix

  • Retry a failed renewal soon, for example every second, until it works or the lock timeout has passed.
  • Compare the number of renewed rows with the number of sessions that this runtime has in flight. Log a warning when a session was lost.
  • Signal the activities of a lost session through their cancellation token, or report the loss to the host. #38 (item 6) asks for session lease events. This failure is the case that needs them most.

Tracked in #55.

主要言語
Rust
スター
221
フォーク
61
平均マージ
3日 5時間
マージ済み PR(30日)
1

環境構築

はじめの一歩

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

microsoft/duroxide のほかの issue

microsoft/duroxide の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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