rpcpool / yellowstone-grpc

solana geyser grpc service
GNU Affero General Public License v3.0
197 stars 90 forks source link

Segmentation fault (core dumped) #329

Closed CreepyZander closed 4 months ago

CreepyZander commented 4 months ago

The RPC keeps crashing after I've made changes to the default config.json.

I'm trying to remove the filters {} so that I can query the account TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA.

Even when I change Token... to Xoken... it still crashes.

$ ./validator.sh 
log file: /home/sol/solana-rpc.log
Segmentation fault (core dumped)
...
[2024-04-30T23:22:39.796099192Z INFO  solana_download_utils] downloaded 4335893376 bytes 93.5% 45153424.0 bytes/s
[2024-04-30T23:22:45.796102707Z INFO  solana_download_utils] downloaded 4608050896 bytes 99.3% 45359564.0 bytes/s
[2024-04-30T23:22:46.532890594Z INFO  solana_download_utils]   ✨ Downloaded http://145.40.67.83:80/incremental-snapshot-263138717-263162494-6W6NLLtp5i6w6X89D1erdMGK1joCzFHT2jhCHqZaingx.tar.zst (4638328062 bytes) in 103.432945196s
[2024-04-30T23:22:46.535416614Z INFO  solana_core::validator] identity pubkey: JAtfkx8NJmFj8JG8HTVryRCJyFNF2MVvHgt4X7TqBaQD
[2024-04-30T23:22:46.535425034Z INFO  solana_core::validator] vote account pubkey: E6BJvF8Nw5WPAJMdnsvRiV5xan1HciwfXbNwnWDrHTV5
[2024-04-30T23:22:46.535439414Z INFO  solana_metrics::metrics] datapoint: bootstrap-snapshot-download total_time_secs=125i get_rpc_nodes_time_secs=10i snapshot_download_time_secs=114i download_abort_count=1i blacklisted_nodes_count=0i
[2024-04-30T23:22:46.535528374Z INFO  solana_geyser_plugin_manager::geyser_plugin_service] Starting GeyserPluginService from config files: ["/home/sol/yellowstone-grpc/yellowstone-grpc-geyser/config.json"]

*CRASHES HERE*
[2024-04-30T23:00:07.019294797Z INFO  solana_validator] solana-validator 1.17.31 (src:00000000; feat:3746964731, client:SolanaLabs)
[2024-04-30T23:00:07.019318557Z INFO  solana_validator] Starting validator with: ArgsOs {
        inner: [
            "solana-validator",
            "--identity",
            "/home/sol/validator-keypair.json",
            "--known-validator",
            "7Np41oeYqPefeNQEHSv1UDhYrehxin3NStELsSKCT4K2",
            "--known-validator",
            "GdnSyH3YtwcxFvQrVVJMm1JhTS4QVX7MFsX56uJLUfiZ",
            "--known-validator",
            "DE1bawNcRJB9rVm3buyMVfr8mBEoyyu73NBovf2oXJsJ",
            "--known-validator",
            "CakcnaRDHka2gXyfbEd2d3xsvkJkqsLw2akB3zsN1D2S",
            "--only-known-rpc",
            "--full-rpc-api",
            "--no-voting",
            "--ledger",
            "/mnt/ledger",
            "--accounts",
            "/mnt/accounts",
            "--log",
            "/home/sol/solana-rpc.log",
            "--rpc-port",
            "8899",
            "--rpc-bind-address",
            "127.0.0.1",
            "--private-rpc",
            "--dynamic-port-range",
            "8000-8020",
            "--entrypoint",
            "entrypoint.mainnet-beta.solana.com:8001",
            "--entrypoint",
            "entrypoint2.mainnet-beta.solana.com:8001",
            "--entrypoint",
            "entrypoint3.mainnet-beta.solana.com:8001",
            "--entrypoint",
            "entrypoint4.mainnet-beta.solana.com:8001",
            "--entrypoint",
            "entrypoint5.mainnet-beta.solana.com:8001",
            "--expected-genesis-hash",
            "5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d",
            "--wal-recovery-mode",
            "skip_any_corrupted_record",
            "--limit-ledger-size",
            "--account-index",
            "program-id",
            "--account-index",
            "spl-token-mint",
            "--account-index",
            "spl-token-owner",
            "--account-index-include-key",
            "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
            "--enable-rpc-transaction-history",
            "--geyser-plugin-config",
            "/home/sol/yellowstone-grpc/yellowstone-grpc-geyser/config.json",
        ],
    }

New (modified) config.json - Crashes

{
    "libpath": "../target/release/libyellowstone_grpc_geyser.so",
    "log": {
        "level": "info"
    },
    "grpc": {
        "address": "0.0.0.0:10000",
        "max_decoding_message_size": "4_194_304",
        "snapshot_plugin_channel_capacity": null,
        "snapshot_client_channel_capacity": "50_000_000",
        "channel_capacity": "100_000",
        "unary_concurrency_limit": 100,
        "unary_disabled": false,
    },
    "prometheus": {
        "address": "0.0.0.0:8999"
    },
    "block_fail_action": "log"
}

Original (slightly modified) config.json - Doesn't crash

{
    "libpath": "../target/release/libyellowstone_grpc_geyser.so",
    "log": {
        "level": "info"
    },
    "grpc": {
        "address": "0.0.0.0:10000",
        "tls_config": {
            "cert_path": "/home/sol/tls/cert.pem",
            "key_path": "/home/sol/tls/key.pem"
        },
        "max_decoding_message_size": "4_194_304",
        "snapshot_plugin_channel_capacity": null,
        "snapshot_client_channel_capacity": "50_000_000",
        "channel_capacity": "100_000",
        "unary_concurrency_limit": 100,
        "unary_disabled": false,
        "filters": {
            "accounts": {
                "max": 1,
                "any": false,
                "account_max": 10,
                "account_reject": ["TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"],
                "owner_max": 10,
                "owner_reject": ["11111111111111111111111111111111"]
            },
            "slots": {
                "max": 1
            },
            "transactions": {
                "max": 1,
                "any": false,
                "account_include_max": 10,
                "account_include_reject": ["TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"],
                "account_exclude_max": 10,
                "account_required_max": 10
            },
            "transactions_status": {
                "max": 1,
                "any": false,
                "account_include_max": 10,
                "account_include_reject": ["TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"],
                "account_exclude_max": 10,
                "account_required_max": 10
            },
            "blocks": {
                "max": 1,
                "account_include_max": 10,
                "account_include_any": false,
                "account_include_reject": ["TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"],
                "include_transactions": true,
                "include_accounts" : false,
                "include_entries" : false
            },
            "blocks_meta": {
                "max": 1
            },
            "entry": {
                "max": 1
            }
        }
    },
    "prometheus": {
        "address": "0.0.0.0:8999"
    },
    "block_fail_action": "log"
}
$ rustc --version && cargo --version && solana --version
rustc 1.73.0 (cc66ad468 2023-10-03)
cargo 1.73.0 (9c4383fb5 2023-08-26)
solana-cli 1.17.31 (src:00000000; feat:3746964731, client:SolanaLabs)
curl https://sh.rustup.rs -sSf | sh
source $HOME/.cargo/env
rustup component add rustfmt
rustup install 1.73.0
rustup default 1.73.0

git clone https://github.com/solana-labs/solana.git
cd solana
git checkout v1.17.31
git status
cargo build --release

git clone https://github.com/rpcpool/yellowstone-grpc.git
cd yellowstone-grpc
git checkout v1.14.1+solana.1.17.31
git status
cargo-fmt && cargo run --bin config-check -- --config yellowstone-grpc-geyser/config.json
cargo build --release
$ uname -a
Linux 232S600209 5.4.0-177-generic #197-Ubuntu SMP Thu Mar 28 22:45:47 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.6 LTS
Release:        20.04
Codename:       focal
$ free -h
              total        used        free      shared  buff/cache   available
Mem:          377Gi       1.4Gi       119Gi        13Mi       256Gi       372Gi
Swap:         447Gi        20Mi       447Gi
$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            189G     0  189G   0% /dev
tmpfs            38G   14M   38G   1% /run
/dev/nvme0n1p2  440G   28G  389G   7% /
tmpfs           189G     0  189G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           189G     0  189G   0% /sys/fs/cgroup
/dev/loop0       64M   64M     0 100% /snap/core20/1852
/dev/loop1       92M   92M     0 100% /snap/lxd/24061
/dev/loop2       50M   50M     0 100% /snap/snapd/18596
/dev/nvme3n1    3.5T  249G  3.1T   8% /mnt/accounts
/dev/nvme2n1    3.5T  189G  3.1T   6% /mnt/ledger
tmpfs            38G     0   38G   0% /run/user/1001
tmpfs            38G     0   38G   0% /run/user/1000
$ echo $PATH
/home/sol/bin:/home/sol/solana/target/release:/home/sol/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
fanatid commented 4 months ago
"unary_disabled": false,

=>

"unary_disabled": false