-
Notifications
You must be signed in to change notification settings - Fork 619
MacOS: Avoid fatal ENAMETOOLONG on SMP startup #1783
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,7 +28,7 @@ | |
| static const auto & | ||
| MapLabel() | ||
| { | ||
| static const auto label = new SBuf("transients_map"); | ||
| static const auto label = new SBuf("transients"); | ||
| return *label; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I love the simplicity of the current solution, but it has several problems that are not visible in the PR diff. Some of them are significant. In aggregate, they call for a different solution IMO. I speculate that the current solution does not fully address the problem because Rock cache_dirs with reasonable names will exceed the same limit. Each cache_dir map name is derived from a cache_dir database filename. Those filenames will often be much longer than "cache_mem_map"! See Rock::SwapDir::inodeMapPath(). I speculate that the current solution does not fully address the problem for Squids started with The current solution introduces a new inconsistency: Some StoreMap objects still use a Removal of the Finally, due to code duplication, the current changes introduce an inconsistency with debugging in CollapsedForwarding::HandleNewData() that still uses I suggest a different approach. Here is a very rough sketch: 1: Undo current PR changes. We will keep the existing StoreMap labels intact. 2: Adjust Ipc::Mem::Segment::GenerateName() direct and indirect callers to supply two string parameters1 (e.g., humanId and machineId). The first string is the human-friendly segment name we currently use. No changes there. The second string will contain one or more dash-separated components: scope 3: Adjust Ipc::Mem::Segment::GenerateName() to take two string parameters (e.g., humandId and machineId), and to produce (on MacOS) segment names in the following format 4: Log (via level-2 or level-3 debugs()) the mapping between Ipc::Mem::Segment::GenerateName() humanId, machineId, and return value. 5: Use the human-friendly Footnotes
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can do it, but I have a couple of questions:
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Good question. We cannot use two fixed position characters because some existing use cases use three levels. Using three or more (as needed) positions may cover existing cases, but will limit the number of items per position to a subset of valid filename characters. Limiting the number of supported segments per level this way may be OK, but it would be more difficult for a human to interpret machine ID.
Using (a portion of) an md5 hash introduces collisions and destroys readability of "ls" output. It doesn't really buy us much either AFAICT.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Taking this up again. Thie process you suggest seems quite complicated and not even fully certain.
what do you think?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Where do you see the uncertainty?
To save time, I am not going to comment on the above assumption at this time.
I see only one real/true/essential difference between the two proposals:
The second proposal is simpler, but it cannot work correctly because it does not allow two users of the same segment X to agree on that segment X name. Using the same name is required for the two users to share that shared memory segment, of course. Please keep in mind that those users are in different kid processes and that the number of GenerateName() calls in a kid process varies with that kid role, current Squid configuration, and the number of Squid reconfigurations. There are other problems with the second proposal, but the problem described above is enough to reject it, so I am not going to detail the others. |
||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.