mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-16 05:43:54 +03:00
[PR #15695] [CLOSED] Fix stack overflow during scan #14391
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jellyfin/jellyfin/pull/15695
Author: @myzhysz
Created: 12/2/2025
Status: ❌ Closed
Base:
master← Head:fix-15000📝 Commits (1)
207783fFix Stack Overflow #15000📊 Changes
1 file changed (+6 additions, -27 deletions)
View changed files
📝
MediaBrowser.Controller/LibraryTaskScheduler/LimitedConcurrencyLibraryScheduler.cs(+6 -27)📄 Description
In function Enqueue, if we enter the "we are in a nested loop" block, the logic try get a item from _tasks, making function Enqueue not process the file in subfolder, but start from a new folder which increase Call Stack. This make the length of Call Stack is not depends on the depth of filesystem, but the count of subfolders. Therefore, if there are lots of subfolders, the Call Stack will exceed a certain limit and cause Stack Overflow.
Changes
When _deadlockDetector.Value is not null, using existed ForceSequentialOperation.
Issues
Fixes #15000
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.