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

fix mongodb input concurrent map read/write #1211

Closed
wants to merge 1 commit into from

Conversation

kols
Copy link
Contributor

@kols kols commented May 17, 2016

fix a crash caused by concurrent map read/write

2016/05/17 17:22:59 Agent Config: Interval:10s, Debug:false, Quiet:false, Hostname:"redeye01", Flush Interval:10s 
fatal error: concurrent map read and map write
fatal error: concurrent map read and map write

goroutine 98 [running]:
runtime.throw(0x136a720, 0x21)
        /usr/local/go/src/runtime/panic.go:547 +0x90 fp=0xc8205d3ec8 sp=0xc8205d3eb0
runtime.mapaccess2_faststr(0xe74ec0, 0xc8201fe6c0, 0xc8200f83e1, 0x10, 0x0, 0x0)
        /usr/local/go/src/runtime/hashmap_fast.go:307 +0x5b fp=0xc8205d3f28 sp=0xc8205d3ec8
github.com/influxdata/telegraf/plugins/inputs/mongodb.(*MongoDB).Gather.func1(0xc8200e3620, 0xc8200e3630, 0xc82021ec80, 0xc820208880, 0x7fd0b2c55878, 0xc82021f2c0)
        /root/go/src/github.com/influxdata/telegraf/plugins/inputs/mongodb/mongodb.go:74 +0x93 fp=0xc8205d3f90 sp=0xc8205d3f28
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1998 +0x1 fp=0xc8205d3f98 sp=0xc8205d3f90
created by github.com/influxdata/telegraf/plugins/inputs/mongodb.(*MongoDB).Gather
        /root/go/src/github.com/influxdata/telegraf/plugins/inputs/mongodb/mongodb.go:75 +0x5c1

@sparrc
Copy link
Contributor

sparrc commented May 18, 2016

thx @kols

@sparrc sparrc closed this in 1dbe3b8 May 18, 2016
@kols kols deleted the fix-mongodb-input branch May 20, 2016 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants