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

time.Sleep returns immediately for very long durations (integer overflow?) #36202

Closed
cfhay opened this issue Dec 18, 2019 · 2 comments
Closed
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@cfhay
Copy link

cfhay commented Dec 18, 2019

go1.13.5
amd64p32

If Duration is at least around MaxInt64 / 4, time.Sleep returns immediately. This doesn't happen at MaxInt64 / 8.

https://play.golang.org/p/nC3KiDrY_vr

What did you expect to see?

The script should start sleeping.

What did you see instead?

time.Sleep returns immediately.

@mvdan
Copy link
Member

mvdan commented Dec 18, 2019

It works fine for me on go version go1.13.5 linux/amd64. That is, the program starts sleeping, and it doesn't seem to stop.

The playground uses fake times, so you shouldn't rely on it being able to sleep basically forever. Are you encountering this issue on a real platform?

@ALTree ALTree added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Dec 18, 2019
@gopherbot
Copy link

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@golang golang locked and limited conversation to collaborators Jan 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants