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

Make sure writing to the onces map is done with the lock #10

Merged
merged 1 commit into from
Apr 11, 2016
Merged

Make sure writing to the onces map is done with the lock #10

merged 1 commit into from
Apr 11, 2016

Conversation

lpetre
Copy link
Contributor

@lpetre lpetre commented Apr 9, 2016

We've updated to go1.6 and the new concurrent map misuse code is firing here:

It looks like onces is being written without the mutex.

fatal error: concurrent map writes

goroutine 19369 [running]:
runtime.throw(0xf6d140, 0x15)
        /opt/lib/Go_1.6/src/runtime/panic.go:530 +0x90 fp=0xc821308710 sp=0xc8213086f8
runtime.mapassign1(0xbb8c60, 0xc82046b1a0, 0xc821308850, 0xc821308838)
        /opt/lib/Go_1.6/src/runtime/hashmap.go:445 +0xb1 fp=0xc8213087b8 sp=0xc821308710
github.com/chuckpreslar/emission.(*Emitter).Once(0xc82046b140, 0xbbcb60, 0xc8208a5330, 0xbd0760, 0xc8208a5320, 0xc820c608d0)
        /app/src/github.com/chuckpreslar/emission/emitter.go:140 +0x2b9 fp=0xc821308870 sp=0xc8213087b8

@chuckpreslar
Copy link
Owner

thanks for the heads up and patch, @lpetre!

@chuckpreslar chuckpreslar merged commit cbe5fe2 into chuckpreslar:master Apr 11, 2016
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.

None yet

2 participants