Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Don't share same snapshot dir for secondary access#10384

Merged
solana-grimes merged 1 commit intosolana-labs:masterfrom
ryoqun:snapshot-conflict-by-secondary
Jun 3, 2020
Merged

Don't share same snapshot dir for secondary access#10384
solana-grimes merged 1 commit intosolana-labs:masterfrom
ryoqun:snapshot-conflict-by-secondary

Conversation

@ryoqun
Copy link
Copy Markdown
Contributor

@ryoqun ryoqun commented Jun 3, 2020

Problem

When validator is creating a new snapshot, secondary ledger-tool use may cause the snapshot creation process to crash becuase of missing file, which is removed by the secondary:

[2020-06-03T07:15:23.428596880Z WARN  solana_ledger::snapshot_utils] tar command failed with exit code: exit code: 2
[2020-06-03T07:15:23.428623898Z WARN  solana_ledger::snapshot_utils] tar stdout: 
[2020-06-03T07:15:23.428639371Z WARN  solana_ledger::snapshot_utils] tar stderr:
    tar: snapshots: Cannot stat: No such file or directory
    tar: Exiting with failure status due to previous errors
    
[2020-06-03T07:15:24.851585353Z WARN  solana_core::snapshot_packager_service] Failed to create snapshot archive: archive generation failure exit code: 2
[2020-06-03T07:15:24.906626871Z WARN  solana_core::snapshot_packager_service] Failed to create snapshot archive: I/O error

Usually, new snapshot refers to the incorrectly shared directory via a symlink like this:

$ ls -l /tmp/.tmprqQiJo
total 1524
drwxrwxr-x 2 ryoqun ryoqun 1544192 Jun  3 16:24 accounts
lrwxrwxrwx 1 ryoqun ryoqun      66 Jun  3 16:24 snapshots -> /home/ryoqun/work/solana/testnet/snapshot/.tmpBTks9N
-rw-rw-r-- 1 ryoqun ryoqun       5 Jun  3 16:24 version

This problem is visible when doing like this:

while true; do RUST_LOG=warn ./target/release/solana-ledger-tool --ledger ./testnet/ graph /tmp/aaaa.pdf; sleep 5; done

Note that, there is still another intermittent problem which is found above one liner..

Summary of Changes

Don't share same directory snapshot.

follow up of #10209

CC: @mvines

@ryoqun ryoqun added automerge Merge this Pull Request automatically once CI passes v1.1 labels Jun 3, 2020
@solana-grimes solana-grimes merged commit b515cc3 into solana-labs:master Jun 3, 2020
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 3, 2020

Codecov Report

Merging #10384 into master will increase coverage by 0.0%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master   #10384   +/-   ##
=======================================
  Coverage    81.4%    81.4%           
=======================================
  Files         290      290           
  Lines       67610    67610           
=======================================
+ Hits        55081    55083    +2     
+ Misses      12529    12527    -2     

mergify Bot pushed a commit that referenced this pull request Jun 3, 2020
automerge

(cherry picked from commit b515cc3)

# Conflicts:
#	ledger-tool/src/main.rs
mergify Bot pushed a commit that referenced this pull request Jun 3, 2020
@ryoqun
Copy link
Copy Markdown
Contributor Author

ryoqun commented Jun 3, 2020

Note that, there is still another intermittent problem which is found above one liner..

For this, I'm suspecting this occurs when the validator is just catching-up, so this shouldn't be so bad....

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

automerge Merge this Pull Request automatically once CI passes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants