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

all: ensure internal subscriptions are created in constructors #20554

Open
fjl opened this issue Jan 14, 2020 · 2 comments
Open

all: ensure internal subscriptions are created in constructors #20554

fjl opened this issue Jan 14, 2020 · 2 comments

Comments

@fjl
Copy link
Contributor

fjl commented Jan 14, 2020

In PR #20390, we attempted to fix an issue where geth crashes if it is stopped before being fully started. The issue is that Subscribe* methods can fail if they use event.SubscriptionScope and the scope is closed before all subscriptions are created. There are two ways to fix this issue:

  • Remove uses of SubscriptionScope for internal event providers such as core.BlockChain.
  • Ensure internal subscriptions are created in constructor functions before start.
@karalabe
Copy link
Member

Just had a PR CI build crash with this :P

https://travis-ci.org/ethereum/go-ethereum/jobs/636825311#L785

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xcb1d4f]
goroutine 5115687 [running]:
github.com/ethereum/go-ethereum/les.(*serverHandler).broadcastHeaders(0xc002215b80)
	/home/travis/gopath/src/github.com/ethereum/go-ethereum/les/server_handler.go:906 +0xcf
created by github.com/ethereum/go-ethereum/les.(*serverHandler).start
	/home/travis/gopath/src/github.com/ethereum/go-ethereum/les/server_handler.go:93 +0x6c
FAIL	github.com/ethereum/go-ethereum/les	15.760s

@Hotspot00

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants