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

Polling (maybe?) #10

Draft
wants to merge 3 commits into
base: devel
Choose a base branch
from
Draft

Polling (maybe?) #10

wants to merge 3 commits into from

Conversation

ericonr
Copy link
Member

@ericonr ericonr commented Sep 4, 2024

The last commit is optional and I'm still not sure it's necessary. I don't understand what's going on right now with the timeout not working after some time...

I have enabled all RFFE IOCs to try and reproduce the issue better...

sockfd was being passed to the printf calls in place of the thread ID.
While this version of NuttX does not yet have gettid(), its getpid()
actually implements the semantics of gettid(), and returns the thread
ID, so we can use it in the error messages.

Furthermore, the return value for recv() would always be -1, so printing
errno is what helps us in determining the error cause.
Having the workers themselves increment the worker count can lead the
main server function to start more servers than it should, if it runs
before the thread is able to increment the count.
@ericonr ericonr marked this pull request as draft September 4, 2024 22:23
We have observed empirically that the socket timeout doesn't always
work, due to some condition reached by the firmware. This is an attempt
at using a different codepath, which might be more reliable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant