Server crashed while scanning library #6508

Closed
opened 2026-02-07 03:44:27 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @simon-kolkmann on GitHub (Nov 24, 2024).

This issue respects the following points:

  • This is a bug, not a question or a configuration issue; Please visit our forum or chat rooms first to troubleshoot with volunteers, before creating a report. The links can be found here.
  • This issue is not already reported on GitHub (I've searched it).
  • I'm using an up to date version of Jellyfin Server stable, unstable or master; We generally do not support previous older versions. If possible, please update to the latest version before opening an issue.
  • I agree to follow Jellyfin's Code of Conduct.
  • This report addresses only a single issue; If you encounter multiple issues, kindly create separate reports for each one.

Description of the bug

I was moving and renaming some files in my library while Jellyfin was scanning said library. Suddenly the server crashed completely.

Reproduction steps

  1. Run media library scan
  2. Move some files around
  3. ???
  4. Crash

What is the current bug behavior?

The library scan failed spectacularly with a fatal error that brought the server down.

What is the expected correct behavior?

Jellyfin should probably not crash completely - maybe the item could be skipped, maybe the library scan should be aborted. But the server should stay online.

Jellyfin Server version

10.10.0+

Specify commit id

No response

Specify unstable release number

No response

Specify version number

No response

Specify the build version

10.10.3

Environment

- OS: Linux
- Linux Kernel: 6.8.12-1
- Virtualization: I'm running the official docker image in kubernetes
- Clients:
- Browser:
- FFmpeg Version:
- Playback Method:
- Hardware Acceleration: 
- GPU Model: 
- Plugins:
- Reverse Proxy:
- Base URL:
- Networking:
- Storage: My media is mounted via NFS share

Jellyfin logs

A lot of entries like this:

[2024-11-23 22:19:48.796 +00:00] [INF] [26] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Starting "/usr/lib/jellyfin-ffmpeg/ffprobe" with args "-analyzeduration 200M -probesize 1G -i file:\"/media/series/foo/Season 4/barsub\" -threads 0 -v warning -print_format json -show_streams -show_format"

Then:

[2024-11-23 22:19:48.975 +00:00] [FTL] [8] Main: Unhandled Exception
System.NullReferenceException: Object reference not set to an instance of an object.
   at MediaBrowser.Controller.Entities.TV.Season.GetEpisodes(User user, DtoOptions options, Boolean shouldIncludeMissingEpisodes)
   at MediaBrowser.Controller.Entities.TV.Season.GetItemsInternal(InternalItemsQuery query)
   at MediaBrowser.Controller.Entities.Folder.FillUserDataDtoValues(UserItemDataDto dto, UserItemData userData, BaseItemDto itemDto, User user, DtoOptions fields)
   at Emby.Server.Implementations.Library.UserDataManager.GetUserDataDto(BaseItem item, User user)
   at Emby.Server.Implementations.EntryPoints.UserDataChangeNotifier.<>c__DisplayClass12_0.<GetUserDataChangeInfo>b__1(BaseItem i)
   at System.Linq.Enumerable.SelectEnumerableIterator`2.ToArray()
   at Emby.Server.Implementations.EntryPoints.UserDataChangeNotifier.GetUserDataChangeInfo(Guid userId, List`1 changedItems)
   at Emby.Server.Implementations.EntryPoints.UserDataChangeNotifier.<>c__DisplayClass11_0.<UpdateTimerCallback>b__0()
   at Emby.Server.Implementations.Session.SessionManager.SendMessageToUserSessions[T](List`1 userIds, SessionMessageType name, Func`1 dataFn, CancellationToken cancellationToken)
   at Emby.Server.Implementations.EntryPoints.UserDataChangeNotifier.UpdateTimerCallback(Object state)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()

The next log lines show the server starting up again.

FFmpeg logs


Client / Browser logs

No response

Relevant screenshots or videos

No response

Additional information

No response

Originally created by @simon-kolkmann on GitHub (Nov 24, 2024). ### This issue respects the following points: - [x] This is a **bug**, not a question or a configuration issue; Please visit our forum or chat rooms first to troubleshoot with volunteers, before creating a report. The links can be found [here](https://jellyfin.org/contact/). - [x] This issue is **not** already reported on [GitHub](https://github.com/jellyfin/jellyfin/issues?q=is%3Aopen+is%3Aissue) _(I've searched it)_. - [x] I'm using an up to date version of Jellyfin Server stable, unstable or master; We generally do not support previous older versions. If possible, please update to the latest version before opening an issue. - [x] I agree to follow Jellyfin's [Code of Conduct](https://jellyfin.org/docs/general/community-standards.html#code-of-conduct). - [x] This report addresses only a single issue; If you encounter multiple issues, kindly create separate reports for each one. ### Description of the bug I was moving and renaming some files in my library while Jellyfin was scanning said library. Suddenly the server crashed completely. ### Reproduction steps 1. Run media library scan 2. Move some files around 3. ??? 4. Crash ### What is the current _bug_ behavior? The library scan failed spectacularly with a fatal error that brought the server down. ### What is the expected _correct_ behavior? Jellyfin should probably not crash completely - maybe the item could be skipped, maybe the library scan should be aborted. But the server should stay online. ### Jellyfin Server version 10.10.0+ ### Specify commit id _No response_ ### Specify unstable release number _No response_ ### Specify version number _No response_ ### Specify the build version 10.10.3 ### Environment ```markdown - OS: Linux - Linux Kernel: 6.8.12-1 - Virtualization: I'm running the official docker image in kubernetes - Clients: - Browser: - FFmpeg Version: - Playback Method: - Hardware Acceleration: - GPU Model: - Plugins: - Reverse Proxy: - Base URL: - Networking: - Storage: My media is mounted via NFS share ``` ### Jellyfin logs ```shell A lot of entries like this: [2024-11-23 22:19:48.796 +00:00] [INF] [26] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Starting "/usr/lib/jellyfin-ffmpeg/ffprobe" with args "-analyzeduration 200M -probesize 1G -i file:\"/media/series/foo/Season 4/barsub\" -threads 0 -v warning -print_format json -show_streams -show_format" Then: [2024-11-23 22:19:48.975 +00:00] [FTL] [8] Main: Unhandled Exception System.NullReferenceException: Object reference not set to an instance of an object. at MediaBrowser.Controller.Entities.TV.Season.GetEpisodes(User user, DtoOptions options, Boolean shouldIncludeMissingEpisodes) at MediaBrowser.Controller.Entities.TV.Season.GetItemsInternal(InternalItemsQuery query) at MediaBrowser.Controller.Entities.Folder.FillUserDataDtoValues(UserItemDataDto dto, UserItemData userData, BaseItemDto itemDto, User user, DtoOptions fields) at Emby.Server.Implementations.Library.UserDataManager.GetUserDataDto(BaseItem item, User user) at Emby.Server.Implementations.EntryPoints.UserDataChangeNotifier.<>c__DisplayClass12_0.<GetUserDataChangeInfo>b__1(BaseItem i) at System.Linq.Enumerable.SelectEnumerableIterator`2.ToArray() at Emby.Server.Implementations.EntryPoints.UserDataChangeNotifier.GetUserDataChangeInfo(Guid userId, List`1 changedItems) at Emby.Server.Implementations.EntryPoints.UserDataChangeNotifier.<>c__DisplayClass11_0.<UpdateTimerCallback>b__0() at Emby.Server.Implementations.Session.SessionManager.SendMessageToUserSessions[T](List`1 userIds, SessionMessageType name, Func`1 dataFn, CancellationToken cancellationToken) at Emby.Server.Implementations.EntryPoints.UserDataChangeNotifier.UpdateTimerCallback(Object state) at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state) at System.Threading.QueueUserWorkItemCallback.Execute() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() The next log lines show the server starting up again. ``` ### FFmpeg logs ```shell ``` ### Client / Browser logs _No response_ ### Relevant screenshots or videos _No response_ ### Additional information _No response_
OVERLORD added the wontfix label 2026-02-07 03:44:27 +03:00
Author
Owner

@felix920506 commented on GitHub (Nov 24, 2024):

Please provide a complete list of plugins

@felix920506 commented on GitHub (Nov 24, 2024): Please provide a complete list of plugins
Author
Owner

@simon-kolkmann commented on GitHub (Nov 24, 2024):

Sure!

  • AudioDB, 10.10.3.0
  • MusicBrainz, 10.10.3.0
  • OMDb, 10.10.3.0
  • Playback Reporting, 15.0.0.0
  • Studio Images, 10.10.3.0
  • TMDb, 10.10.3.0
  • TheTVDB, 18.0.0.0 (<- I've installed this one recently)
@simon-kolkmann commented on GitHub (Nov 24, 2024): Sure! - AudioDB, 10.10.3.0 - MusicBrainz, 10.10.3.0 - OMDb, 10.10.3.0 - Playback Reporting, 15.0.0.0 - Studio Images, 10.10.3.0 - TMDb, 10.10.3.0 - TheTVDB, 18.0.0.0 (<- I've installed this one recently)
Author
Owner

@gnattu commented on GitHub (Nov 24, 2024):

It appears that you are moving files around while the scan is still in progress, which could lead to undefined behaviors, including server crashes. Unfortunately, we can’t do much about this since the files are expected to remain constant throughout the entire scan process. You can add more files (might not get indexed if you do and may require start a scan task again), but you can’t move or delete any files. If the files are in the “to be processed” list and then removed, the server will definitely panic.

@gnattu commented on GitHub (Nov 24, 2024): It appears that you are moving files around while the scan is still in progress, which could lead to undefined behaviors, including server crashes. Unfortunately, we can’t do much about this since the files are expected to remain constant throughout the entire scan process. You can add more files (might not get indexed if you do and may require start a scan task again), but you can’t move or delete any files. If the files are in the “to be processed” list and then removed, the server will definitely panic.
Author
Owner

@simon-kolkmann commented on GitHub (Nov 25, 2024):

If the files are in the “to be processed” list and then removed, the server will definitely panic.

I thought that maybe the server could rather catch this kind of error instead of panicking. But if this is expected behaviour, feel free to close this issue.

@simon-kolkmann commented on GitHub (Nov 25, 2024): > If the files are in the “to be processed” list and then removed, the server will definitely panic. I thought that maybe the server could rather catch this kind of error instead of panicking. But if this is expected behaviour, feel free to close this issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#6508