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

ethstats: Fix nil ptr #13794

Merged
merged 1 commit into from
Feb 13, 2025
Merged

ethstats: Fix nil ptr #13794

merged 1 commit into from
Feb 13, 2025

Conversation

somnathb1
Copy link
Contributor

Fixes an issue on startaup:

2025-02-13 13:03:15.102  
[INFO] [02-13|09:03:15.101] head updated                             hash=0x67f34674738b118c66deac95137e9e4c0f47411aed142bda9b7a452537e29ee3 number=396 age=0 execution=3.025816ms mgas/s=0.00 average mgas/s=0.00 commit=696.106µs alloc=41.2MB sys=87.1MB
2025-02-13 13:03:18.152  
panic: runtime error: invalid memory address or nil pointer dereference
2025-02-13 13:03:18.152  
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x2409c54]
2025-02-13 13:03:18.152  
goroutine 154 [running]:
2025-02-13 13:03:18.152  
github.com/erigontech/erigon/core/types.(*Block).Hash(...)
2025-02-13 13:03:18.152  
  github.com/erigontech/erigon/core/types/block.go:1483
2025-02-13 13:03:18.152  
github.com/erigontech/erigon/ethstats.(*Service).reportHistory(0xc000174160, 0xc0018ae978, {0xc001e464e0, 0x32, 0x1b?})
2025-02-13 13:03:18.152  
  github.com/erigontech/erigon/ethstats/ethstats.go:618 +0x274
2025-02-13 13:03:18.152  
github.com/erigontech/erigon/ethstats.(*Service).loop(0xc000174160)
2025-02-13 13:03:18.152  
  github.com/erigontech/erigon/ethstats/ethstats.go:240 +0x752
2025-02-13 13:03:18.152  
created by github.com/erigontech/erigon/ethstats.(*Service).Start in goroutine 1
2025-02-13 13:03:18.152  
  github.com/erigontech/erigon/ethstats/ethstats.go:162 +0x4f

@somnathb1 somnathb1 merged commit ef7b800 into main Feb 13, 2025
12 of 13 checks passed
@somnathb1 somnathb1 deleted the som/fix_ethstats branch February 13, 2025 10:27
somnathb1 added a commit that referenced this pull request Feb 13, 2025
Fixes an issue on startaup:

```
2025-02-13 13:03:15.102
[INFO] [02-13|09:03:15.101] head updated                             hash=0x67f34674738b118c66deac95137e9e4c0f47411aed142bda9b7a452537e29ee3 number=396 age=0 execution=3.025816ms mgas/s=0.00 average mgas/s=0.00 commit=696.106µs alloc=41.2MB sys=87.1MB
2025-02-13 13:03:18.152
panic: runtime error: invalid memory address or nil pointer dereference
2025-02-13 13:03:18.152
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x2409c54]
2025-02-13 13:03:18.152
goroutine 154 [running]:
2025-02-13 13:03:18.152
github.com/erigontech/erigon/core/types.(*Block).Hash(...)
2025-02-13 13:03:18.152
  github.com/erigontech/erigon/core/types/block.go:1483
2025-02-13 13:03:18.152
github.com/erigontech/erigon/ethstats.(*Service).reportHistory(0xc000174160, 0xc0018ae978, {0xc001e464e0, 0x32, 0x1b?})
2025-02-13 13:03:18.152
  github.com/erigontech/erigon/ethstats/ethstats.go:618 +0x274
2025-02-13 13:03:18.152
github.com/erigontech/erigon/ethstats.(*Service).loop(0xc000174160)
2025-02-13 13:03:18.152
  github.com/erigontech/erigon/ethstats/ethstats.go:240 +0x752
2025-02-13 13:03:18.152
created by github.com/erigontech/erigon/ethstats.(*Service).Start in goroutine 1
2025-02-13 13:03:18.152
  github.com/erigontech/erigon/ethstats/ethstats.go:162 +0x4f
```
@yperbasis yperbasis added this to the 3.0.0-beta2 milestone Feb 14, 2025
somnathb1 added a commit that referenced this pull request Feb 14, 2025
Fixes an issue on startaup:

```
2025-02-13 13:03:15.102
[INFO] [02-13|09:03:15.101] head updated                             hash=0x67f34674738b118c66deac95137e9e4c0f47411aed142bda9b7a452537e29ee3 number=396 age=0 execution=3.025816ms mgas/s=0.00 average mgas/s=0.00 commit=696.106µs alloc=41.2MB sys=87.1MB
2025-02-13 13:03:18.152
panic: runtime error: invalid memory address or nil pointer dereference
2025-02-13 13:03:18.152
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x2409c54]
2025-02-13 13:03:18.152
goroutine 154 [running]:
2025-02-13 13:03:18.152
github.com/erigontech/erigon/core/types.(*Block).Hash(...)
2025-02-13 13:03:18.152
  github.com/erigontech/erigon/core/types/block.go:1483
2025-02-13 13:03:18.152
github.com/erigontech/erigon/ethstats.(*Service).reportHistory(0xc000174160, 0xc0018ae978, {0xc001e464e0, 0x32, 0x1b?})
2025-02-13 13:03:18.152
  github.com/erigontech/erigon/ethstats/ethstats.go:618 +0x274
2025-02-13 13:03:18.152
github.com/erigontech/erigon/ethstats.(*Service).loop(0xc000174160)
2025-02-13 13:03:18.152
  github.com/erigontech/erigon/ethstats/ethstats.go:240 +0x752
2025-02-13 13:03:18.152
created by github.com/erigontech/erigon/ethstats.(*Service).Start in goroutine 1
2025-02-13 13:03:18.152
  github.com/erigontech/erigon/ethstats/ethstats.go:162 +0x4f
```

Cherry-pick #13794
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