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

Fix #184, work around throttle sem creation race #342

Merged
merged 1 commit into from
Dec 1, 2022

Conversation

jphickey
Copy link
Contributor

Checklist (Please check before submitting)

Describe the contribution
Adds a retry loop around OS_CountSemGetIdByName, because if this sem is created by another app there may be some delay until the other app gets to the point where it creates the sem. This works around the race condition.

A retry limit is also imposed so CF will not spin here forever.

Fixes #184

Testing performed
Build and run tests, check file transfers with BP

Expected behavior changes
Should start up more reliably

System(s) tested on
Ubuntu 22.04

Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.

Adds a retry loop around OS_CountSemGetIdByName, because if this sem is
created by another app there may be some delay until the other app gets
to the point where it creates the sem.  This works around the race
condition.

A retry limit is also imposed so CF will not spin here forever.
@jphickey jphickey force-pushed the fix-184-throttle-sem-race branch from c2671e8 to 833fdbb Compare November 17, 2022 21:46
@jphickey jphickey added the CCB:Ready Ready for discussion at the Configuration Control Board (CCB) label Nov 25, 2022
@dzbaker dzbaker added CCB:Approved and removed CCB:Ready Ready for discussion at the Configuration Control Board (CCB) labels Dec 1, 2022
@dzbaker dzbaker merged commit 2ffbecc into nasa:main Dec 1, 2022
@dmknutsen dmknutsen added this to the Draco milestone Jan 18, 2023
@jphickey jphickey deleted the fix-184-throttle-sem-race branch April 17, 2023 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possible race condition with creation of throttle sem (needs to exist before CF initializes)
3 participants