Disk I/O and SQLLite error

Finally got a chance to sit down and see that Sonarr hasn’t been running for a few days. Got it started, saw missed episodes on the calendar. Went to Wanted retrieved all missing. Went back to Calendar and IE said there was blocked content. Unblocked content and Sonarr broke. Just to verify, I tried with Chrome as well and received the same error.

{
  "message": "disk I/O error\r\ndisk I/O error",
  "description": "System.Data.SQLite.SQLiteException (0x80004005): disk I/O error\r\ndisk I/O error\r\n   at System.Data.SQLite.SQLite3.Prepare(SQLiteConnection cnn, String strSql, SQLiteStatement previous, UInt32 timeoutMS, String& strRemain)\r\n   at System.Data.SQLite.SQLiteCommand.BuildNextCommand()\r\n   at System.Data.SQLite.SQLiteCommand.GetStatement(Int32 index)\r\n   at System.Data.SQLite.SQLiteDataReader.NextResult()\r\n   at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave)\r\n   at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)\r\n   at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery(CommandBehavior behavior)\r\n   at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery()\r\n   at System.Data.SQLite.SQLiteConnection.Open()\r\n   at Marr.Data.DataMapper.OpenConnection() in m:\\BuildAgent\\work\\6c3239faf2b92630\\src\\Marr.Data\\DataMapper.cs:line 844\r\n   at Marr.Data.DataMapper.Query[T](String sql, ICollection`1 entityList, Boolean useAltName) in m:\\BuildAgent\\work\\6c3239faf2b92630\\src\\Marr.Data\\DataMapper.cs:line 566\r\n   at Marr.Data.QGen.QueryBuilder`1.ToList() in m:\\BuildAgent\\work\\6c3239faf2b92630\\src\\Marr.Data\\QGen\\QueryBuilder.cs:line 279\r\n   at Marr.Data.QGen.SortBuilder`1.ToList() in m:\\BuildAgent\\work\\6c3239faf2b92630\\src\\Marr.Data\\QGen\\SortBuilder.cs:line 176\r\n   at Marr.Data.QGen.SortBuilder`1.GetEnumerator() in m:\\BuildAgent\\work\\6c3239faf2b92630\\src\\Marr.Data\\QGen\\SortBuilder.cs:line 247\r\n   at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source)\r\n   at NzbDrone.Core.Authentication.UserRepository.FindUser(String username) in m:\\BuildAgent\\work\\6c3239faf2b92630\\src\\NzbDrone.Core\\Authentication\\UserRepository.cs:line 0\r\n   at NzbDrone.Core.Authentication.UserService.FindUser(String username, String password) in m:\\BuildAgent\\work\\6c3239faf2b92630\\src\\NzbDrone.Core\\Authentication\\UserService.cs:line 76\r\n   at NzbDrone.Api.Authentication.AuthenticationService.Validate(String username, String password) in m:\\BuildAgent\\work\\6c3239faf2b92630\\src\\NzbDrone.Api\\Authentication\\AuthenticationService.cs:line 43\r\n   at Nancy.Authentication.Basic.BasicAuthentication.RetrieveCredentials(NancyContext context, BasicAuthenticationConfiguration configuration)\r\n   at Nancy.Authentication.Basic.BasicAuthentication.<>c__DisplayClass1.<GetCredentialRetrievalHook>b__0(NancyContext context)\r\n   at Nancy.BeforePipeline.<>c__DisplayClass4.<Wrap>b__3(NancyContext ctx, CancellationToken ct)"
}

Killed Sonarr process through task manager. The only unusual occurrence was that IE reported blocked content on the Calendar.

On restart a message box pops saying the following before the process terminates

SQLiteException: disk I/O error
disk I/O error

This error occurs only with NzbDrone.exe. It does not occur when using NzbDrone.Console.exe

It looks like the database is corrupt, if you can zip it up and send it to me (a link to download in a PM) I can take a look.

As for it happening with NzbDrone.exe and not NzbDrone.Console.exe, that can’t happen as they both use the same code to access the database, just different ways they are started. Unless its a permissions issue and running under separate users shows/hides the issue, but the everyone group should have access.

Can’t, shouldn’t, was. I popped Console open on hopes the start up method was different and would load.

Just closed the Console instance and re-opened NzbDrone.exe. NzbDrone.exe started without a problem this time. If it was a malformed entry it seems it was able to self-correct. Swapping between blocked/unblocked content on IE did not cause a self-destruct this time either.

However, thinking on it, shortly after NzbDrone broke, the drive it was installed to was filled to capacity. I did some cleanup last night after the Console was running and grabbing missed episodes. Does Console use a different initial load process?

Fringe cases are fun (rage inducing). If it happens again I’ll grab a snapshot of the entire NzbDrone folder to send to you.

Only in the application/how it waits to exit, but a full disk could very well have caused the SQLiteException: disk I/O error, so I think it was coincidence that switching applications changed anything.

Yeah, I’ll agree it’s a bit of a long shot. I’ll give it a try later and see if I can force a reproduction of the I/O error and the console launch variance.

Dear god. I get nothing consistent with a full disk. Today Console had the SQLite exception.

NzbDrone.exe launched perfectly fine but entered an infinite load screen. Screenshots. Not particularly sure why the manifestation is varied but it does center around a full disk.