-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Limit size of equeue for sigio netsocket test #5474
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
For future, add a reason why we are setting this to 4 (previous number to current one). how was 4 selected? Any magic number has a reason, and could be stated in the code or rather in the commit message. LGTM |
/morph build |
Build : SUCCESSBuild number : 484 Triggering tests/morph test |
Test : SUCCESSBuild number : 304 |
Exporter Build : SUCCESSBuild number : 105 |
Stack overflow problem, was it? This code looks a bit scary to me - you're declaring threads and event queues on the stack. I'm kind of surprised that it shuts down the thread cleanly on exit from the test function. Forcible thread termination is a bit scary. Might I suggest having a static initialised-once event queue+thread? Which would be conveniently available thus:
That's an on-demand factory, so it would launch the thread and event queue on first call, and it would remain running between tests. |
@kjbracey-arm, maybe that can come as a later PR. I'd like to get this merged ASAP, because #5335 needs to get through to allow network testing to resume. |
@kjbracey-arm Are you happy with this proposal? It will be reworked to as you suggested in the separate PR.
@sarahmarshy Emphasize this type of requirement please, we should be aware of this dependency plus priority definition (the above comment only declares this as related to), will help to get priorities correctly. |
@0xc0170, what sort of emphasis are you looking for? We don't really have a system for naming priorities. |
@kjbracey-arm Beside issues which may arise because there is no stack unwinding when a thread is abruptly terminated; the current code may operate on already released memory. At the end of the scope, the event queue will be destroyed then the eventThread will be terminated; the kernel may schedule the eventThread between those two operations (this depends on the implementation details of the socket object). |
@geky We shall clarify dependencies (this patch is required for another one to progress, not just related). I failed to see the connection for the other PR. It could be just me but after reading the requirement on another PR comment, this became a clear. |
Description
This fixes netsocket failure on arch pro target by limiting the size of EventQueue instance.
Status
READY
Related to #5335
@geky