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.
| @@ -773,8 +773,8 @@ setMaxFD(void) | |||
| } else if (Config.max_filedescriptors > 0) { | |||
| #if USE_SELECT | |||
There was a problem hiding this comment.
FWIW, Now that this condition is using SQUID_MAXFD_LIMIT with a sane value - we can probably drop the USE_SELECT wrapper (and modify the debugs text) - which will in turn allow removal of the checkLimits variable.
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 |
... when Squid is built with select() or poll() I/O loops, and
on systems with limited resources.