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

Crash when attempting to index an open read/only file #1124

Open
CrimzonCoder opened this issue May 3, 2024 · 1 comment
Open

Crash when attempting to index an open read/only file #1124

CrimzonCoder opened this issue May 3, 2024 · 1 comment

Comments

@CrimzonCoder
Copy link

VERSION INFORMATION

Server Version: 4.2.2.0

Desktop Version: N/A

LOG FILE

13:45:01| ImportFolderWatcher: /import/ --- File /import/AnimeFile.mkv is Read-Only. Attempting to unmark
... (x 100+)
13:45:01| ImportFolderWatcher: /import/ --- File/import/AnimeFile.mkv is Read-Only. Attempting to unmark
13:45:01| ImportFolderWatcher: /import/ --- File /import/AnimeFile.mkv is Read-Only. Attempting to unmark
at Shoko.Server.Utilities.FileSystemWatcher.RecoveringFileSystemWatcher.CanAccessFile(System.String, System.Exception ByRef)
at Shoko.Server.Utilities.FileSystemWatcher.RecoveringFileSystemWatcher.CanAccessFile(System.String, System.Exception ByRef)
.... (x 100+)
at Shoko.Server.Utilities.FileSystemWatcher.RecoveringFileSystemWatcher.CanAccessFile(System.String, System.Exception ByRef)
at Shoko.Server.Utilities.FileSystemWatcher.RecoveringFileSystemWatcher.CanAccessFile(System.String, System.Exception ByRef)
at Shoko.Server.Utilities.FileSystemWatcher.RecoveringFileSystemWatcher.IsLocked(System.String)
at Shoko.Server.Utilities.FileSystemWatcher.RecoveringFileSystemWatcher.b__25_0(System.Object)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(System.Threading.Thread, System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef, System.Threading.Thread)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool+WorkerThread.WorkerThreadStart()
Aborted

DESCRIPTION

File may be non-readable as well as it is likely being copied into place when the server tries to process it. Later, when I notice the server has crashed, the file actually is readable so I suspect it is an open /inaccessible file issue.

Regardless, server should probably give up rather than overflowing the stack.

STEPS TO REPRODUCE

Attempt to import an inaccesible file from the import directory into the library.

@da3dsoul
Copy link
Member

da3dsoul commented May 3, 2024

It's supposed to give up and not crash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants