Skip to content

Erigon exits with exit 0 on error. it should exit with a non-zero exit code#122

Open
matthewdarwin wants to merge 4 commits into0xPolygon:release/3.2from
pinax-network:release/3.2
Open

Erigon exits with exit 0 on error. it should exit with a non-zero exit code#122
matthewdarwin wants to merge 4 commits into0xPolygon:release/3.2from
pinax-network:release/3.2

Conversation

@matthewdarwin
Copy link

Erigon exits with exit 0 on error. it should exit with a non-zero exit code

eg

[EROR] [02-06|09:36:10.433] [polygon.sync] crashed - stopping node   err="pos sync heimdall failed: milestone scraper failed: can't fetch entity range: 6856083-6856083: error w
hile fetching data from Heimdall: url='http://polygon-heimdall:1317/milestones/6856083', status=404, body='{\"code\":5,\"message\":\"milestone number out of range\",\"details\":[]}'"

Copilot AI and others added 4 commits February 6, 2026 15:37
When background components like polygon sync crash with errors (e.g.,
"pos sync heimdall failed"), Erigon was exiting with code 0.

Store the background component error from bgComponentsEg in the
Ethereum struct and return it from ErigonNode.Serve(), which
propagates it to main() where os.Exit(1) is already called on error.

Co-authored-by: DenisCarriere <550895+DenisCarriere@users.noreply.github.com>
Co-authored-by: matthewdarwin <26171839+matthewdarwin@users.noreply.github.com>
Fix exit code 0 on background component crash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants