forest icon indicating copy to clipboard operation
forest copied to clipboard

Dangling reference to DB on SIGINT

Open LesnyRumcajs opened this issue 3 years ago • 0 comments

Describe the bug

On ctrl-c during tipset validation I got Dangling reference to DB detected: 6., several times in a row.

To Reproduce Steps to reproduce the behavior:

  1. Run target/release/forest --encrypt-keystore false --chain calibnet --target-peer-count 50 (import snapshot if necessary)
  2. ctrl-c while validating tipsets
  3. See the dangling reference error

Log output

Log Output
target/release/forest --encrypt-keystore false --chain calibnet --target-peer-count 50
2022-09-08T14:12:25.026Z INFO  forest::daemon > Starting Forest daemon, version 0.2.2+git.8b6f4c82
2022-09-08T14:12:25.026Z INFO  forest_libp2p::service > Recovered libp2p keypair from "/home/rumcajs/.local/share/forest/libp2p/keypair"
2022-09-08T14:12:25.026Z INFO  forest::daemon         > PeerId: 12D3KooWAVGaauqEMRCEB7zMd6QduhCEkkuXkTw49kLrPnJZBNr2
2022-09-08T14:12:25.026Z WARN  forest::daemon         > Warning: Keystore encryption disabled!
2022-09-08T14:12:25.026Z INFO  forest::daemon         > Prometheus server started at 127.0.0.1:6116
2022-09-08T14:12:25.027Z INFO  forest::daemon         > Admin token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJBbGxvdyI6WyJyZWFkIiwid3JpdGUiLCJzaWduIiwiYWRtaW4iXX0.DVoFLz6ljPHMsTc_xLzKj0ShOBVETXeyROJXZ9UAakA
2022-09-08T14:12:25.557Z INFO  forest_genesis         > Initialized genesis: BlockHeader: Cid(bafy2bzacecz3trtejxtzix4f4eebs7dekm6snfsmvffiqz2rfx7iwgsgtieq4)
2022-09-08T14:12:25.557Z INFO  forest::daemon         > Using network :: calibrationnet
2022-09-08T14:12:25.560Z INFO  forest::daemon         > JSON-RPC endpoint started at 127.0.0.1:1234
2022-09-08T14:12:25.560Z INFO  forest_rpc             > Ready for RPC connections
2022-09-08T14:12:25.560Z INFO  forest_chain_sync::chain_muxer > Evaluating network head...
2022-09-08T14:12:27.394Z INFO  forest_chain_sync::chain_muxer > Local node is behind the network, starting BOOTSTRAP from LOCAL_HEAD = 1258614 -> NETWORK_HEAD = 1286184
Downloading headers 27570 / 27570 [========================================================================================================================================================================================================================================================================] 100.00 % 4713.35/s
...
2022-09-08T14:12:34.463Z INFO  forest_chain_sync::tipset_syncer > Validating tipset: EPOCH = 1258614
2022-09-08T14:12:34.468Z INFO  forest_chain_sync::tipset_syncer > Validating tipset: EPOCH = 1258615
2022-09-08T14:12:34.469Z INFO  forest_chain_sync::tipset_syncer > Validating tipset: EPOCH = 1258616
2022-09-08T14:12:34.470Z INFO  forest_chain_sync::tipset_syncer > Validating tipset: EPOCH = 1258617
2022-09-08T14:12:34.778Z INFO  forest_chain_sync::tipset_syncer > Validating tipset: EPOCH = 1259268
2022-09-08T14:12:35.125Z INFO  forest_chain_sync::tipset_syncer > Validating tipset: EPOCH = 1259269
^C 2022-09-08T14:12:36.076Z WARN  forest::cli                      > Got interrupt, shutting down...
2022-09-08T14:12:36.076Z INFO  forest_utils                     > Permissions set to 0600 on File { fd: 200, path: "/home/rumcajs/.local/share/forest/keystore.json", read: false, write: true }
2022-09-08T14:12:36.311Z ERROR forest::daemon                   > Dangling reference to DB detected: 6. Please report this as a bug at https://github.com/ChainSafe/forest/issues
2022-09-08T14:12:36.311Z INFO  forest::daemon                   > Forest finish shutdown

Expected behaviour

No errors nor warnings on SIGINT

Environment (please complete the following information):

  • OS: Fedora 36
  • Rust version(e.g. rustc --version) rustc 1.62.0-nightly (cb1219871 2022-05-08)
  • Branch/commit 583d67da85d28ba84b91b44d3c8ff06ba6fb1e20 (main)

Other information and links

Probably related https://github.com/ChainSafe/forest/issues/1848

LesnyRumcajs avatar Sep 08 '22 14:09 LesnyRumcajs