Skip to content

misc/cgo/testsanitizers: fails on ubuntu 16.04 pre-release #15185

Closed
@mwhudson

Description

@mwhudson

Please answer these questions before submitting your issue. Thanks!

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

go version devel +68ac1f7 Thu Apr 7 21:39:32 2016 +0000 linux/amd64

  1. What operating system and processor architecture are you using (go env)?

ubuntu@ip-172-31-28-54:~/go/src$ ../bin/go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH=""
GORACE=""
GOROOT="/home/ubuntu/go"
GOTOOLDIR="/home/ubuntu/go/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build979798221=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"

  1. What did you do?

go tool dist test -run sanitizers

  1. What did you expect to see?

Tests passing

  1. What did you see instead?
ubuntu@ip-172-31-28-54:~/go/src$ go tool dist test -run sanitizers

##### ../misc/cgo/testsanitizers
skipping msan tests: -fsanitize=memory not supported
==================
WARNING: ThreadSanitizer: data race (pid=24394)
  Write of size 4 at 0x0000006acf78 by thread T3:
    #0 setVal /home/ubuntu/go/misc/cgo/testsanitizers/tsan.go:22 (tsan+0x000000445360)
    #1 _cgo_82605fb7dc7c_Cfunc_setVal /home/ubuntu/go/misc/cgo/testsanitizers/tsan.go:96 (tsan+0x0000004453e1)
    #2 runtime.asmcgocall <null> (tsan+0x00000044268f)

  Previous write of size 4 at 0x0000006acf78 by main thread:
    #0 setVal /home/ubuntu/go/misc/cgo/testsanitizers/tsan.go:22 (tsan+0x000000445360)
    #1 _cgo_82605fb7dc7c_Cfunc_setVal /home/ubuntu/go/misc/cgo/testsanitizers/tsan.go:96 (tsan+0x0000004453e1)
    #2 runtime.asmcgocall <null> (tsan+0x00000044268f)

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

  Thread T3 (tid=24398, running) created by main thread at:
    #0 pthread_create <null> (libtsan.so.0+0x000000027577)
    #1 _cgo_sys_thread_start /home/ubuntu/go/src/runtime/cgo/gcc_linux_amd64.c:73 (tsan+0x000000445761)

SUMMARY: ThreadSanitizer: data race /home/ubuntu/go/misc/cgo/testsanitizers/tsan.go:22 setVal
==================
FAIL: tsan
==================
WARNING: ThreadSanitizer: data race (pid=24480)
  Write of size 4 at 0x0000006aded8 by thread T3:
    #0 setVal /home/ubuntu/go/misc/cgo/testsanitizers/tsan2.go:32 (tsan2+0x000000445440)
    #1 _cgo_b3c556dc7343_Cfunc_setVal /home/ubuntu/go/misc/cgo/testsanitizers/tsan2.go:106 (tsan2+0x0000004455d1)
    #2 runtime.asmcgocall <null> (tsan2+0x00000044279f)

  Previous write of size 4 at 0x0000006aded8 by main thread:
    #0 run /home/ubuntu/go/misc/cgo/testsanitizers/tsan2.go:24 (tsan2+0x0000004454c9)
    #1 _cgo_b3c556dc7343_Cfunc_run /home/ubuntu/go/misc/cgo/testsanitizers/tsan2.go:92 (tsan2+0x00000044557d)
    #2 runtime.asmcgocall <null> (tsan2+0x00000044279f)

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

  Thread T3 (tid=24484, running) created by main thread at:
    #0 pthread_create <null> (libtsan.so.0+0x000000027577)
    #1 _cgo_sys_thread_start /home/ubuntu/go/src/runtime/cgo/gcc_linux_amd64.c:73 (tsan2+0x000000445951)

SUMMARY: ThreadSanitizer: data race /home/ubuntu/go/misc/cgo/testsanitizers/tsan2.go:32 setVal
==================
FAIL: tsan2
2016/04/08 00:37:19 Failed: exit status 1
2016/04/08 00:37:19 FAILED

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions