Hi,
I am using filebeat-1.2.3 binary, built with go-1.7.1 in my freebsd box. When I am starting this binary in my freebsd boxes I am facing the error mentioned below. I am not facing this issue every time I start filebeat but, I could consistently reproduce this by continuous stop and start filebeat.
fatal error: concurrent map read and map write
goroutine 23 [running]:
runtime.throw(0x86ef00, 0x21)
/root/go/src/runtime/panic.go:566 +0x95 fp=0xc42043b868 sp=0xc42043b848
runtime.mapaccess2_faststr(0x7e9680, 0xc4202bd6e0, 0xc42036b9e0, 0x12, 0x3, 0x300000002)
/root/go/src/runtime/hashmap_fast.go:306 +0x52b fp=0xc42043b8c8 sp=0xc42043b868
github.com/elastic/beats/filebeat/crawler.(*Registrar).getState(0xc420384600, 0xc42036b9e0, 0x12, 0x0, 0x0)
/root/src/github.com/elastic/beats/filebeat/crawler/registrar.go:231 +0xa0 fp=0xc42043b910 sp=0xc42043b8c8
github.com/elastic/beats/filebeat/crawler.(*Registrar).GetFileState(0xc420384600, 0xc42036b9e0, 0x12, 0x20, 0x20)
/root/src/github.com/elastic/beats/filebeat/crawler/registrar.go:140 +0x3f fp=0xc42043b948 sp=0xc42043b910
github.com/elastic/beats/filebeat/crawler.(*Registrar).fetchState(0xc420384600, 0xc42036b9e0, 0x12, 0xa43380, 0xc420291130, 0x1, 0x1)
/root/src/github.com/elastic/beats/filebeat/crawler/registrar.go:170 +0x5a fp=0xc42043ba28 sp=0xc42043b948
github.com/elastic/beats/filebeat/crawler.(*Prospector).scan(0xc4200d4e00, 0xc42036b9e0, 0x12, 0xc42039d260)
/root/src/github.com/elastic/beats/filebeat/crawler/prospector.go:304 +0x7fc fp=0xc42043be18 sp=0xc42043ba28
github.com/elastic/beats/filebeat/crawler.(*Prospector).logRun(0xc4200d4e00, 0xc42039d260)
/root/src/github.com/elastic/beats/filebeat/crawler/prospector.go:178 +0x277 fp=0xc42043bf38 sp=0xc42043be18
github.com/elastic/beats/filebeat/crawler.(*Prospector).Run(0xc4200d4e00, 0xc42039d260)
/root/src/github.com/elastic/beats/filebeat/crawler/prospector.go:149 +0x1bc fp=0xc42043bf90 sp=0xc42043bf38
runtime.goexit()
/root/go/src/runtime/asm_amd64.s:2086 +0x1 fp=0xc42043bf98 sp=0xc42043bf90
created by github.com/elastic/beats/filebeat/crawler.(*Crawler).Start
/root/src/github.com/elastic/beats/filebeat/crawler/crawler.go:52 +0x272