Skip to content

Directory permission exception with multiple concurrent users on linux #7172

Closed

Description

@ErikApption

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

Activity

  1. ErikApption commented on Jun 19, 2024

    @ErikApption
    ContributorAuthor

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

  2. locked and limited conversation to collaborators on Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions