Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] The code did not check the cachesize value in the configuration file, which caused a panic at runtime. #2010

Closed
sdjasj opened this issue Dec 29, 2024 · 1 comment
Labels
bug Something isn't working linear Created by Linear-GitHub Sync

Comments

@sdjasj
Copy link

sdjasj commented Dec 29, 2024

Seid version
name: sei
server_name:
version: v4.1.7-evm-devnet
commit: 6e0c934
build_tags: netgo ledger,
go: go version go1.22.4 linux/amd64
build_deps:

  • cosmossdk.io/errors@v1.0.0
  • filippo.io/edwards25519@v1.0.0-rc.1
  • github.com/99designs/keyring@v1.2.1

Chain ID
Local 4-docker-node chain

Describe the bug
I changed the value of cache-size under [mempool] in the config.toml file to an extremely large number, 2147483647, and after restarting the node, it panicked with the error: fatal error: runtime: out of memory.

To Reproduce
Steps to reproduce the behavior:

  1. Change the value of cache-size under [mempool] in the config.toml file to an extremely large number
  2. Restart the node
  3. fatal error: runtime: out of memory occurs

Expected behavior
SEI should properly handle abnormal values for cache-size and provide users with a friendly error message, rather than panicking at runtime.

Screenshots
Here is the code snippet with the bug:
068022534d5b7c70270fb5a031898ee

Additional context
Here is the panic log.
seid-3.log

Here is the config file

proxy-app = "tcp://127.0.0.1:26658"
moniker = "sei-node-0"
mode = "validator"
db-dir = "data"
log-level = "info"
log-format = "plain"
genesis-file = "config/genesis.json"
node-key-file = "config/node_key.json"
abci = "socket"
filter-peers = false

[priv-validator]
key-file = "tcp://0.0.0.0:26656"
state-file = "data/priv_validator_state.json"
laddr = ""
client-certificate-file = ""
root-ca-file = ""

[rpc]
laddr = "tcp://0.0.0.0:26657"
cors-allowed-origins = []
cors-allowed-headers = [ "Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time",]
max-open-connections = 900
max-subscription-clients = 100
max-subscriptions-per-client = 5
experimental-disable-websocket = false
event-log-window-size = "30s"
event-log-max-items = 0
timeout-broadcast-tx-commit = "10s"
max-body-bytes = 1000000
max-header-bytes = 1048576
tls-cert-file = ""
tls-key-file = ""
pprof-laddr = "localhost:6060"

[p2p]
queue-type = "priority"
laddr = "tcp://0.0.0.0:26656"
external-address = ""
bootstrap-peers = ""
persistent-peers = "bc6492eb3874b3ba9de6f31c69debafc16712751@192.168.10.10:26656,0410b4c2854451c3570413fa85ee50a074b9d807@192.168.10.12:26656,8b3fdd73de6cd9a0b05863a9946101f6a77e4ce4@192.168.10.11:26656"
upnp = false
max-connections = 200
max-incoming-connection-attempts = 100
pex = true
private-peer-ids = ""
allow-duplicate-ip = false
handshake-timeout = "20s"
dial-timeout = "3s"
flush-throttle-timeout = "10ms"
send-rate = 204800000
recv-rate = 204800000

[mempool]
broadcast = true
size = 5000
max-txs-bytes = 107374182400
cache-size = 2147483647
keep-invalid-txs-in-cache = false
max-tx-bytes = 20485760
max-batch-bytes = 0
ttl-duration = "0s"
ttl-num-blocks = 0

[statesync]
enable = false
rpc-servers = ""
trust-height = 0
trust-hash = ""
trust-period = "168h0m0s"
discovery-time = "15s"
temp-dir = ""
fetchers = "4"

[consensus]
wal-file = "data/cs.wal/wal"
unsafe-propose-timeout-override = "3s"
unsafe-propose-timeout-delta-override = "500ms"
unsafe-vote-timeout-override = "50ms"
unsafe-vote-timeout-delta-override = "500ms"
unsafe-commit-timeout-override = "50ms"
double-sign-check-height = 0
unsafe-bypass-commit-timeout-override = false
create-empty-blocks = true
create-empty-blocks-interval = "0s"
peer-query-maj23-sleep-duration = "2s"
gossip-tx-key-only = true

[tx-index]
indexer = [ "kv",]
psql-conn = ""

[instrumentation]
prometheus = true
prometheus-listen-addr = ":26660"
max-open-connections = 3
namespace = "tendermint"

@sdjasj sdjasj added bug Something isn't working linear Created by Linear-GitHub Sync labels Dec 29, 2024
@cordt-sei
Copy link
Contributor

cordt-sei commented Dec 30, 2024

Install more memory then try again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working linear Created by Linear-GitHub Sync
Projects
None yet
Development

No branches or pull requests

2 participants