-
Notifications
You must be signed in to change notification settings - Fork 213
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
Add user-space message queue library to the OSAL (GSFC DCR 22160) #73
Comments
Imported from trac issue 50. Created by sstrege on 2015-05-14T18:58:30, last modified: 2019-08-14T14:11:46 |
Trac comment by sstrege on 2015-05-14 19:08:17: Solution is dependent on Trac Ticket #28. In the current OSAL model one would have to write a separate implementation for each of VxWorks, RTEMS, and POSIX, yet this feature is fully self-contained and not OS-dependent so all 3 would be identical. Once #28 is merged in this can be done once in a shared area - much cleaner. |
Looks like mqueue does have "priority" but we aren't really using it...and we have no control over its logic. Writing our own queues would allow us full control. |
Note that in addition to WSL this also helps with BSD variants and derivatives (Mac OS, FreeBSD, etc) which don't seem to offer POSIX mqueues. This change would have a pretty high value in improving the cross platform applicability of OSAL by removing the dependency on posix queues. |
Note that FPrime has a userspace queue for OSX support; it's written in C++ (of course) but I'm wondering if we could unify our codebase for queues. https://github.com/nasa/fprime/blob/master/Os/MacOs/IPCQueueStub.cpp |
If I understand this correctly, a reimplementation of message queues as proposed would also facilitate using cFS in docker containers without root on the host (which is a common restriction on NASA machines). Right now, I can't run cFS inside docker because |
@ivanperez-keera - if you can set msg_max higher than your maximum requested queue depth on the host then you'll avoid the issue, or if you can live with the limit of 10 there's the For development in dockers from a desktop/laptop host I typically just use permissive mode. For performance testing or similar where it really matters I either run it on a more representative system (or emulator of) or get an admin to increase the msg_max setting such that I can use deeper queues. Either way avoids the need for root on host. User space queues would avoid the issue though, which would be nice. |
On the host, |
@skliper That seems to be set to true by default when using When I grep for Here's my dockerfile: nasa/cFS#718 (comment) |
@ivanperez-keera - I increase msg_max on my docker w/ a parameter to docker run |
In some environments, I can't
|
@skliper Nevertheless, you said " if you can live with the limit of 10 there's the OSAL_CONFIG_DEBUG_PERMISSIVE_MODE:". However, when I tried that, I couldn't make it work. See: #73 (comment) How do I set |
Permissive is set here in the example setup when If you can't set permissive mode, in theory you could override software bus queue depths to all be <= 10. I'm not sure they are configurable in every app though. As a quick fix/test (if osal/src/bsp/generic-linux/src/bsp_start.c Lines 66 to 78 in 0291622
osal/src/os/posix/src/os-impl-queues.c Lines 59 to 69 in 0291622
|
Oh... I wonder if the method for getting |
I don't know why that would be. See my docker image: I'm using the standard cFS. Does that image work for you at all without root? |
It's because in your docker |
That was it. Commenting the I wonder 1) if root can go beyond |
For completeness if someone has the same I problem I did, this is my current dockerfile: FROM i386/debian:bullseye
# Apt should not ask questions during configuration
ENV DEBIAN_FRONTEND=noninteractive
# Update packages available
RUN apt-get update
# cFS dependencies
RUN apt-get install -y cmake build-essential gcc-multilib g++-multilib
# Generic dependencies needed
RUN apt-get install -y git
# Get copy of cFS
RUN git clone --recursive https://github.com/nasa/cFS
WORKDIR cFS
RUN git submodule init
RUN git submodule update
RUN cp cfe/cmake/Makefile.sample Makefile
RUN cp -r cfe/cmake/sample_defs sample_defs
# We have to either modify the following file to remove a check based on the
# user ID, or compile and install everything as a different user.
RUN sed -ie '66s/\<if\>/\/\/ if/g' osal/src/bsp/generic-linux/src/bsp_start.c
RUN make SIMULATION=native prep
RUN make
RUN make install
WORKDIR build/exe/cpu1/
CMD ./core-cpu1 |
The GSFC ATLAS project developed an alternate queue library to use with POSIX to overcome a performance limitation with the Linux Posix message queues.
Incorporate this enhancement (or similar enhancement) into the OSAL for POSIX, RTEMS, and VxWorks.
The text was updated successfully, but these errors were encountered: