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

Shoko server crashes daily #805

Open
miracle152005 opened this issue Sep 29, 2019 · 19 comments
Labels

Comments

@miracle152005
Copy link

@miracle152005 miracle152005 commented Sep 29, 2019

VERSION INFORMATION

Server Version: 3.9.5.43053 (Windows)

LOG FILE

[2019-09-29 08:14:56:094] Fatal|CriteriaImpl.List => SessionImpl.List => UnhandledExceptionManager.GenericExceptionHandler (Inner Exception)
Date and Time: 9/29/2019 8:14:26 AM
Machine Name: *******
IP Address: fe80::5869:bb1e:5471:c8f%4
Current User: *******

Application Domain: ShokoServer.exe
Assembly Codebase: file:///C:/Program Files (x86)/Shoko/Shoko Server/ShokoServer.exe
Assembly Full Name: ShokoServer, Version=3.9.5.43053, Culture=neutral, PublicKeyToken=null
Assembly Version: 3.9.5.43053
Assembly Build Date: 7/21/2019 11:55:06 PM

Exception Source: System.Data.SQLite
Exception Type: System.Data.SQLite.SQLiteException
Exception Message:
Exception Target Site: Prepare

---- Stack Trace ----
System.Data.SQLite.SQLite3.Prepare(cnn As SQLiteConnection, strSql As String, previous As SQLiteStatement, timeoutMS As UInt32, strRemain As String&)
ShokoServer.exe: N 01293
System.Data.SQLite.SQLiteCommand.BuildNextCommand()
ShokoServer.exe: N 00573
System.Data.SQLite.SQLiteDataReader.NextResult()
ShokoServer.exe: N 00148
System.Data.SQLite.SQLiteDataReader..ctor(cmd As SQLiteCommand, behave As CommandBehavior)
ShokoServer.exe: N 00317
System.Data.SQLite.SQLiteCommand.ExecuteReader(behavior As CommandBehavior)
ShokoServer.exe: N 00060
NHibernate.AdoNet.AbstractBatcher.ExecuteReader(cmd As IDbCommand)
ShokoServer.exe: N 00625
NHibernate.Loader.Loader.GetResultSet(st As IDbCommand, autoDiscoverTypes As Boolean, callable As Boolean, selection As RowSelection, session As ISessionImplementor)
ShokoServer.exe: N 00429
NHibernate.Loader.Loader.DoQuery(session As ISessionImplementor, queryParameters As QueryParameters, returnProxies As Boolean, forcedResultTransformer As IResultTransformer)
ShokoServer.exe: N 00346
NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(session As ISessionImplementor, queryParameters As QueryParameters, returnProxies As Boolean, forcedResultTransformer As IResultTransformer)
ShokoServer.exe: N 00228
NHibernate.Loader.Loader.DoList(session As ISessionImplementor, queryParameters As QueryParameters, forcedResultTransformer As IResultTransformer)
ShokoServer.exe: N 00169

(Outer Exception)
Date and Time: 9/29/2019 8:14:32 AM
Machine Name: *******
IP Address: fe80::5869:bb1e:5471:c8f%4
Current User: ******

Application Domain: ShokoServer.exe
Assembly Codebase: file:///C:/Program Files (x86)/Shoko/Shoko Server/ShokoServer.exe
Assembly Full Name: ShokoServer, Version=3.9.5.43053, Culture=neutral, PublicKeyToken=null
Assembly Version: 3.9.5.43053
Assembly Build Date: 7/21/2019 11:55:06 PM

Exception Source: NHibernate
Exception Type: NHibernate.Exceptions.GenericADOException
Exception Message:
Exception Target Site: DoList

---- Stack Trace ----
NHibernate.Loader.Loader.DoList(session As ISessionImplementor, queryParameters As QueryParameters, forcedResultTransformer As IResultTransformer)
ShokoServer.exe: N 00506
NHibernate.Loader.Loader.ListIgnoreQueryCache(session As ISessionImplementor, queryParameters As QueryParameters)
ShokoServer.exe: N 00026
NHibernate.Impl.SessionImpl.List(criteria As CriteriaImpl, results As IList)
ShokoServer.exe: N 00869
NHibernate.Impl.CriteriaImpl.List(results As IList)
ShokoServer.exe: N 00065
NHibernate.Impl.CriteriaImpl.UniqueResult()
ShokoServer.exe: N 00060
Shoko.Server.Repositories.Direct.CommandRequestRepository.GetQueuedCommandCountImages()
CommandRequestRepository.cs: line 0281, col 17, IL 0011
Shoko.Server.Commands.CommandProcessorImages.WorkerCommands_RunWorkerCompleted(sender As Object, e As RunWorkerCompletedEventArgs)
CommandProcessorImages.cs: line 0138, col 13, IL 0046
System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(e As RunWorkerCompletedEventArgs)
ShokoServer.exe: N 00155
System.Threading.ExecutionContext.RunInternal(executionContext As ExecutionContext, callback As ContextCallback, state As Object, preserveSyncCtx As Boolean)
ShokoServer.exe: N 00370
System.Threading.ExecutionContext.Run(executionContext As ExecutionContext, callback As ContextCallback, state As Object, preserveSyncCtx As Boolean)
ShokoServer.exe: N 00021
System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
ShokoServer.exe: N 00118
System.Threading.ThreadPoolWorkQueue.Dispatch()
ShokoServer.exe: N 00342

DESCRIPTION

Hi,
I recently updated to the latest version of Shoko server. And this version keeps crashing on a daily basis.
Could you please take a look.

Thanks.

STEPS TO REPRODUCE

I do not have any steps to reproduce.
It is running correctly for around 24h and then it just stops working.

Best regards miracle152005

@ElementalCrisis

This comment has been minimized.

Copy link
Member

@ElementalCrisis ElementalCrisis commented Sep 30, 2019

@miracle152005

This comment has been minimized.

Copy link
Author

@miracle152005 miracle152005 commented Oct 5, 2019

Hi,
I wanted to try the daily version but this version is not usable in my scenario.
Since all my Import Folders are network drives and the daily version seems to have trouble importing from them:

Here the logfiles from the daily version downloaded today:
System.Exception: Error Opening Local Filesystem
at Shoko.Server.Models.SVR_ImportFolder.get_FileSystem() in C:\projects\jmmserver\Shoko.Server\Models\SVR_ImportFolder.cs:line 108
at Shoko.Server.Commands.CommandRequest_HashFile.ProcessFile_LocalInfo() in C:\projects\jmmserver\Shoko.Server\Commands\Import\CommandRequest_HashFile.cs:line 145
at Shoko.Server.Commands.CommandRequest_HashFile.ProcessCommand() in C:\projects\jmmserver\Shoko.Server\Commands\Import\CommandRequest_HashFile.cs:line 63
[2019-10-05 22:08:57:107] Error|BackgroundWorker.OnDoWork => ShokoServer.WorkerImport_DoWork => Importer.RunImport_NewFiles System.Exception: Error Opening Local Filesystem
at Shoko.Server.Models.SVR_ImportFolder.get_FileSystem() in C:\projects\jmmserver\Shoko.Server\Models\SVR_ImportFolder.cs:line 108
at Shoko.Server.Models.SVR_ImportFolder.get_BaseDirectory() in C:\projects\jmmserver\Shoko.Server\Models\SVR_ImportFolder.cs:line 145
at Shoko.Server.Importer.RunImport_NewFiles() in C:\projects\jmmserver\Shoko.Server\Import\Importer.cs:line 370
[2019-10-05 22:08:57:107] Error|BackgroundWorker.OnDoWork => ShokoServer.WorkerImport_DoWork => Importer.RunImport_NewFiles System.Exception: Error Opening Local Filesystem
at Shoko.Server.Models.SVR_ImportFolder.get_FileSystem() in C:\projects\jmmserver\Shoko.Server\Models\SVR_ImportFolder.cs:line 108
at Shoko.Server.Models.SVR_ImportFolder.get_BaseDirectory() in C:\projects\jmmserver\Shoko.Server\Models\SVR_ImportFolder.cs:line 145
at Shoko.Server.Importer.RunImport_NewFiles() in C:\projects\jmmserver\Shoko.Server\Import\Importer.cs:line 370
[2019-10-05 22:08:57:107] Error|BackgroundWorker.OnDoWork => ShokoServer.WorkerImport_DoWork => Importer.RunImport_NewFiles System.Exception: Error Opening Local Filesystem
at Shoko.Server.Models.SVR_ImportFolder.get_FileSystem() in C:\projects\jmmserver\Shoko.Server\Models\SVR_ImportFolder.cs:line 108
at Shoko.Server.Models.SVR_ImportFolder.get_BaseDirectory() in C:\projects\jmmserver\Shoko.Server\Models\SVR_ImportFolder.cs:line 145
at Shoko.Server.Importer.RunImport_NewFiles() in C:\projects\jmmserver\Shoko.Server\Import\Importer.cs:line 370
[2019-10-05 22:08:57:107] Error|BackgroundWorker.OnDoWork => ShokoServer.WorkerImport_DoWork => Importer.RunImport_NewFiles System.Exception: Error Opening Local Filesystem
at Shoko.Server.Models.SVR_ImportFolder.get_FileSystem() in C:\projects\jmmserver\Shoko.Server\Models\SVR_ImportFolder.cs:line 108
at Shoko.Server.Models.SVR_ImportFolder.get_BaseDirectory() in C:\projects\jmmserver\Shoko.Server\Models\SVR_ImportFolder.cs:line 145
at Shoko.Server.Importer.RunImport_NewFiles() in C:\projects\jmmserver\Shoko.Server\Import\Importer.cs:line 370
[2019-10-05 22:08:57:107] Error|BackgroundWorker.OnDoWork => ShokoServer.WorkerImport_DoWork => Importer.RunImport_NewFiles System.Exception: Error Opening Local Filesystem
at Shoko.Server.Models.SVR_ImportFolder.get_FileSystem() in C:\projects\jmmserver\Shoko.Server\Models\SVR_ImportFolder.cs:line 108
at Shoko.Server.Models.SVR_ImportFolder.get_BaseDirectory() in C:\projects\jmmserver\Shoko.Server\Models\SVR_ImportFolder.cs:line 145
at Shoko.Server.Importer.RunImport_NewFiles() in C:\projects\jmmserver\Shoko.Server\Import\Importer.cs:line 370
[2019-10-05 22:08:57:107] Error|BackgroundWorker.OnDoWork => ShokoServer.WorkerImport_DoWork => Importer.RunImport_NewFiles System.Exception: Error Opening Local Filesystem
at Shoko.Server.Models.SVR_ImportFolder.get_FileSystem() in C:\projects\jmmserver\Shoko.Server\Models\SVR_ImportFolder.cs:line 108
at Shoko.Server.Models.SVR_ImportFolder.get_BaseDirectory() in C:\projects\jmmserver\Shoko.Server\Models\SVR_ImportFolder.cs:line 145
at Shoko.Server.Importer.RunImport_NewFiles() in C:\projects\jmmserver\Shoko.Server\Import\Importer.cs:line 370
[2019-10-05 22:08:57:107] Error|BackgroundWorker.OnDoWork => ShokoServer.WorkerImport_DoWork => Importer.RunImport_NewFiles System.Exception: Error Opening Local Filesystem
at Shoko.Server.Models.SVR_ImportFolder.get_FileSystem() in C:\projects\jmmserver\Shoko.Server\Models\SVR_ImportFolder.cs:line 108
at Shoko.Server.Models.SVR_ImportFolder.get_BaseDirectory() in C:\projects\jmmserver\Shoko.Server\Models\SVR_ImportFolder.cs:line 145
at Shoko.Server.Importer.RunImport_NewFiles() in C:\projects\jmmserver\Shoko.Server\Import\Importer.cs:line 370

@da3dsoul

This comment has been minimized.

Copy link
Member

@da3dsoul da3dsoul commented Oct 6, 2019

GetBaseDirectory is failing huh. Can you map those as drive letters and see if it helps?
In the meantime, I can look to see if there's anything I can do about the UNC issue. UNC is finicky because \\Comp\ could be a drive root or virtual. \\Comp\E could be a drive root or virtual. \\Comp\Drives\E could be. You get the point. This is important as the filesystem has checks for space and whatnot. Another option is to disable space checks and/or moving on UNC paths, but I prefer not to do it that way.

@miracle152005

This comment has been minimized.

Copy link
Author

@miracle152005 miracle152005 commented Oct 6, 2019

They are mapped as drive letters.
The Path are something like Z:\Subfolder

@da3dsoul

This comment has been minimized.

Copy link
Member

@da3dsoul da3dsoul commented Oct 6, 2019

Odd that it's having issues, then. For the sake of argument, you can access it as a user, right?

@miracle152005

This comment has been minimized.

Copy link
Author

@miracle152005 miracle152005 commented Oct 6, 2019

I can access it as a user and with elevated rights.
It works fine with the latest version (3.9.5.43053), but it does not work with the daily.

@da3dsoul

This comment has been minimized.

Copy link
Member

@da3dsoul da3dsoul commented Oct 6, 2019

Huh. Drop folders or no drop folders?

@miracle152005

This comment has been minimized.

Copy link
Author

@miracle152005 miracle152005 commented Oct 6, 2019

7 folders in total 2 drop sources, one drop target.
None of the folders are working.

@da3dsoul

This comment has been minimized.

Copy link
Member

@da3dsoul da3dsoul commented Oct 6, 2019

...okay that helps. I'll let you know

@da3dsoul

This comment has been minimized.

Copy link
Member

@da3dsoul da3dsoul commented Oct 6, 2019

There's literally no reason for that to fail. I don't know what to say. Likely an issue with the daily "installation". Grab new daily. Put it NOT in Downloads. Make sure the zip isn't blocked wherever you put it. Then extract and run it.
I have a hard time believing that it's a difference between the daily itself and stable, as nothing near the code that handles that has changed in a long time. It's got to be something else somewhere.

@da3dsoul

This comment has been minimized.

Copy link
Member

@da3dsoul da3dsoul commented Oct 6, 2019

If you follow that and it still occurs, can you upload the full log and not just the stack? You should just be able to drag and drop it into GitHub.

@miracle152005

This comment has been minimized.

Copy link
Author

@miracle152005 miracle152005 commented Oct 6, 2019

Compiling the source myself seems to have done the trick.
I will now test it and try to determine if it still crashes.

@miracle152005

This comment has been minimized.

Copy link
Author

@miracle152005 miracle152005 commented Oct 6, 2019

Build of the current master branch still crashes.
Attached you can find the full log.
2019-10-06.log

@da3dsoul

This comment has been minimized.

Copy link
Member

@da3dsoul da3dsoul commented Oct 7, 2019

Update and try again. It should give more info on startup if it doesn't work

@miracle152005

This comment has been minimized.

Copy link
Author

@miracle152005 miracle152005 commented Oct 17, 2019

I tried it again.
Here is the new log:
2019-10-17.log

@da3dsoul

This comment has been minimized.

Copy link
Member

@da3dsoul da3dsoul commented Oct 17, 2019

Try new Desktop, as well

@miracle152005

This comment has been minimized.

Copy link
Author

@miracle152005 miracle152005 commented Oct 17, 2019

I do not even have shoko desktop installed on the system the server is running on.
And I did not connect from another system with shoko desktop the last few days.
Should I use it on the same system as the server or just use the new version somewhere?

@da3dsoul

This comment has been minimized.

Copy link
Member

@da3dsoul da3dsoul commented Oct 17, 2019

My bad I mistook your issue for another one

@da3dsoul

This comment has been minimized.

Copy link
Member

@da3dsoul da3dsoul commented Oct 26, 2019

So I know why this happens. SQLite is trying to read and write multiple things at once in the command request table. I don't know how to fix it. WAL may help, but IDK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.