cloudtools / ssh-cert-authority

An implementation of an SSH certificate authority.
BSD 2-Clause "Simplified" License
728 stars 71 forks source link

fatal error: concurrent map writes #33

Closed jesferman closed 6 years ago

jesferman commented 6 years ago

Hi,

I use the application running as a daemon always available, but sometimes when requesting a certificate it crashes and leave the trace I attach to this issue. Let me now if you need more information.

Thanks.

trace.txt

bobveznat commented 6 years ago

A quick update: I've started working on this. I have a patch to move us to Go's new concurrent map, the unittests are passing but I need to test it a bit more.

Based on the code this was a lot more likely to happen than it should have been. There were simply a lot of map reads all over the place for every request so I can imagine that even with very mild concurrency we'd trigger this.

bobveznat commented 6 years ago

I finally fixed this. The concurrent map ended up being a huge change vs. just using an actual lock. So I used an actual lock.

jesferman commented 6 years ago

Nice, I will give it a try. Are you going to release a new version shortly?

Thanks for your work!