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

Directory permission exception with multiple concurrent users on linux #7172

Open
ErikApption opened this issue Jun 9, 2024 · 1 comment · May be fixed by #7173
Open

Directory permission exception with multiple concurrent users on linux #7172

ErikApption opened this issue Jun 9, 2024 · 1 comment · May be fixed by #7173
Labels
untriaged New issue has not been triaged

Comments

@ErikApption
Copy link

System Information (please complete the following information):

  • OS & Version: Linux Ubuntu 22.04.4 LTS
  • ML.NET Version: ML.NET 3.0.1
  • .NET Version: .NET 8.0

Describe the bug

When multiple users are running ML.NET on the same server. each process seems to require a temporary directory - however its name is hardcoded and the second user running ml.net will fail because /tmp/ml_dotnet is not accessible.

2024-06-08 20:00:31.5387|FATAL|Datahunter.Core.Helpers.MLHelper|Error initializing ML Model System.UnauthorizedAccessException: Access to the path '/tmp/ml_dotnet/hetgfm5v.kvn' is denied.
 ---> System.IO.IOException: Permission denied
   --- End of inner exception stack trace ---
   at System.IO.FileSystem.CreateDirectory(String fullPath, UnixFileMode unixCreateMode)
   at System.IO.Directory.CreateDirectory(String path)
   at Microsoft.ML.Repository.GetShortTempDir(IExceptionContext ectx)
   at Microsoft.ML.Repository..ctor(Boolean needDir, IExceptionContext ectx)
   at Microsoft.ML.RepositoryReader..ctor(Stream stream, IExceptionContext ectx, Boolean useFileSystem)
   at Microsoft.ML.RepositoryReader.Open(Stream stream, IExceptionContext ectx, Boolean useFileSystem)
   at Microsoft.ML.ModelOperationsCatalog.Load(Stream stream, DataViewSchema& inputSchema)

To Reproduce
Steps to reproduce the behavior:

  1. Launch one process with user one
  2. Launch same process with user two
  3. User two will get an IOException

Expected behavior
Temporary directory should be unique for each user

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged label Jun 9, 2024
@ErikApption
Copy link
Author

If anyone else is having this issue, you can configure TMPDIR as workaround

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
untriaged New issue has not been triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant