Fix major problems introduced by commit 1162165 - #2489
Conversation
... when Squid is built with select() or poll() I/O loops, and on systems with limited resources.
kinkie
left a comment
There was a problem hiding this comment.
we can use the type system.
The change has been build tested
Co-authored-by: Francesco Chemolli <5175948+kinkie@users.noreply.github.com>
This PR is implementing: Line 823 in dd5ea20
Squid
This is actually guaranteed to occur for at least a period during Squid startup (from Lines 1433 to 1434 in dd5ea20 Lines 1337 to 1339 in dd5ea20 FD_SETSIZE being something smaller than the arbitrary 100*1024 constant.
|
... GCC produces compile warnings about signed differences between int and rlim_t.
AFAICT, all of the above references point to problems that existed before commit 1162165. In other words, those problems were not "introduced by commit 1162165" as claimed in the PR title. The corresponding XXXs just documented reality that existed before that commit and continued to exist after that commit. The discussion-relevant changes introduced by commit 1162165 can be summarized by this diff (which replaces - Squid_MaxFD = 1073741816;
+ Squid_MaxFD = 102400;Both values may be wrong in some cases (hence, XXXs), but the new/smaller value is certainly not worse than the old one in those problematic cases. Even if you disagree with the above analysis, the current PR title/description does not disclose what "major problems" this PR is fixing. None of those XXXs can be easily identified as "major problems" IMO, and it is not clear that the current PR title is actually referring to those XXXs in the first place! This PR direction was explicitly rejected during commit 1162165 (i.e. PR #2483) work as detailed in unofficial commit ce8c540 message. That fact does not imply that this direction is necessarily wrong -- different PRs have different scopes and evil comparison functions -- but I believe the original reasons for rejecting this direction are valid, and nothing in this PR convinces me that a different decision should be made now, in this PR. I am pretty sure that, after the backlog issue is dealt with, the correct path forward starts with agreeing on what |
Before that commit, the limit was either After the commit, the limit gets increased to The After the commit, IFF the new behaviour was only reducing
That is an idealists view. Even the official GNU "Hello World" C source code has a history of changes, and currently has an open issue to be resolved. This PR is fixing some issues while we wait for that infinitely far away Milestone to occur.
Nice idea, but that is architectural design discussion. This PR scope is just fixing the existing design/behaviour to not be actively buggy before the code settles into a v7 release. |
... when Squid is built with select() or poll() I/O loops, and
on systems with limited resources.