Hello,I was playing with a dummy tool to find my duplicated jpg files in my iPhoto library and I observed the following problem. It looks like compiled binary works couple of times before throwing a panic. The problem is reproducible on my machine (memory issues?). I tried searching the group archives and open issues at code.google.com/p/go but couldn't find something related.This is a go-1.0.3 on top of OSX 10.8.2[caglar@Zangetsu:~/Projects/github/godup] go build dup.go [caglar@Zangetsu:~/Projects/github/godup] ./dup [caglar@Zangetsu:~/Projects/github/godup] ./dup CONFLICT between /Users/caglar/Pictures/iPhoto Library/Masters/2012/09/26/20120926-140126/IMG_0601.JPG and /Users/caglar/Pictures/iPhoto Library/Masters/2012/09/29/20120929-235343/IMG_0780.JPG [caglar@Zangetsu:~/Projects/github/godup] ./dup CONFLICT between /Users/caglar/Pictures/iPhoto Library/Masters/2012/09/26/20120926-140126/IMG_0601.JPG and /Users/caglar/Pictures/iPhoto Library/Masters/2012/09/29/20120929-235343/IMG_0780.JPG [caglar@Zangetsu:~/Projects/github/godup] ./dup panic: invalid memory address or nil pointer dereference throw: panic during gc [signal 0xb code=0x1 addr=0x0 pc=0x9045]
Hi Dmitry,Thanks for the tip about the tip, I wasn't aware of that race detector. So I switched to that (I was using release) and it looks like I've a race due to map operations not being atomic.[caglar@Zangetsu:~/Projects/github/godup] go run -race dup2.go==================WARNING: DATA RACERead by goroutine 3:main.hasher()/Users/caglar/Projects/github/godup/dup2.go:47 +0x46bPrevious write by goroutine 2:main.hasher()/Users/caglar/Projects/github/godup/dup2.go:52 +0x5ffGoroutine 3 (running) created at:main.main()/Users/caglar/Projects/github/godup/dup2.go:67 +0x162runtime.main()/Users/caglar/Downloads/go/src/pkg/runtime/proc.c:248 +0x91Goroutine 2 (finished) created at:main.main()/Users/caglar/Projects/github/godup/dup2.go:67 +0x162runtime.main()/Users/caglar/Downloads/go/src/pkg/runtime/proc.c:248 +0x91==================Thanks!