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

Bug Report: TestFuzz hangs on go1.20.1 #12513

Closed
frouioui opened this issue Feb 28, 2023 · 1 comment · Fixed by #12399
Closed

Bug Report: TestFuzz hangs on go1.20.1 #12513

frouioui opened this issue Feb 28, 2023 · 1 comment · Fixed by #12399

Comments

@frouioui
Copy link
Member

Overview of the Issue

Since the changes made in #12399, we saw TestFuzz was randomly stalling and timing out in the CI and locally.

Reproduction Steps

Upgrade to go1.20.1 and run TestFuzz.

Binary Version

main, release-16.0

Operating System and Environment details

n/a

Log Fragments

No response

@frouioui frouioui added Type: Bug Needs Triage This issue needs to be correctly labelled and triaged Component: Build/CI and removed Needs Triage This issue needs to be correctly labelled and triaged labels Feb 28, 2023
@frouioui frouioui self-assigned this Feb 28, 2023
@frouioui
Copy link
Member Author

This issue will be fixed by #12399 thanks to 92d842f.

The reason why TestFuzz was timing out is because the test calls New

p := New(minSize, maxSize)

Where minSize is a random number between 0 and 16384. However, New uses minSize the following way:

	const multiplier = 2
	...
	curSize := minSize
	for curSize < maxSize {
		pools = append(pools, newSizedPool(curSize))
		curSize *= multiplier
	}

Meaning that curSize *= multiplier will always be evaluated to 0 *= 2, and thus the loop condition curSize < maxSize will always be false.

@frouioui frouioui linked a pull request Feb 28, 2023 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant