-
Notifications
You must be signed in to change notification settings - Fork 215
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
Portable select() implementation needs to check filehandle "selectable" flag #453
Comments
jphickey
added a commit
to jphickey/osal
that referenced
this issue
May 14, 2020
Confirm that the "selectable" flag is set before calling the underlying select() API. Also update unit tests to match.
jphickey
added a commit
to jphickey/osal
that referenced
this issue
May 15, 2020
Confirm that the "selectable" flag is set before calling the underlying select() API. Also update unit tests to match.
jphickey
added a commit
to jphickey/osal
that referenced
this issue
May 15, 2020
Confirm that the "selectable" flag is set before calling the underlying select() API. Also update unit tests to match.
Closing this separate pull request because this fix is actually needed to make the unit tests pass in #461. The change is now part of that combined PR. |
Closed by mistake, meant to close the PR not the issue. |
jphickey
added a commit
to jphickey/osal
that referenced
this issue
May 15, 2020
Confirm that the "selectable" flag is set before calling the underlying select() API. Also update unit tests to match.
jphickey
pushed a commit
to jphickey/osal
that referenced
this issue
Aug 10, 2022
Fix nasa#259, Update tone leap variable
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Not all file handles support the
select()
API -- in particular on RTEMS it only works on sockets. The File implementation layer contains a boolean flagselectable
for every file handle to indicate whether the file descriptor can be select'ed upon.The implementation of this layer needs to confirm/check that the
selectable
flag is true before calling this API.To Reproduce
Run the new
select()
API unit tests on an RTEMS platform, which call this API on regular files. When it does so, this actually causes an exception and results in kernel panic/abort.Expected behavior
OSAL should return OS_ERR_NOT_IMPLEMENTED or otherwise avoid calling
select()
on filehandles which the kernel does not handle properly.System observed on:
RTEMS 4.11.3 via QEMU/pc686 BSP.
Additional context
Kernel panic result here is rather extreme -- one would have expected that the select() call would simply return error and set an errno as usual. This probably also signifies an underlying bug in RTEMS.
Reporter Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered: