-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
MacOS 104 path length limit. Invalid length for use with domain sockets on this platform. The length must be between 1 and 104 #79503
Comments
Tagging subscribers to this area: @dotnet/area-system-io Issue DetailsDescriptionOn MacOS (13.0.1, Apple Silicon) with dotnet 6.0.403 and 6.0.400 I got the below issue with paths being restricted to 104 characters. But I am also using The rest of the socket pipe, coming from using I do believe something might be wrong on MacOS with 104 character limit and might be better to check it out.
Reproduction StepsCreate a named pipe from a socket within the directory Expected behaviorShould not error for 104 character limit on MacOS. Actual behaviorErrors for 104 character limit on MacOS. Regression?No response Known WorkaroundsNo response ConfigurationNo response Other informationNo response
|
https://man.openbsd.org/unix.4 "UNIX-domain addresses are variable-length filesystem pathnames of at most 104 characters." We don't hardcode the length. It comes directly from the os:
|
Surprising the limit is only 104 characters. I actually did not hit this limit on Ubuntu but hitting it on MacOS. |
On Linux the limit is typically 108 and the default temp path is usually much shorter. |
Thank you for the clarification @stephentoub |
Description
On MacOS (13.0.1, Apple Silicon) with dotnet 6.0.403 and 6.0.400 I got the below issue with paths being restricted to 104 characters.
I do think MacOS allows paths longer than 104, so I'm not sure where the 104 is coming.
I found this below code snippet that which I believe sets the 104 character limit but I could not run it on my dev environment.
Interop.Sys.GetDomainSocketSizes(out s_nativePathOffset, out s_nativePathLength, out s_nativeAddressSize);
But I am also using
Path.GetTempPath()
to get a work directory which produces a path like/var/folders/7b/tkffkjy54676nvv44rpvv1l40000gn/T/
, which is quite long already.The rest of the socket pipe, coming from using
ffmpeg
but I don't think related to it, creates a path ofCoreFxPipe_FFMpegCore_782288f0-1e42-4550-ab59-5a5161581e5b
and combination of these exceed 104 characters.I do believe something might be wrong on MacOS with 104 character limit and might be better to check it out.
Reproduction Steps
Create a named pipe from a socket within the directory
Path.GetTempPath()
.Expected behavior
Should not error for 104 character limit on MacOS.
Actual behavior
Errors for 104 character limit on MacOS.
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered: