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

[BUG] - The cardano-node crashes when an immutable file is missing

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

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

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

評価

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

調査の方向性

trace に示されている不変データベースインデックスのパス、特に Ouroboros/Consensus/Storage/ImmutableDB/Impl/Index/Primary.hs、Cache.hs、Index.hs から始め、immutable file を利用できない場合の readOffsets を追ってください。古いブロックが要求されている間に db/immutable 配下のファイルをアクセス不能にして再現します。ノードがエラーを報告して実行を継続し、クラッシュしたりデータベースを二重に閉じたりしなければ完了です。

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

説明

needs triage Stale

External

Area
Other

Summary
When a peer requests an older block, and the immutable file containing that block is not accessible on the local file system, the node crashes.

Steps to reproduce
Steps to reproduce the behavior:

  1. Move the immutable files from their location
  2. Wait until such an event occurs (can take a few days)
  3. See the node crashing and the messages in the logs

Expected behavior
The node should return an error message and continue running.

System info (please complete the following information):

  • OS Name: Ubuntu]
  • OS Version: e.g. 24.04
  • Node version: cardano-node 10.5.3 - linux-aarch64 - ghc-9.6 git rev 6c034ec038d8d276a3595e10e2d38643f09bd1f2
  • CLI version: cardano-cli 10.11.0.0 - linux-aarch64 - ghc-9.6 git rev 6c034ec038d8d276a3595e10e2d38643f09bd1f2
    The OS, node and cli versions are irrelevant here.

Screenshots and attachments
This is a log file snippet with such a crash:

[relay5:cardano.node.DiffusionInitializationTracer:Critical:7] [2025-12-08 23:38:08.03 UTC] DiffusionErrored ExceptionInHandler 185.19Type = FsResourceDoesNotExist, fsErrorPath = /home/cardano/cardano-node/db/immutable/02258.primary, fsErrorString = "No such file or drom HasCallStack):
  prettyCallStack, called at src/System/FS/API/Types.hs:393:23 in fs-api-0.3.0.0-b19f75df8cf0ad4f95eb6d965255bf9a46056a0239d2d1b004e8d
  ioToFsError, called at src/System/FS/IO.hs:113:41 in fs-api-0.3.0.0-b19f75df8cf0ad4f95eb6d965255bf9a46056a0239d2d1b004e8d30ef8eba9b2
  handleError, called at src/System/FS/IO.hs:109:23 in fs-api-0.3.0.0-b19f75df8cf0ad4f95eb6d965255bf9a46056a0239d2d1b004e8d30ef8eba9b2
  rethrowFsError, called at src/System/FS/IO.hs:50:21 in fs-api-0.3.0.0-b19f75df8cf0ad4f95eb6d965255bf9a46056a0239d2d1b004e8d30ef8eba9
  hOpen, called at src/System/FS/API.hs:216:43 in fs-api-0.3.0.0-b19f75df8cf0ad4f95eb6d965255bf9a46056a0239d2d1b004e8d30ef8eba9b2:Syst
  withFile, called at src/ouroboros-consensus/Ouroboros/Consensus/Storage/ImmutableDB/Impl/Index/Primary.hs:293:5 in ouroboros-consens6eb7c29c52:Ouroboros.Consensus.Storage.ImmutableDB.Impl.Index.Primary
  load, called at src/ouroboros-consensus/Ouroboros/Consensus/Storage/ImmutableDB/Impl/Index/Cache.hs:477:21 in ouroboros-consensus-0.29c52:Ouroboros.Consensus.Storage.ImmutableDB.Impl.Index.Cache
  readPrimaryIndex, called at src/ouroboros-consensus/Ouroboros/Consensus/Storage/ImmutableDB/Impl/Index/Cache.hs:556:35 in ouroboros-1d659a66eb7c29c52:Ouroboros.Consensus.Storage.ImmutableDB.Impl.Index.Cache
  loadPastChunkInfo, called at src/ouroboros-consensus/Ouroboros/Consensus/Storage/ImmutableDB/Impl/Index/Cache.hs:602:26 in ouroborosf1d659a66eb7c29c52:Ouroboros.Consensus.Storage.ImmutableDB.Impl.Index.Cache
  getChunkInfo, called at src/ouroboros-consensus/Ouroboros/Consensus/Storage/ImmutableDB/Impl/Index/Cache.hs:671:11 in ouroboros-cons9a66eb7c29c52:Ouroboros.Consensus.Storage.ImmutableDB.Impl.Index.Cache
  readOffsets, called at src/ouroboros-consensus/Ouroboros/Consensus/Storage/ImmutableDB/Impl/Index.hs:199:31 in ouroboros-consensus-0c29c52:Ouroboros.Consensus.Storage.ImmutableDB.Impl.Index
  readOffsets, called at src/ouroboros-consensus/Ouroboros/Consensus/Storage/ImmutableDB/Impl/Index.hs:53:5 in ouroboros-consensus-0.29c52:Ouroboros.Consensus.Storage.ImmutableDB.Impl.Index
  a use of `readOffsets', called at src/ouroboros-consensus/Ouroboros/Consensus/Storage/ImmutableDB/Impl/Index.hs:130:5 in ouroboros-cd659a66eb7c29c52:Ouroboros.Consensus.Storage.ImmutableDB.Impl.Index, fsLimitation = False}))
[relay5:cardano.node.ChainDB:Error:7] [2025-12-08 23:38:08.03 UTC] Immutable DB was already closed. Double closing.
[relay5:cardano.node.ChainDB:Info:7] [2025-12-08 23:38:08.03 UTC] Closed Volatile DB.
[relay5:cardano.node.ChainDB:Info:7] [2025-12-08 23:38:08.03 UTC] Closed db with immutable tip at 5b9fba6656bf5c1f6423d0db814415879118c0ad04086b1a8722e25c240855e033a16603f61d2a2d42265c5fd at slot 173670795

Additional context
The error occurs when the files in the db/immutable folder are not available (for example, another partition is mounted on it - maybe a slower and cheaper storage type, and the partition is not mounted at the time when this error occurs).

主要言語
Haskell
スター
3.2k
フォーク
762
平均マージ
2日 9時間
マージ済み PR(30日)
19

環境構築

はじめの一歩

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

IntersectMBO/cardano-node のほかの issue

IntersectMBO/cardano-node の issue をすべて見る

似ている issue

Haskell の issue をもっと見る

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

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