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

misc/cgo/testsanitizers: ThreadSantitizer test fails #14902

Closed
nadiasvertex opened this issue Mar 21, 2016 · 2 comments
Closed

misc/cgo/testsanitizers: ThreadSantitizer test fails #14902

nadiasvertex opened this issue Mar 21, 2016 · 2 comments
Milestone

Comments

@nadiasvertex
Copy link
Contributor

  1. What version of Go are you using (go version)?

go version devel +a145378 Mon Mar 21 20:24:06 2016 +0000 linux/amd64

  1. What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH=""
GORACE=""
GOROOT="/home/christopher/workspace/go-official"
GOTOOLDIR="/home/christopher/workspace/go-official/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build420019199=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
  1. What did you do?

Executed src/all.bash

  1. What did you expect to see?

All tests passed.

  1. What did you see instead?
##### ../misc/cgo/testsanitizers
skipping msan tests: -fsanitize=memory not supported
==================
WARNING: ThreadSanitizer: data race (pid=14437)
  Write of size 4 at 0x0000006b2e78 by thread T2:
    #0 setVal /home/christopher/workspace/go-official/misc/cgo/testsanitizers/tsan.go:22 (tsan+0x000000445070)
    #1 _cgo_82605fb7dc7c_Cfunc_setVal /home/christopher/workspace/go-official/misc/cgo/testsanitizers/tsan.go:96 (tsan+0x0000004450f1)
    #2 runtime.asmcgocall <null> (tsan+0x00000044235f)

  Previous write of size 4 at 0x0000006b2e78 by main thread:
    #0 setVal /home/christopher/workspace/go-official/misc/cgo/testsanitizers/tsan.go:22 (tsan+0x000000445070)
    #1 _cgo_82605fb7dc7c_Cfunc_setVal /home/christopher/workspace/go-official/misc/cgo/testsanitizers/tsan.go:96 (tsan+0x0000004450f1)
    #2 runtime.asmcgocall <null> (tsan+0x00000044235f)

  Location is global 'val' of size 4 at 0x0000006b2e78 (tsan+0x0000006b2e78)

  Thread T2 (tid=14440, running) created by main thread at:
    #0 pthread_create <null> (libtsan.so.0+0x000000027537)
    #1 _cgo_sys_thread_start /home/christopher/workspace/go-official/src/runtime/cgo/gcc_linux_amd64.c:73 (tsan+0x000000445471)

SUMMARY: ThreadSanitizer: data race /home/christopher/workspace/go-official/misc/cgo/testsanitizers/tsan.go:22 setVal
==================
FAIL: tsan
==================
WARNING: ThreadSanitizer: data race (pid=14631)
  Write of size 4 at 0x0000006b3dd8 by thread T3:
    #0 setVal /home/christopher/workspace/go-official/misc/cgo/testsanitizers/tsan2.go:32 (tsan2+0x000000445150)
    #1 _cgo_b3c556dc7343_Cfunc_setVal /home/christopher/workspace/go-official/misc/cgo/testsanitizers/tsan2.go:106 (tsan2+0x0000004452e1)
    #2 runtime.asmcgocall <null> (tsan2+0x00000044246f)

  Previous write of size 4 at 0x0000006b3dd8 by main thread:
    #0 run /home/christopher/workspace/go-official/misc/cgo/testsanitizers/tsan2.go:24 (tsan2+0x0000004451d9)
    #1 _cgo_b3c556dc7343_Cfunc_run /home/christopher/workspace/go-official/misc/cgo/testsanitizers/tsan2.go:92 (tsan2+0x00000044528d)
    #2 runtime.asmcgocall <null> (tsan2+0x00000044246f)

  Location is global '<null>' of size 0 at 0x000000000000 (tsan2+0x0000006b3dd8)

  Thread T3 (tid=14650, running) created by main thread at:
    #0 pthread_create <null> (libtsan.so.0+0x000000027537)
    #1 _cgo_sys_thread_start /home/christopher/workspace/go-official/src/runtime/cgo/gcc_linux_amd64.c:73 (tsan2+0x000000445661)

SUMMARY: ThreadSanitizer: data race /home/christopher/workspace/go-official/misc/cgo/testsanitizers/tsan2.go:32 setVal
==================
FAIL: tsan2
2016/03/21 18:56:53 Failed: exit status 1
@ianlancetaylor
Copy link
Contributor

Same as #14602?

@ianlancetaylor ianlancetaylor added this to the Go1.7 milestone Mar 21, 2016
@ianlancetaylor ianlancetaylor changed the title cgo/tests: ThreadSantitizer test fails misc/cgo/testsanitizers: ThreadSantitizer test fails Mar 21, 2016
@nadiasvertex
Copy link
Contributor Author

Yup sorry.

@golang golang locked and limited conversation to collaborators Mar 22, 2017
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

3 participants