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

tests/fuzzers: fix goroutine leak in les fuzzer #22455

Merged
merged 2 commits into from
Mar 16, 2021

Conversation

holiman
Copy link
Contributor

@holiman holiman commented Mar 8, 2021

The oss-fuzz fuzzer has been reporting some failing testcases for les. They're all spurious, and cannot reliably be reproduced. However, running them showed that there was a goroutine leak: the tests created a lot of new clients, which started an exec queue that was never torn down.

This PR fixes the goroutine leak, and also a log message which was erroneously formatted.

WARN [03-08|10:35:15.880] GetBlockHeaders skip overflow attack id=0000000000000000 conn= current=0 skip=18446744073709551615 next=0 attacker="[123 10 32 32 34 101 110 111 100 101 34 58 32 34 101 110 111 100 101 58 47 47 110 117 108 108 46 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 34 44 10 32 32 34 105 100 34 58 32 34 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 34 44 10 32 32 34 110 97 109 101 34 58 32 34 34 44 10 32 32 34 99 97 112 115 34 58 32 110 117 108 108 44 10 32 32 34 110 101 116 119 111 114 107 34 58 32 123 10 32 32 32 32 34 108 111 99 97 108 65 100 100 114 101 115 115 34 58 32 34 112 105 112 101 34 44 10 32 32 32 32 34 114 101 109 111 116 101 65 100 100 114 101 115 115 34 58 32 34 112 105 112 101 34 44 10 32 32 32 32 34 105 110 98 111 117 110 100 34 58 32 102 97 108 115 101 44 10 32 32 32 32 34 116 114 117 115 116 101 100 34 58 32 102 97 108 115 101 44 10 32 32 32 32 34 115 116 97 116 105 99 34 58 32 102 97 108 115 101 10 32 32 125 44 10 32 32 34 112 114 111 116 111 99 111 108 115 34 58 32 123 125 10 125]"
vs
WARN [03-08|10:35:59.406] GetBlockHeaders skip overflow attack id=0000000000000000 conn= current=0 skip=18446744073709551615 next=0 attacker="{\n \"enode\": \"enode://null.0000000000000000000000000000000000000000000000000000000000000000\",\n \"id\": \"0000000000000000000000000000000000000000000000000000000000000000\",\n \"name\": \"\",\n \"caps\": null,\n \"network\": {\n \"localAddress\": \"pipe\",\n \"remoteAddress\": \"pipe\",\n \"inbound\": false,\n \"trusted\": false,\n \"static\": false\n },\n \"protocols\": {}\n}"

Copy link
Contributor

@zsfelfoldi zsfelfoldi left a comment

Choose a reason for hiding this comment

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

The PR adds two empty testcase files, is that intentional? Otherwise LGTM.

@holiman holiman added this to the 1.10.2 milestone Mar 16, 2021
@holiman holiman merged commit bc47993 into ethereum:master Mar 16, 2021
atif-konasl pushed a commit to frozeman/pandora-execution-engine that referenced this pull request Oct 15, 2021
The oss-fuzz fuzzer has been reporting some failing testcases for les. They're all spurious, and cannot reliably be reproduced. However, running them showed that there was a goroutine leak: the tests created a lot of new clients, which started an exec queue that was never torn down.

This PR fixes the goroutine leak, and also a log message which was erroneously formatted.
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