You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello we are currently using QuickFIXGo in a UAT environment as an acceptor and we have been seeing intermittent panics related to concurrent map accesses within acceptor.go. Unfortunately I don't have a copy of the stack trace to hand but what I suspect is happening is related to concurrent modifications of the maps within the Acceptor struct (sessions which is a map[SessionID]*session and sessionAddr which is a map[SessionID]net.Addr).
We have created a fork of the library in which we've added a sync.RWMutex to Acceptor and we are now protecting any reads or modifications to either the sessions or sessionAddr maps, and since making this change we have not seen any repeat of the problem.
Would this change be useful to submit as a pull request, or is there some reason why those map modifications weren't already being guarded by a mutex that we are missing? It's possible that the fact that we haven't seen repeat occurrences is not related to our changes, but would be happy to send it over as a pull request if you think it would be useful.
thanks
The text was updated successfully, but these errors were encountered:
thanks, yep we have a similar fix in our branch but would like to get this merged into the main line if possible so maybe I will open that PR to try and get that process started.
Hello we are currently using QuickFIXGo in a UAT environment as an acceptor and we have been seeing intermittent panics related to concurrent map accesses within acceptor.go. Unfortunately I don't have a copy of the stack trace to hand but what I suspect is happening is related to concurrent modifications of the maps within the
Acceptor
struct (sessions
which is amap[SessionID]*session
andsessionAddr
which is amap[SessionID]net.Addr
).Examples of the maps being read or modified inside a spawned goroutine I believe can be seen here: https://github.com/quickfixgo/quickfix/blob/master/acceptor.go#L291 or https://github.com/quickfixgo/quickfix/blob/master/acceptor.go#L307
We have created a fork of the library in which we've added a
sync.RWMutex
toAcceptor
and we are now protecting any reads or modifications to either thesessions
orsessionAddr
maps, and since making this change we have not seen any repeat of the problem.Would this change be useful to submit as a pull request, or is there some reason why those map modifications weren't already being guarded by a mutex that we are missing? It's possible that the fact that we haven't seen repeat occurrences is not related to our changes, but would be happy to send it over as a pull request if you think it would be useful.
thanks
The text was updated successfully, but these errors were encountered: