Open BaldBeacon opened 4 years ago
This is actually leaps and bounds better than what used to happen, where CFE startup would proceed and attempt to use uninitialized variables resulting in a crash/lockup. That's not to say it still couldn't be better.
There is a related issue about this in nasa/cFE#358, regarding making the "out of the box" config enable the permissive modes so as to not require root.
Note that the is an OS_DEBUG message regarding the failure of setschedparam, but this also isn't displayed unless OS_DEBUG_PRINTF is defined, so one would not see this either.
One possibility might be to move this issue over to nasa/PSP where some additional printf's can be performed, suggesting common failure resolutions here (i.e. either run as root or ensure permissive mode is turned on).
When running the CFS without elevated privileges, the output that indicates an os failure doesn't express errors with scheduler policy. The current output under these conditions is:
The origin of this issue comes from https://github.com/nasa/osal/blob/155e9ebcd6d1930890231a44237e6883d229d22c/src/os/posix/osapi.c#L692
A failure to set the schedule policy should probably have a special error message indicating both why it failed and the recommended course of action.