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 fails when GOMAXPROCS>1 #7496

Closed
mikioh opened this issue Mar 8, 2014 · 3 comments
Closed

runtime: TestFutexsleep fails when GOMAXPROCS>1 #7496

mikioh opened this issue Mar 8, 2014 · 3 comments

Comments

@mikioh
Copy link
Contributor

mikioh commented Mar 8, 2014

$ GOMAXPROCS=2 go test runtime -short  -cpu=1,2,4,10
--- FAIL: TestFutexsleep-2 (0.00 seconds)
    futex_test.go:51: futexsleep test "before the year 2038" finished early after 74.681us
--- FAIL: TestFutexsleep-4 (0.00 seconds)
    futex_test.go:61: futexsleep test "after the year 2038" finished early after 93.989us
FAIL

and 

http://build.golang.org/log/feb6cc2cb44943d70a431c8bba4ffdffc670a590
http://build.golang.org/log/c81fb002e52c602bfb4ba145a3e6fc9f87be1275

Looks there's some secret on MP stuff+userspace mutex.
@mikioh
Copy link
Contributor Author

mikioh commented Mar 8, 2014

Comment 1:

runtime/lock_futex.c says:
// This implementation depends on OS-specific implementations of
//
//      runtime·futexsleep(uint32 *addr, uint32 val, int64 ns)
//              Atomically,
//                      if(*addr == val) sleep
//              Might be woken up spuriously; that's allowed.
//              Don't sleep longer than ns; ns < 0 means forever.
//
//      runtime·futexwakeup(uint32 *addr, uint32 cnt)
//              If any procs are sleeping on addr, wake up at most cnt.

@mikioh
Copy link
Contributor Author

mikioh commented Mar 10, 2014

Comment 2:

This issue was closed by revision 4888781.

Status changed to Fixed.

@mikioh
Copy link
Contributor Author

mikioh commented Mar 12, 2014

Comment 3:

This issue was updated by revision ae9b661.

LGTM=iant
R=golang-codereviews, gobot, iant, bradfitz
CC=golang-codereviews
https://golang.org/cl/72760043

@mikioh mikioh added the fixed label Mar 12, 2014
@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants