-
Notifications
You must be signed in to change notification settings - Fork 93
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
fatal error: unexpected signal during runtime execution #29
Comments
At first glance I see that there is no synchronization around Audio.fanOut. You might want to run with the race detector enabled to see if there any other such issues. Also, are you sure Audio.Wait should call Audio.start? It seems like the stream ought to be started only once, and Wait should only sign up listeners. |
Right, that code was meant to be used like that, but reality came different. :) Right now this code around the notify logic is sonewhat overengineered due to history, but stable, as only one process / routine / method ever calls the audio.Wait method.
The audio reading could indeed run in the background, but I don‘t see the necessarity as I need the aufio informstion only once every few minutes, so I personally find it more efficient to start the stream when needed.
|
So, assuming that the |
Regardless, in the output you posted I see many goroutines in Audio.notifyWait (which is only reachable from Audio.Wait). There is concurrency going on there without synchronization. Either you need to use a mutex around Audio.fanOut or you need to make sure those Audio.readStream goroutines exit before you return from Audio.Wait. |
Hi,
I'm using this library to read an audio stream (of a click track) and determine when a click happens to start a playback of a light show. Unfortunately the program crashed every now and then, but not in a reproducible interval. The error thrown is the following - any idea what's going on there? :(
This is the code which reads the stream (
Initialize
andTerminate
are called once on programm start and exit), with the line throwing the error marked: https://github.com/StageAutoControl/controller/blob/master/pkg/cntl/waiter/audio.go#L37Looking forward to any helpful input - and thanks in advance!
Alex
EDIT: Cleaned up log for readability, removing systemd infos.
The text was updated successfully, but these errors were encountered: