[Issue]: UFS/ISO files can fail to open #4120

Closed
opened 2026-02-07 00:26:50 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @michaelkrieger on GitHub (Aug 16, 2022).

Please describe your bug

I'm experiencing UDF/ISO files failing to open with "cannot access the file ... because it is in use by another process".
The file is not in use according to lsof and fuser. It is on a mergerfs mount.

Currently Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs opens the file with

File.Open(video.Path, FileMode.Open, FileAccess.Read))

It may be some locking issue with a prior open, but was thinking adding FileShare.Read to that may give it its non-exclusive open. Otherwise it may be open somewhere else in Jellyfin during a scan?

Jellyfin Version

10.8.0

if other:

No response

Environment

- OS: Debian 11
- Virtualization: Docker
- Clients: Web
- Browser: Chrome
- FFmpeg Version: Default
- Playback Method: N/A
- Hardware Acceleration: VAAPI
- Plugins:
- Reverse Proxy: Traefik 2.x
- Base URL:
- Networking:
- Storage:

Jellyfin logs

[2022-08-16 13:45:08.201 -04:00] [INF] [324] Emby.Server.Implementations.Library.LibraryManager: Validating media library
[2022-08-16 13:45:20.626 -04:00] [ERR] [287] Emby.Server.Implementations.Library.Resolvers.Movies.MovieResolver: Error opening UDF/ISO image: "/media/pool/Movies/XXXXX/XXXXX (2007) - XXXXX.ISO"
System.IO.IOException: The process cannot access the file '/media/pool/Movies/XXXXX (2007)/XXXXX (2007) - XXXXX.ISO' because it is being used by another process.
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Init(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at Emby.Server.Implementations.Library.Resolvers.BaseVideoResolver`1.SetIsoType(Video video)
[2022-08-16 13:45:23.541 -04:00] [ERR] [287] Emby.Server.Implementations.Library.Resolvers.Movies.MovieResolver: Error opening UDF/ISO image: "/media/pool/Movies/XXXXX (2001)/XXXXX (2001).iso"
System.IO.IOException: The process cannot access the file '/media/pool/Movies/XXXXX (2001)/XXXXX (2001).iso' because it is being used by another process.
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Init(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at Emby.Server.Implementations.Library.Resolvers.BaseVideoResolver`1.SetIsoType(Video video)


### FFmpeg logs

_No response_

### Please attach any browser or client logs here

_No response_

### Please attach any screenshots here

_No response_

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct
Originally created by @michaelkrieger on GitHub (Aug 16, 2022). ### Please describe your bug I'm experiencing UDF/ISO files failing to open with "cannot access the file ... because it is in use by another process". The file is not in use according to `lsof` and `fuser`. It is on a mergerfs mount. Currently `Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs` opens the file with ``` File.Open(video.Path, FileMode.Open, FileAccess.Read)) ``` It may be some locking issue with a prior open, but was thinking adding `FileShare.Read` to that may give it its non-exclusive open. Otherwise it may be open somewhere else in Jellyfin during a scan? ### Jellyfin Version 10.8.0 ### if other: _No response_ ### Environment ```markdown - OS: Debian 11 - Virtualization: Docker - Clients: Web - Browser: Chrome - FFmpeg Version: Default - Playback Method: N/A - Hardware Acceleration: VAAPI - Plugins: - Reverse Proxy: Traefik 2.x - Base URL: - Networking: - Storage: ``` ### Jellyfin logs ```shell [2022-08-16 13:45:08.201 -04:00] [INF] [324] Emby.Server.Implementations.Library.LibraryManager: Validating media library [2022-08-16 13:45:20.626 -04:00] [ERR] [287] Emby.Server.Implementations.Library.Resolvers.Movies.MovieResolver: Error opening UDF/ISO image: "/media/pool/Movies/XXXXX/XXXXX (2007) - XXXXX.ISO" System.IO.IOException: The process cannot access the file '/media/pool/Movies/XXXXX (2007)/XXXXX (2007) - XXXXX.ISO' because it is being used by another process. at Microsoft.Win32.SafeHandles.SafeFileHandle.Init(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at Emby.Server.Implementations.Library.Resolvers.BaseVideoResolver`1.SetIsoType(Video video) [2022-08-16 13:45:23.541 -04:00] [ERR] [287] Emby.Server.Implementations.Library.Resolvers.Movies.MovieResolver: Error opening UDF/ISO image: "/media/pool/Movies/XXXXX (2001)/XXXXX (2001).iso" System.IO.IOException: The process cannot access the file '/media/pool/Movies/XXXXX (2001)/XXXXX (2001).iso' because it is being used by another process. at Microsoft.Win32.SafeHandles.SafeFileHandle.Init(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at Emby.Server.Implementations.Library.Resolvers.BaseVideoResolver`1.SetIsoType(Video video) ``` ``` ### FFmpeg logs _No response_ ### Please attach any browser or client logs here _No response_ ### Please attach any screenshots here _No response_ ### Code of Conduct - [X] I agree to follow this project's Code of Conduct
OVERLORD added the bug label 2026-02-07 00:26:50 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#4120