FAQ
Change 8209534dab87 broke the linux-amd64-race build:
http://build.golang.org/log/c4906f453fc67508fa7160da293cb7f6bd346eda

cmd/gc: fix compiler crash during race instrumentation
The compiler is crashing on the following code:

type TypeID int
func (t *TypeID) encodeType(x int) (tt TypeID, err error) {
switch x {
case 0:
return t.encodeType(x * x)
}
return 0, nil
}
The pass marks "return struct" {tt TypeID, err error} as used,
and this causes internal check failure.
I've added the test to:
https://codereview.appspot.com/6525052/diff/7020/src/pkg/runtime/race/regression_

http://code.google.com/p/go/source/detail?r=8209534dab87

$ tail -200 < log
ok debug/macho 0.028s
ok debug/pe 0.052s
ok encoding/ascii85 0.029s
ok encoding/asn1 0.048s
ok encoding/base32 0.039s
ok encoding/base64 0.047s
ok encoding/binary 0.048s
ok encoding/csv 0.026s
ok encoding/gob 0.332s
ok encoding/hex 0.032s
ok encoding/json 0.616s
ok encoding/pem 0.036s
ok encoding/xml 0.117s
ok errors 0.024s
ok exp/ebnf 0.022s
ok exp/ebnflint 0.062s
ok exp/gotype 8.279s
ok exp/html 2.297s
ok exp/html/atom 0.027s
ok exp/inotify 1.279s
ok exp/locale/collate 2.114s
ok exp/locale/collate/build 0.056s
? exp/locale/collate/tools/colcmp [no test files]
ok exp/norm 66.183s
ok exp/types 4.084s
ok exp/types/staging 4.480s
ok exp/utf8string 0.028s
ok expvar 0.027s
ok flag 0.028s
ok fmt 1.044s
ok go/ast 0.037s
ok go/build 1.253s
ok go/doc 0.419s
ok go/parser 0.355s
ok go/printer 17.392s
ok go/scanner 0.074s
ok go/token 0.485s
? hash [no test files]
ok hash/adler32 0.045s
ok hash/crc32 0.018s
ok hash/crc64 0.017s
ok hash/fnv 0.028s
ok html 0.020s
ok html/template 0.487s
ok image 1.094s
ok image/color 0.085s
ok image/draw 0.227s
? image/gif [no test files]
ok image/jpeg 4.960s
ok image/png 0.517s
ok index/suffixarray 0.065s
ok io 0.076s
ok io/ioutil 0.026s
ok log 0.031s
ok log/syslog 0.431s
ok math 0.105s
ok math/big 1.338s
ok math/cmplx 0.049s
ok math/rand 0.470s
ok mime 0.031s
ok mime/multipart 2.289s
ok net 1.398s
==================
WARNING: DATA RACE
Write by goroutine 183:
net/http_test.countReader.Read()
/usr/local/go/src/pkg/net/http/serve_test.go:1066 +0x8c
net/http_test.(*countReader).Read()
/usr/local/go/src/pkg/net/http/client_test.go:0 +0xa2
io.(*LimitedReader).Read()
/usr/local/go/src/pkg/io/io.go:406 +0x161
io/ioutil.(*nopCloser).Read()
/usr/local/go/src/pkg/io/ioutil/blackhole_race.go:1 +0x5b
io.(*multiReader).Read()
/usr/local/go/src/pkg/io/multi.go:13 +0x94
io.Copy()
/usr/local/go/src/pkg/io/io.go:360 +0x1bd
net/http.(*transferWriter).WriteBody()
/usr/local/go/src/pkg/net/http/transfer.go:194 +0x1e0
net/http.(*Request).write()
/usr/local/go/src/pkg/net/http/request.go:371 +0xa77
net/http.(*persistConn).writeLoop()
/usr/local/go/src/pkg/net/http/transport.go:660 +0x227

Previous read by goroutine 99:
net/http_test.TestRequestBodyLimit()
/usr/local/go/src/pkg/net/http/serve_test.go:1098 +0x292
testing.tRunner()
/usr/local/go/src/pkg/testing/testing.go:301 +0x86

Goroutine 183 (running) created at:
net/http.(*Transport).getConn()
/usr/local/go/src/pkg/net/http/transport.go:408 +0x7d8
net/http.(*Transport).RoundTrip()
/usr/local/go/src/pkg/net/http/transport.go:157 +0x372
net/http.send()
/usr/local/go/src/pkg/net/http/client.go:141 +0x526
net/http.(*Client).Do()
/usr/local/go/src/pkg/net/http/client.go:109 +0x10d
net/http_test.TestRequestBodyLimit()
/usr/local/go/src/pkg/net/http/serve_test.go:1096 +0x280
testing.tRunner()
/usr/local/go/src/pkg/testing/testing.go:301 +0x86

Goroutine 99 (finished) created at:
testing.RunTests()
/usr/local/go/src/pkg/testing/testing.go:377 +0xa3e
testing.Main()
/usr/local/go/src/pkg/testing/testing.go:313 +0xad
main.main()
net/http/_test/_testmain.go:301 +0x95
runtime.main()
/usr/local/go/src/pkg/runtime/proc.c:247 +0x91

==================
==================
WARNING: DATA RACE
Read by goroutine 330:
net/http.(*bodyEOFSignal).Close()
/usr/local/go/src/pkg/net/http/transport.go:835 +0x41
net/http.(*persistConn).readLoop()
/usr/local/go/src/pkg/net/http/transport.go:575 +0x3df

Previous write by goroutine 85:
net/http.(*bodyEOFSignal).Close()
/usr/local/go/src/pkg/net/http/transport.go:838 +0x7a
net/http_test.func·103()
/usr/local/go/src/pkg/net/http/transport_test.go:894 +0x43c

Goroutine 330 (running) created at:
net/http.(*Transport).getConn()
/usr/local/go/src/pkg/net/http/transport.go:407 +0x7be
net/http.(*Transport).RoundTrip()
/usr/local/go/src/pkg/net/http/transport.go:157 +0x372
net/http.send()
/usr/local/go/src/pkg/net/http/client.go:141 +0x526
net/http.(*Client).doFollowingRedirects()
/usr/local/go/src/pkg/net/http/client.go:254 +0x993
net/http.(*Client).Get()
/usr/local/go/src/pkg/net/http/client.go:201 +0xbc
net/http_test.func·103()
/usr/local/go/src/pkg/net/http/transport_test.go:878 +0xe8

Goroutine 85 (running) created at:
net/http_test.TestTransportConcurrency()
/usr/local/go/src/pkg/net/http/transport_test.go:896 +0x2e5
testing.tRunner()
/usr/local/go/src/pkg/testing/testing.go:301 +0x86

==================
PASS
Found 2 data race(s)
FAIL net/http 20.958s
ok net/http/cgi 0.435s
ok net/http/fcgi 0.050s
ok net/http/httptest 0.035s
ok net/http/httputil 0.137s
? net/http/pprof [no test files]
ok net/mail 0.029s
ok net/rpc 0.873s
ok net/rpc/jsonrpc 0.089s
ok net/smtp 0.027s
ok net/textproto 0.044s
ok net/url 0.046s
ok old/netchan 0.145s
ok os 0.123s
ok os/exec 0.738s
ok os/signal 0.024s
ok os/user 0.022s
ok path 0.046s
ok path/filepath 0.650s
ok reflect 0.230s
ok regexp 0.950s
ok regexp/syntax 7.904s
ok runtime 3.925s
? runtime/cgo [no test files]
--- FAIL: TestStack (0.00 seconds)
stack_test.go:40: too few lines
FAIL
FAIL runtime/debug 0.019s
ok runtime/pprof 4.006s
ok sort 1.833s
ok strconv 6.195s
ok strings 2.805s
ok sync 0.905s
ok sync/atomic 0.548s
ok syscall 0.043s
? testing [no test files]
? testing/iotest [no test files]
ok testing/quick 0.221s
ok text/scanner 0.112s
ok text/tabwriter 0.032s
ok text/template 0.466s
ok text/template/parse 0.281s
ok time 3.781s
ok unicode 0.059s
ok unicode/utf16 0.023s
ok unicode/utf8 0.083s
? unsafe [no test files]

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedOct 10, '12 at 2:42p
activeOct 10, '12 at 2:42p
posts1
users1
websitegolang.org

1 user in discussion

Builder: 1 post

People

Translate

site design / logo © 2022 Grokbase