Skip to content

runtime/race: ERROR: ThreadSanitizer failed to allocate 0x2710000 (40960000) bytes at address 1795557750080 (errno: 12) #28088

@ghost

Description

Please answer these questions before submitting your issue. Thanks!

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

go version go1.4-bootstrap-20170531 linux/amd64

Does this issue reproduce with the latest release?

Yes. go1.11.1

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

GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH=""
GORACE=""
GOROOT="/home/hello/go1.4"
GOTOOLDIR="/home/hello/go1.4/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -fmessage-length=0"
CXX="g++"
CGO_ENABLED="0"

What did you do?

If possible, provide a recipe for reproducing the error.

What did you expect to see?

ALL TESTS PASSED 
---
Installed Go for linux/amd64 in /home/hello/git/go
Installed commands in /home/hello/git/go/bin
*** You need to add /home/hello/git/go/bin to your PATH.

What did you see instead?

hello@hello:~/git-my/go/src$  GOROOT_BOOTSTRAP=/home/hello/go1.11.1 ./all.bash
##### Building Go bootstrap tool.
cmd/dist

##### Building Go toolchain using /home/hello/go1.11.1.
bootstrap/internal/obj
bootstrap/asm/internal/flags
bootstrap/compile/internal/big
bootstrap/internal/gcprog
bootstrap/internal/obj/arm
bootstrap/internal/obj/arm64
bootstrap/internal/obj/mips
bootstrap/internal/obj/ppc64
bootstrap/internal/obj/x86
bootstrap/asm/internal/lex
bootstrap/link/internal/ld
bootstrap/asm/internal/arch
bootstrap/compile/internal/gc
bootstrap/asm/internal/asm
bootstrap/asm
bootstrap/link/internal/amd64
bootstrap/link/internal/arm
bootstrap/link/internal/arm64
bootstrap/link/internal/mips64
bootstrap/link/internal/ppc64
bootstrap/link/internal/x86
bootstrap/link
bootstrap/compile/internal/amd64
bootstrap/compile/internal/arm
bootstrap/compile/internal/arm64
bootstrap/compile/internal/mips64
bootstrap/compile/internal/ppc64
bootstrap/compile/internal/x86
bootstrap/compile

##### Building go_bootstrap for host, linux/amd64.
runtime/internal/sys
runtime/internal/atomic
runtime
encoding
unicode/utf16
internal/syscall/windows/sysdll
errors
sync/atomic
internal/race
math
unicode
sort
unicode/utf8
sync
container/heap
io
internal/singleflight
syscall
hash
hash/adler32
bytes
strings
strconv
bufio
path
internal/syscall/windows
internal/syscall/windows/registry
time
crypto
reflect
encoding/base64
regexp/syntax
crypto/sha1
os
regexp
path/filepath
os/signal
encoding/binary
fmt
io/ioutil
os/exec
go/token
debug/dwarf
compress/flate
net/url
text/template/parse
log
encoding/json
flag
go/scanner
go/ast
compress/zlib
text/template
debug/macho
debug/elf
go/parser
go/doc
go/build
cmd/go

##### Building packages and commands for linux/amd64.
runtime/internal/sys
runtime/internal/atomic
runtime
internal/race
errors
sync/atomic
unicode
unicode/utf8
math
sync
sort
io
syscall
hash
hash/adler32
hash/crc32
container/heap
container/list
bytes
strings
bufio
strconv
path
text/tabwriter
compress/bzip2
container/ring
crypto/subtle
time
crypto/cipher
math/rand
reflect
regexp/syntax
crypto
crypto/aes
crypto/sha512
crypto/hmac
os
regexp
crypto/md5
internal/syscall/unix
crypto/rc4
crypto/sha1
encoding/binary
crypto/sha256
encoding/base64
fmt
path/filepath
crypto/des
encoding/pem
internal/singleflight
encoding
encoding/ascii85
encoding/base32
unicode/utf16
io/ioutil
os/exec
hash/crc64
hash/fnv
html
image/color
image
image/color/palette
flag
log
cmd/internal/unvendor/golang.org/x/arch/arm/armasm
cmd/internal/obj
cmd/internal/unvendor/golang.org/x/arch/x86/x86asm
compress/flate
compress/zlib
debug/dwarf
cmd/internal/goobj
debug/gosym
debug/plan9obj
archive/tar
archive/zip
compress/gzip
compress/lzw
math/big
encoding/hex
debug/elf
debug/macho
debug/pe
go/token
database/sql/driver
go/scanner
database/sql
go/ast
cmd/internal/objfile
crypto/dsa
crypto/elliptic
encoding/asn1
cmd/addr2line
crypto/rand
go/parser
crypto/ecdsa
crypto/rsa
crypto/x509/pkix
go/printer
encoding/csv
encoding/gob
encoding/json
cmd/cgo
encoding/xml
internal/golang.org/x/net/http2/hpack
mime
mime/quotedprintable
net/http/internal
net/url
text/template/parse
go/constant
go/format
text/scanner
go/types
image/internal/imageutil
image/draw
text/template
image/gif
image/jpeg
go/doc
html/template
go/build
runtime/cgo
image/png
index/suffixarray
internal/syscall/windows/sysdll
runtime/debug
runtime/pprof
runtime/trace
internal/trace
testing
go/internal/gccgoimporter
go/internal/gcimporter
internal/testenv
math/cmplx
net/internal/socktest
os/signal
go/importer
runtime/race
testing/iotest
testing/quick
cmd/api
cmd/internal/obj/arm
cmd/internal/obj/arm64
net
os/user
cmd/internal/obj/mips
cmd/internal/obj/ppc64
cmd/internal/obj/x86
cmd/asm/internal/flags
cmd/asm/internal/lex
cmd/compile/internal/big
cmd/asm/internal/arch
cmd/internal/gcprog
cmd/asm/internal/asm
cmd/cover
cmd/asm
cmd/compile/internal/gc
crypto/x509
net/textproto
log/syslog
crypto/tls
cmd/dist
mime/multipart
net/mail
cmd/doc
net/http
net/smtp
cmd/fix
cmd/gofmt
cmd/link/internal/ld
cmd/nm
expvar
net/http/cgi
net/http/cookiejar
net/http/fcgi
net/http/httptest
net/http/httputil
net/http/pprof
net/rpc
cmd/compile/internal/amd64
cmd/compile/internal/arm
net/rpc/jsonrpc
cmd/compile/internal/arm64
cmd/compile/internal/mips64
cmd/compile/internal/ppc64
cmd/compile/internal/x86
cmd/go
cmd/link/internal/amd64
cmd/link/internal/arm
cmd/link/internal/arm64
cmd/link/internal/mips64
cmd/compile
cmd/link/internal/ppc64
cmd/link/internal/x86
cmd/objdump
cmd/link
cmd/pack
cmd/pprof/internal/profile
cmd/pprof/internal/svg
cmd/pprof/internal/tempfile
cmd/trace
cmd/vet/internal/whitelist
cmd/vet
cmd/pprof/internal/plugin
cmd/pprof/internal/report
cmd/pprof/internal/commands
cmd/pprof/internal/driver
cmd/pprof/internal/fetch
cmd/pprof/internal/symbolizer
cmd/pprof/internal/symbolz
cmd/pprof
cmd/yacc


##### Testing packages.
ok  	archive/tar	0.157s
ok  	archive/zip	0.258s
ok  	bufio	0.161s
ok  	bytes	0.260s
ok  	compress/bzip2	0.175s
ok  	compress/flate	0.518s
ok  	compress/gzip	0.079s
ok  	compress/lzw	0.061s
ok  	compress/zlib	0.105s
ok  	container/heap	0.015s
ok  	container/list	0.020s
ok  	container/ring	0.047s
ok  	crypto/aes	0.063s
ok  	crypto/cipher	0.020s
ok  	crypto/des	0.029s
ok  	crypto/dsa	0.019s
ok  	crypto/ecdsa	0.084s
ok  	crypto/elliptic	0.167s
ok  	crypto/hmac	0.021s
ok  	crypto/md5	0.011s
ok  	crypto/rand	0.047s
ok  	crypto/rc4	0.245s
ok  	crypto/rsa	0.263s
ok  	crypto/sha1	0.024s
ok  	crypto/sha256	0.026s
ok  	crypto/sha512	0.008s
ok  	crypto/subtle	0.044s
ok  	crypto/tls	2.391s
ok  	crypto/x509	3.395s
ok  	database/sql	0.081s
ok  	database/sql/driver	0.039s
ok  	debug/dwarf	0.050s
ok  	debug/elf	0.163s
ok  	debug/gosym	0.773s
ok  	debug/macho	0.030s
ok  	debug/pe	0.072s
ok  	debug/plan9obj	0.037s
ok  	encoding/ascii85	0.043s
ok  	encoding/asn1	0.011s
ok  	encoding/base32	0.008s
ok  	encoding/base64	0.020s
ok  	encoding/binary	0.024s
ok  	encoding/csv	0.012s
ok  	encoding/gob	0.117s
ok  	encoding/hex	0.082s
ok  	encoding/json	0.476s
ok  	encoding/pem	0.051s
ok  	encoding/xml	0.025s
ok  	errors	0.019s
ok  	expvar	0.044s
ok  	flag	0.027s
ok  	fmt	0.388s
ok  	go/ast	0.027s
ok  	go/build	1.074s
ok  	go/constant	0.032s
ok  	go/doc	0.220s
ok  	go/format	0.042s
ok  	go/internal/gccgoimporter	0.029s
ok  	go/internal/gcimporter	0.746s
ok  	go/parser	0.135s
ok  	go/printer	2.165s
ok  	go/scanner	0.023s
ok  	go/token	0.067s
ok  	go/types	1.882s
ok  	hash/adler32	0.040s
ok  	hash/crc32	0.037s
ok  	hash/crc64	0.012s
ok  	hash/fnv	0.029s
ok  	html	0.009s
ok  	html/template	0.077s
ok  	image	0.432s
ok  	image/color	0.311s
ok  	image/draw	0.264s
ok  	image/gif	0.347s
ok  	image/jpeg	0.536s
ok  	image/png	0.194s
ok  	index/suffixarray	0.064s
ok  	internal/golang.org/x/net/http2/hpack	0.023s
ok  	internal/singleflight	0.026s
ok  	internal/trace	0.006s
ok  	io	0.038s
ok  	io/ioutil	0.101s
ok  	log	0.027s
ok  	log/syslog	2.073s
ok  	math	0.035s
ok  	math/big	0.911s
ok  	math/cmplx	0.012s
ok  	math/rand	0.197s
ok  	mime	0.068s
ok  	mime/multipart	1.125s
ok  	mime/quotedprintable	0.458s
ok  	net	2.307s
ok  	net/http	12.668s
ok  	net/http/cgi	1.145s
ok  	net/http/cookiejar	0.046s
ok  	net/http/fcgi	0.012s
ok  	net/http/httptest	0.089s
ok  	net/http/httputil	0.061s
ok  	net/http/internal	0.008s
ok  	net/internal/socktest	0.007s
ok  	net/mail	0.023s
ok  	net/rpc	0.038s
ok  	net/rpc/jsonrpc	0.024s
ok  	net/smtp	0.100s
ok  	net/textproto	0.034s
ok  	net/url	0.014s
ok  	os	0.647s
ok  	os/exec	0.770s
ok  	os/signal	4.299s
ok  	os/user	0.011s
ok  	path	0.031s
ok  	path/filepath	0.162s
ok  	reflect	0.163s
ok  	regexp	0.589s
ok  	regexp/syntax	1.174s
ok  	runtime	67.031s
ok  	runtime/debug	0.036s
ok  	runtime/internal/atomic	0.221s
ok  	runtime/pprof	2.053s
ok  	runtime/trace	5.491s
ok  	sort	0.203s
ok  	strconv	1.425s
ok  	strings	0.237s
ok  	sync	0.217s
ok  	sync/atomic	1.097s
ok  	syscall	0.222s
ok  	testing	1.622s
ok  	testing/quick	0.232s
ok  	text/scanner	0.021s
ok  	text/tabwriter	0.019s
ok  	text/template	0.251s
ok  	text/template/parse	0.060s
ok  	time	3.191s
ok  	unicode	0.029s
ok  	unicode/utf16	0.025s
ok  	unicode/utf8	0.012s
ok  	cmd/addr2line	4.005s
ok  	cmd/api	0.092s
ok  	cmd/asm/internal/asm	0.608s
ok  	cmd/asm/internal/lex	0.027s
ok  	cmd/compile/internal/big	2.350s
ok  	cmd/compile/internal/gc	1.592s
ok  	cmd/cover	6.778s
ok  	cmd/doc	0.158s
ok  	cmd/fix	0.048s
ok  	cmd/go	99.214s
ok  	cmd/gofmt	0.247s
ok  	cmd/internal/goobj	0.011s
ok  	cmd/internal/obj	0.032s
ok  	cmd/internal/obj/x86	0.020s
ok  	cmd/internal/unvendor/golang.org/x/arch/arm/armasm	0.064s
ok  	cmd/internal/unvendor/golang.org/x/arch/x86/x86asm	0.656s
ok  	cmd/nm	3.239s
ok  	cmd/objdump	9.059s
ok  	cmd/pack	6.228s
ok  	cmd/pprof/internal/profile	0.006s
ok  	cmd/vet	7.564s

##### GOMAXPROCS=2 runtime -cpu=1,2,4
ok  	runtime	140.576s

##### Testing without libgcc.
ok  	crypto/x509	2.603s
ok  	net	0.016s
ok  	os/user	0.015s

##### sync -cpu=10
ok  	sync	0.243s

##### ../misc/cgo/stdio

##### ../misc/cgo/life

##### ../misc/cgo/test
PASS
ok  	_/home/hello/git-my/go/misc/cgo/test	2.082s
PASS
ok  	_/home/hello/git-my/go/misc/cgo/test	2.080s
PASS
ok  	_/home/hello/git-my/go/misc/cgo/test	2.105s
PASS
ok  	_/home/hello/git-my/go/misc/cgo/testtls	0.013s
PASS
ok  	_/home/hello/git-my/go/misc/cgo/testtls	0.015s
PASS
ok  	_/home/hello/git-my/go/misc/cgo/testtls	0.021s
PASS
ok  	_/home/hello/git-my/go/misc/cgo/nocgo	0.026s
PASS
ok  	_/home/hello/git-my/go/misc/cgo/nocgo	0.020s
PASS
ok  	_/home/hello/git-my/go/misc/cgo/nocgo	0.009s
PASS
ok  	_/home/hello/git-my/go/misc/cgo/test	2.026s
PASS
ok  	_/home/hello/git-my/go/misc/cgo/testtls	0.018s
PASS
ok  	_/home/hello/git-my/go/misc/cgo/nocgo	0.013s

##### Testing race detector
ok  	runtime/race	7.529s
ok  	flag	1.027s
ok  	os/exec	2.053s
==23014==ERROR: ThreadSanitizer failed to allocate 0x2710000 (40960000) bytes at address 1795557750080 (errno: 12)
unexpected fault address 0x0
fatal error: fault
[signal 0x7 code=0x80 addr=0x0 pc=0x56555598f285]

goroutine 1 [running, locked to thread]:
runtime.throw(0x0, 0x5655557baec8)
	/home/hello/git-my/go/src/runtime/panic.go:547 +0x90 fp=0x7ffbffffaa40 sp=0x7ffbffffaa28

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
	/home/hello/git-my/go/src/runtime/asm_amd64.s:1998 +0x1 fp=0xc82003cfb8 sp=0xc82003cfb0
exit status 2
FAIL	_/home/hello/git-my/go/misc/cgo/test	0.017s
2018/10/09 10:03:26 Failed: exit status 1
==22160==ERROR: ThreadSanitizer failed to allocate 0x26e8000 (40796160) bytes at address 1795556d9c080 (errno: 12)
unexpected fault address 0x0
fatal error: fault
[signal 0x7 code=0x80 addr=0x0 pc=0x565555803125]

goroutine 1 [running, locked to thread]:
runtime.throw(0x0, 0x5655556d73b8)
	/home/hello/git-my/go/src/runtime/panic.go:547 +0x90 fp=0x7ffbffffaa70 sp=0x7ffbffffaa58

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
	/home/hello/git-my/go/src/runtime/asm_amd64.s:1998 +0x1
FAIL	flag	0.036s
==22271==ERROR: ThreadSanitizer failed to allocate 0x2720000 (41025536) bytes at address 1795558694080 (errno: 12)
unexpected fault address 0x0
fatal error: fault
[signal 0x7 code=0x80 addr=0x0 pc=0x565555c41305]

goroutine 1 [running, locked to thread]:
runtime.throw(0x0, 0x565555891538)
	/home/hello/git-my/go/src/runtime/panic.go:547 +0x90 fp=0x7ffbffffaa70 sp=0x7ffbffffaa58

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
	/home/hello/git-my/go/src/runtime/asm_amd64.s:1998 +0x1
FAIL	os/exec	0.022s
2018/10/09 10:03:27 Failed: exit status 1

##### ../misc/cgo/testgodefs
2018/10/09 10:03:27 FAILED
hello@hello:~/git-my/go/src$  free -m
              total        used        free      shared  buff/cache   available
Mem:           3405        2678         179         178         547         330
Swap:          5119         628        4491
hello@hello:~/git-my/go/src$ go env
GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH=""
GORACE=""
GOROOT="/home/hello/go1.4"
GOTOOLDIR="/home/hello/go1.4/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -fmessage-length=0"
CXX="g++"
CGO_ENABLED="0"
hello@hello:~/git-my/go/src$ 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions