cloudtools / ssh-cert-authority

An implementation of an SSH certificate authority.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fatal error: concurrent map writes

jesferman opened this issue · comments

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

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.

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.

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

Thanks for your work!