Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
time: TestOverflowRuntimeTimer failing #8136
Please merge this into issue #6874 and reopen it. go version go1.3beta2 +177ed19da89f Wed May 28 14:04:31 2014 -0400 linux/amd64 What steps reproduce the problem? If possible, include a link to a program on play.golang.org. This failure is reproduced quickly by running this script. ----------- #!/bin/sh set -xe go test -c -i time while /bin/true do GOMAXPROCS=$[ 1 + $[ RANDOM % 256 ] ] ./time.test -test.v done ----------- What happened? === RUN TestOverflowRuntimeTimer-251 --- FAIL: TestOverflowRuntimeTimer-251 (0.10 seconds) sleep_test.go:391: runtime timer stuck: overflow in addtimer What should have happened instead? === RUN TestOverflowRuntimeTimer-251 --- PASS: TestOverflowRuntimeTimer-251 (0.01 seconds) Please provide any additional information below. uname -a Linux mybox 3.6.11-4.fc16.x86_64 #1 SMP Tue Jan 8 20:57:42 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
The test requires that timerproc runs, but busy loops and starves the scheduler so that, with high probability, timerproc doesn't run. Avoid the issue by expecting the test to succeed; if not, a major outside timeout will kill it and let us know. As you can see from the diffs, there have been several attempts to fix this with chicanery, but none has worked. Don't bother trying any more. Fixes golang#8136. LGTM=rsc R=rsc, josharian CC=golang-codereviews https://golang.org/cl/105140043