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

console: add cleanup to avoid leaks in newTester #27695

Merged
merged 1 commit into from
Jul 11, 2023
Merged

console: add cleanup to avoid leaks in newTester #27695

merged 1 commit into from
Jul 11, 2023

Conversation

Mskxn
Copy link
Contributor

@Mskxn Mskxn commented Jul 11, 2023

In #27152 , I found that some goroutines that are not expected to be leaked (instead of cache-related global routines mentioned in #27247) existing blocking here:

[Goroutine 27 in state select, with github.com/ethereum/go-ethereum/rpc.(*Client).dispatch on top of the stack:
goroutine 27 [select]:
github.com/ethereum/go-ethereum/rpc.(*Client).dispatch(0xc0015a0080, {0x185ade0?, 0xc00043e300})
        /tool/go-ethereum/rpc/client.go:619 +0x2b7
created by github.com/ethereum/go-ethereum/rpc.initClient
        /tool/go-ethereum/rpc/client.go:259 +0x311

This pr fix it by closing it in t.Cleanup to avoid leaks in any cases.

@holiman holiman changed the title add cleanup to avoid leaks in newTester console: add cleanup to avoid leaks in newTester Jul 11, 2023
Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@fjl fjl merged commit 7a565fa into ethereum:master Jul 11, 2023
devopsbo3 pushed a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
devopsbo3 added a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
devopsbo3 added a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
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.

3 participants