revid: crashing when attempting config update triggered by var sum change

Issue #155 resolved
Saxon Milton created an issue

The changes in PR #257 have somehow exposed a bug. It causes a crash (sometimes) when we try to reconfigure revid. It seems that revid.Close() is called twice, and somehow, the revid.isRunning flag is not yet false on the second call (probably a race condition here). As a result, the senders are closed twice, causing a close on an already closed channel in the currently selected sender, resulting in a panic. It’s suspected that the issue lies in the fact that revid.Start or revid.Stop should not be called concurrently, but, we have our handleErrors routine that may actually call revid.Start or revid.Stop while revid.Start or revid.Stop is being called elsewhere, namely the revid-cli main routine.

Comments (1)

  1. Log in to comment