Syndica / sig

a Solana validator client implementation written in Zig
https://syndica.io/sig
Apache License 2.0
188 stars 31 forks source link

Load Snapshots Multithreaded Fails on Linux #205

Open yewman opened 1 month ago

yewman commented 1 month ago

Description

When loading snapshots on linux, using more than one thread results in a crash at the start of building index. This issue is not present when running on Mac. The work around for now is to just load snapshots on linux using one thread, however, it will be important to resolve this going forward.

How to Reproduce the Bug

sig leader-schedule --snapshot-dir

Additional Context

No response

0xNineteen commented 4 weeks ago

worked for me recently - not sure if its fixed but wanted to note it down

Lou-Kamades commented 2 weeks ago

I was able to get multiple threads to work on Linux, however the default accounts_per_file_estimate value of 1500 here: https://github.com/Syndica/sig/blob/93d2eb8ec0175047c1b64207807e5e083c94ec90/src/cmd/config.zig#L71 crashed a node I've used on Testnet (8 cores, 64GB RAM).

Running the command with a much lower accounts_per_file_estimate value worked for me: leader-schedule -s /path/to/snaps -g /mnt/ledger/genesis.bin -a 300 . I was using Testnet snapshots, so mileage may vary