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

Closed
bradfitz opened this issue Nov 4, 2019 · 3 comments
Closed

runtime: TestFutexsleep failing on freebsd and linux #35347

bradfitz opened this issue Nov 4, 2019 · 3 comments

Comments

@bradfitz
Copy link
Member

@bradfitz bradfitz commented Nov 4, 2019

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

https://storage.googleapis.com/go-build-log/deaf5ba3/freebsd-amd64-12_0_6ba9394d.log

##### 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
FAIL	runtime	14.092s
FAIL
2019/11/04 18:30:12 Failed: exit status 1
2019/11/04 18:30:12 FAILED

/cc @ianlancetaylor

@mdempsky

This comment has been minimized.

Copy link
Member

@mdempsky mdempsky commented Nov 4, 2019

Got the same flake on the linux-amd64 trybot just now: https://storage.googleapis.com/go-build-log/dec1040d/linux-amd64_babdf1c2.log

@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
@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

@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

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Nov 5, 2019

Change https://golang.org/cl/205378 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.