Skip to content
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: mitigate Unix domain sockets path length issues #60

Merged
merged 2 commits into from
Dec 22, 2024

Conversation

bassosimone
Copy link
Member

@bassosimone bassosimone commented Dec 22, 2024

This diff comprehensively addresses and documents issues arising from failure to create Unix domain sockets with long names. This limitation is platform specific and could range from ~90 to ~108 characters, depending on the platform.

To address this limitation we:

  1. upgrade to rbmk-project/[email protected], which implements a new fsx.OverlayFS with a fsx.PrefixDirPathMapper and exposes a new fsx.NewRelativeToCwdPrefixDirPathMapper constructor using prefix paths relative to the current working directory.

  2. modify ./pkg/cli/sh to use these functionality when possible when creating new rbmk COMMAND internal commands and otherwise fallback to the previous behaviour.

  3. document this issue for rbmk pipe --help, rbmk pipe read --help, rbmk pipe write --help, rbmk sh --help.

  4. extend rbmk timestamp to add the --full flag so to create unique directory names with nanosecond precision.

  5. document that scripts SHOULD use short relative paths, also taking advantage of rbmk timestamp --full when using named pipes and then they should move the directory once the measurement is done.

This diff comprehensively addresses and documents issues arising
from failure to create Unix domain sockets with long names.

This limitation is platform specific and could range from ~90
to ~108 characters, depending on the platform.

To address this limitation we:

1. upgrade to rbmk-project/[email protected], which implements a new
fsx.OverlayFS with a fsx.PrefixDirPathMapper and exposes a
new fsx.NewRelativeToCwdPrefixDirPathMapper constructor using prefix
paths relative to the current working directory.

2. modify `./pkg/cli/sh` to use these functionality when possible
when creating new `rbmk COMMAND` internal commands and otherwise
fallback to the previous behaviour.

3. document this issue for `rbmk pipe --help`, `rbmk pipe read --help`,
`rbmk pipe write --help`, `rbmk sh --help`.

4. extend `rbmk timestamp` to add the `--full` flag so to create
unique directory names with nanosecond precision.

5. document that scripts SHOULD use short relative paths, also taking
advantage of `rbmk timestamp --full` when using named pipes and then
they should move the directory once the measurement is done.
@bassosimone bassosimone merged commit f65fc8d into main Dec 22, 2024
1 check passed
@bassosimone bassosimone deleted the fix/unixsockets branch December 22, 2024 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant