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

runtime: TestFutexsleep failing on freebsd and linux #35347

bradfitz opened this issue Nov 4, 2019 · 3 comments

runtime: TestFutexsleep failing on freebsd and linux #35347

bradfitz opened this issue Nov 4, 2019 · 3 comments


Copy link

@bradfitz bradfitz commented Nov 4, 2019

FreeBSD failure I've seen a few times now...

##### GOMAXPROCS=2 runtime -cpu=1,2,4 -quick
--- FAIL: TestFutexsleep (0.02s)
    futex_test.go:65: futexsleep test "before the year 2038" finished early after 20.627855ms
FAIL	runtime	14.092s
2019/11/04 18:30:12 Failed: exit status 1
2019/11/04 18:30:12 FAILED

/cc @ianlancetaylor

Copy link

@mdempsky mdempsky commented Nov 4, 2019

Got the same flake on the linux-amd64 trybot just now:

@mdempsky mdempsky changed the title runtime: TestFutexsleep failing on freebsd runtime: TestFutexsleep failing on freebsd and linux Nov 4, 2019
@mdempsky mdempsky added the OS-Linux label Nov 4, 2019
Copy link

@ianlancetaylor ianlancetaylor commented Nov 5, 2019

My first guess is that the test is failing because the futex sleep is being interrupted by a preemption signal. The test works by making a direct call to futexsleep, which on GNU/Linux calls futex and on FreeBSD calls sys_umtx_op. The intent is to sleep for a long time. However, these sleeps are interruptible; if a preemption interrupt is delivered, the sleep will wake up and return without error.

CC @aclements @cherrymui

Copy link

@gopherbot gopherbot commented Nov 5, 2019

Change mentions this issue: runtime: disable preemption during test calls to futexsleep

@gopherbot gopherbot closed this in 3c0fbee Nov 5, 2019
@danscales danscales assigned danscales and unassigned danscales Nov 12, 2019
@golang golang locked and limited conversation to collaborators Nov 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.