Skip to content
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

Possible collisions between lua reading a channel by name and API creating a channel by name #1091

Open
brentpicasso opened this issue Sep 8, 2020 · 1 comment
Labels
Milestone

Comments

@brentpicasso
Copy link
Contributor

With lua reading a channel by name and a different task creating a new channel (e.g. via API and timing/scoring) - a collision may occur and firmware crash if the list of channels changes (via API) when lua is attempting to get a channel by name.

We probably need to add a mutex to protect reading and creating virtual channels.

@brentpicasso brentpicasso added this to the 2.18.1 milestone Sep 8, 2020
@brentpicasso
Copy link
Contributor Author

It seems that a mutex (lock) could be created in sampleRecord.c, protecting access to init_sample_buffer or (higher up the call stack) and get_channel_value_by_name. This will prevent issues of the sample record being changed while it is being scanned for the current channel value.

@brentpicasso brentpicasso modified the milestones: 2.18.2, Front-burner May 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant