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

msan/tsan tests run (and FAIL) for clang version < 3.6 #14570

Closed
rjammala opened this issue Feb 29, 2016 · 5 comments
Closed

msan/tsan tests run (and FAIL) for clang version < 3.6 #14570

rjammala opened this issue Feb 29, 2016 · 5 comments
Milestone

Comments

@rjammala
Copy link

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

go version devel +1df5183 Mon Feb 29 14:58:15 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="/home/rjammalamadaka/gocode"
    GORACE=""
    GOROOT="/home/rjammalamadaka/go"
    GOTOOLDIR="/home/rjammalamadaka/go/pkg/tool/linux_amd64"
    CC="gcc"
    GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build399943986=/tmp/go-build"
    CXX="g++"
    CGO_ENABLED="1"
  2. What did you do?
    (Use play.golang.org to provide a runnable example, if possible.)
    Tried to build go at tip
  3. What did you expect to see?
    Previously the asan/tsan tests used to be skipped as I have an older version of clang (3.4), now I see that those tests fail.
  4. What did you see instead?
../misc/cgo/testasan
../misc/cgo/testsanitizers

skipping msan tests: clang version 3.4 (older than 3.6)
FATAL: ThreadSanitizer CHECK failed: /builddir/build/BUILD/llvm-3.4.2.src/projects/compiler-rt/lib/tsan/rtl/tsan_rtl_mutex.cc:238 "((thr->in_rtl)) > ((0))" (0x0, 0x0)
#0 __tsan::PrintCurrentStackSlow() :0 (tsan+0x0000000fc38f)
#1 tsan::TsanCheckFailed(char const, int, char const, unsigned long long, unsigned long long) :0 (tsan+0x0000000fc363)
#2 sanitizer::CheckFailed(char const, int, char const, unsigned long long, unsigned long long) :0 (tsan+0x000000095061)
#3 __tsan::Acquire(__tsan::ThreadState*, unsigned long, unsigned long) :0 (tsan+0x0000000fbe82)
#4 _cgo_tsan_acquire /home/rjammalamadaka/go/misc/cgo/testsanitizers/tsan.go:64 (tsan+0x00000015373f)
#5 _cgo_82605fb7dc7c_Cfunc_setVal /home/rjammalamadaka/go/misc/cgo/testsanitizers/tsan.go:95 (tsan+0x00000015373f)
#6 runtime.asmcgocall :0 (tsan+0x00000014f22f)

exit status 1
FAIL: tsan
FATAL: ThreadSanitizer CHECK failed: /builddir/build/BUILD/llvm-3.4.2.src/projects/compiler-rt/lib/tsan/rtl/tsan_rtl_mutex.cc:238 "((thr->in_rtl)) > ((0))" (0x0, 0x0)
#0 __tsan::PrintCurrentStackSlow() :0 (tsan2+0x0000000fc52f)
#1 tsan::TsanCheckFailed(char const, int, char const, unsigned long long, unsigned long long) :0 (tsan2+0x0000000fc503)
#2 sanitizer::CheckFailed(char const, int, char const, unsigned long long, unsigned long long) :0 (tsan2+0x000000095201)
#3 __tsan::Acquire(__tsan::ThreadState*, unsigned long, unsigned long) :0 (tsan2+0x0000000fc022)
#4 _cgo_tsan_acquire /home/rjammalamadaka/go/misc/cgo/testsanitizers/tsan2.go:74 (tsan2+0x0000001538db)
#5 _cgo_b3c556dc7343_Cfunc_run /home/rjammalamadaka/go/misc/cgo/testsanitizers/tsan2.go:91 (tsan2+0x0000001538db)
#6 runtime.asmcgocall :0 (tsan2+0x00000014f43f)

exit status 1
FAIL: tsan2
2016/02/29 10:43:36 Failed: exit status 1

../misc/cgo/errors
../misc/cgo/testsigfwd
../test/bench/go1

testing: warning: no tests to run
PASS
ok _/home/rjammalamadaka/go/test/bench/go1 3.766s

../test

skipped due to earlier error
skipped due to earlier error
skipped due to earlier error
skipped due to earlier error
skipped due to earlier error

API check

skipped due to earlier error
2016/02/29 10:43:41 FAILED

@bradfitz bradfitz added this to the Go1.7 milestone Feb 29, 2016
@bradfitz
Copy link
Contributor

/cc @dvyukov too

@aclements
Copy link
Member

This bug was introduced by c8ef0df cmd/cgo: add hooks for thread sanitizer (@ianlancetaylor).

@dvyukov
Copy link
Member

dvyukov commented Feb 29, 2016

@ianlancetaylor we are not going to fix 3.4, so please turn it off for old compilers as well. I am not sure what is the clang version when it started working, but we can set it to the version we have on bots (and where we know it passes).

@gopherbot
Copy link
Contributor

CL https://golang.org/cl/20057 mentions this issue.

@OneOfOne
Copy link
Contributor

Both pass on Arch Linux with clang 3.7.1 and kernel 4.4.1, after modifying test.bash to allow it to run, so maybe check for < 3.7.1?

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

7 participants