-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Fix/flaky split
round robin limited fds
#6043
Fix/flaky split
round robin limited fds
#6043
Conversation
split
round robin limited fds
GNU testsuite comparison:
|
1 similar comment
GNU testsuite comparison:
|
If I understand this all correctly, I think the correct thing to do is set the limits on the process not with |
66d406c
to
eed5f1c
Compare
update: I implemented the idea with |
ee9691b
to
a6b5699
Compare
GNU testsuite comparison:
|
a6b5699
to
e69caed
Compare
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.
The test fix looks great! Now I just wonder about the split
change. I can't think of a case where we'd have to close multiple fds to be able to open 1. Would this really make it more robust? Or has this to do with changing limits while running split
?
I think that's precisely the case. The limit drastically shrunk while executing (from unlimited to 9), so split had to close many fds before being able to operate again. I don't know whether that's a scenario that we want to support, but given that cree4ture already wrote the code, this would be an easy win. |
Sure, but I think we then need a comment explaining why it works the way it does. |
I think the split-side change is still usefull. Even though the test is also green without it. Why? I'm not sure wether the limits of a common parent process are actually "shared" as I was explaining it. Or if each child gets exactly half of it, or again the same amount of free fds as the parent? But at least according to https://unix.stackexchange.com/a/34335 the limits can also be set per user or group. So, when we agree that this features is usefull, we can either comment this, or try to explicitly test this. I'm just not yet sure how a deterministic test for this could look like. |
Alright, I'm convinced :) Could you add a comment about it? |
e69caed
to
2889119
Compare
done :-) |
2889119
to
db142f9
Compare
Addresses #6031
get_writer
into two partssleep 0.5 &&
to ensure that the limits are applied beforesplit
application starts.update: I implemented the idea with pre_exec from @tertsdiepraam as replacement for the
sleep 0.5
test-setup fix.the results of 15254 (1620) runs can be seen here: https://github.com/cre4ture/coreutils/actions/runs/8155517787/job/22291219367?pr=10
There was no single case where the original implementation of split failed.
I proved that both changes on its own fix the flakiness of the test by running all tests on 22 runners, each ~50times:
Evaluation:
the reference contained 12 out of 22 cases where the split test failed.
the other two tests didn't contain a single case each where this test was failing.
Test runs:
reference: https://github.com/cre4ture/coreutils/actions/runs/8123936859/job/22204882466?pr=9
split robustification: https://github.com/cre4ture/coreutils/actions/runs/8124460686/job/22205966825?pr=11
test robustification: https://github.com/cre4ture/coreutils/actions/runs/8124437301/job/22205913310?pr=10