Errors after update to .2277

I’m getting these pop ups after updating this morning to .2277:

And here is a sample of the log:

14-11-21 09:08:08.2|Error|NzbDroneErrorPipeline|[GET /api/log]

System.Data.SQLite.SQLiteException: database disk image is malformed
database disk image is malformed
at System.Data.SQLite.SQLite3.Reset (System.Data.SQLite.SQLiteStatement) <0x00267>
at System.Data.SQLite.SQLite3.Step (System.Data.SQLite.SQLiteStatement) <0x0013e>
at System.Data.SQLite.SQLiteDataReader.NextResult () <0x0052f>
at System.Data.SQLite.SQLiteDataReader…ctor (System.Data.SQLite.SQLiteCommand,System.Data.CommandBehavior) <0x001ef>
at (wrapper remoting-invoke-with-check) System.Data.SQLite.SQLiteDataReader…ctor (System.Data.SQLite.SQLiteCommand,System.Data.CommandBehavior) <0x00047>
at System.Data.SQLite.SQLiteCommand.ExecuteReader (System.Data.CommandBehavior) <0x00043>
at System.Data.SQLite.SQLiteCommand.ExecuteScalar () <0x0002f>
at Marr.Data.DataMapper.ExecuteScalar (string) <0x0007b>
at Marr.Data.QGen.QueryBuilder1<NzbDrone.Core.Instrumentation.Log>.GetRowCount () <0x00123> at Marr.Data.QGen.SortBuilder1<NzbDrone.Core.Instrumentation.Log>.GetRowCount () <0x0001b>
at NzbDrone.Core.Datastore.BasicRepository1<NzbDrone.Core.Instrumentation.Log>.GetPaged (NzbDrone.Core.Datastore.PagingSpec1<NzbDrone.Core.Instrumentation.Log>) <0x0008e>
at NzbDrone.Core.Instrumentation.LogService.Paged (NzbDrone.Core.Datastore.PagingSpec1<NzbDrone.Core.Instrumentation.Log>) <0x0002b> at NzbDrone.Api.NzbDroneRestModule1<NzbDrone.Api.Logs.LogResource>.ApplyToPage<NzbDrone.Core.Instrumentation.Log> (System.Func2<NzbDrone.Core.Datastore.PagingSpec1<NzbDrone.Core.Instrumentation.Log>, NzbDrone.Core.Datastore.PagingSpec1<NzbDrone.Core.Instrumentation.Log>>,NzbDrone.Core.Datastore.PagingSpec1<NzbDrone.Core.Instrumentation.Log>) <0x00029>
at NzbDrone.Api.Logs.LogModule.GetLogs (NzbDrone.Api.PagingResource1<NzbDrone.Api.Logs.LogResource>) <0x0220b> at NzbDrone.Api.REST.RestModule1<NzbDrone.Api.Logs.LogResource>.<set_GetResourcePaged>b__d (object) <0x00036>
at (wrapper dynamic-method) object.CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,System.Func`2<object, object>,object) <0x000a0>
at Nancy.Routing.Route/<>c__DisplayClass4.b__3 (object,System.Threading.CancellationToken) <0x00137>

So it looks like my DB has issues. I tried restoring from the back up and it got worse - sonarr wouldn’t give me any gui to work with in my browser.

So I put the ‘bad’ db & config back and now I only get api/queue errors on pop up.

Thoughts?

EDIT: Lost my indexer & downloader settings. Grrrr . . .Possibly others, but haven’t gone thru yet to see.

EDIT2: I’ve also apparently lost all torrent options as well. Sigh . . .

That log snippet shows a problem with log.db, deleting that should be sufficient to get it back to working, or if there is something wrong with nzbdrone.db it should log errors when accessing it.

You can open up nzbdrone.db in a sqlite editor to see if those config settings are actually gone (they have their own tables), but I suspect the log.db issues are part of the problem.

I actually deleted log.db and it didn’t go away. :confused:

If I completely purge sonaar & then reinstall via apt-get on the devel version, & restore from back up, in theory, will all my series & settings come back?

I assume it was a different, but similar error?

Yup, as long as the backup isn’t damaged (which it shouldn’t be). Depending on the damage you might be able to recover the DB, but the backup is taken just before the upgrade, so it shouldn’t cause any loss if you roll back to it.

Well, this is turning into a massive headache.

I ripped out drone completely (backed up the AppData folder), built mono from here: http://www.lovesmesomecode.com/20130719-compiling-mono-3-in-ubuntu/

apt-get install nzbdrone (It looks like it grabs mono packages too?)

then run drone specifing the /usr/local/mono package and I get this:

[Info] Bootstrap: Starting NzbDrone - /opt/NzbDrone/NzbDrone.exe - Version 2.0.0.2278

  • Assertion at processes.c:2595, condition `mp’ not met

Stacktrace:

at <0xffffffff>
at (wrapper managed-to-native) System.Diagnostics.Process.ExitCode_internal (intptr) <0xffffffff>
at System.Diagnostics.Process.get_HasExited () <0x00033>
at (wrapper remoting-invoke-with-check) System.Diagnostics.Process.get_HasExited () <0xffffffff>
at NzbDrone.Common.Processes.ProcessProvider.ConvertToProcessInfo (System.Diagnostics.Process) <0x00163>
at NzbDrone.Common.Processes.ProcessProvider.GetCurrentProcess () <0x00013>
at NzbDrone.Common.Processes.PidFileProvider.Write () <0x00087>
at NzbDrone.Host.Bootstrap.Start (NzbDrone.Common.EnvironmentInfo.StartupContext,NzbDrone.Host.IUserAlert,System.Action`1<NzbDrone.Common.Composition.IContainer>) <0x0016a>
at NzbDrone.Console.ConsoleApp.Main (string[]) <0x0007b>
at (wrapper runtime-invoke) .runtime_invoke_void_object (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

    /usr/local/bin/mono() [0x4b3e38]
    /lib/x86_64-linux-gnu/libpthread.so.0(+0x10340) [0x7f730817a340]
    /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x39) [0x7f7307ddabb9]
    /lib/x86_64-linux-gnu/libc.so.6(abort+0x148) [0x7f7307dddfc8]
    /usr/local/bin/mono() [0x6294c9]
    /usr/local/bin/mono() [0x6296cf]
    /usr/local/bin/mono() [0x629816]
    /usr/local/bin/mono() [0x607cd5]
    /usr/local/bin/mono() [0x609263]
    /usr/local/bin/mono() [0x58054e]
    [0x41c372d5]

Debug info from gdb:

=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.

Aborted

Grumble grumble grumble

EDIT: This seems odd:

Mono JIT compiler version 3.12.1 (master/73bb10f Fri Nov 21 11:15:13 EST 2014)
Copyright © 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen
tymanthius@ty:~$ /usr/local/bin/mono -V
Mono JIT compiler version 3.12.1 (master/73bb10f Fri Nov 21 11:15:13 EST 2014)
Copyright © 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen
tymanthius@ty:~$

I could have sworn I was grabbing 3.6 . . .

We’re currently hosting mono 3.10 in our apt-get repo (we’ll be updating that to 3.12 since its now available, assuming its stable), so there should be no reason to compile it yourself now.

Following that guide you would clone down the latest code from master, which is now 3.12, not 3.6 (like it was when it was written).

https://github.com/Sonarr/Sonarr/wiki/Installation#debianubuntu - remove any old nzbdrone repo, add the new one listed on the wiki and update/install, it should pull in the latest version, switch “master” to “develop” to use the develop branch instead.

Back up. Thanks for the help. I’m having one of those weeks where everything is broken. This, car’s brakes, heater, main tv at home, and a stupid printer at work.

One success helps!

but then when I update to .2282 using the internal update mechanism, I lose settings again. grrrrrrr

EDIT: apt-remove nzbdrone followed by apt-get install nzbdrone, run once, then restore from back up fixed it,but I’m not on .2282

No worries. I’ll update w/ apt-get going forward and be fine I think. Sigh . . . .

Are you using upstart? Is respawn enabled?

.2282 is the latest master release, .2281 will be the latest develop release shortly, just waiting for a failing test to pass.

Upstart yes (but I’d killed the service until I got things fixed again)

When I go into Settings | General it says use development

When I check updates it shows 2277 being my current:

2.0.0.2282 - Nov 21 2014 Install
Fixed XBMC Metadata errors when no episode image was available

2.0.0.2277 - Nov 20 2014
Fixed Disabled error reporting

In apt-get sources list I have this:

deb http://apt.sonarr.tv/ develop main

the branch is develop not development if you use an invalid branch it will default back to master. Which is behind torrents, so that could cause settings to be missing.

Ah, ok. I have develop in apt-get

That did it.

BTW, I forgot that /opt/NzbDrone was owned by root, but that the drone process runs as a local user. So when I did an update from the gui, it managed to delete all the files in /opt/NzbDrone (didn’t check the sub-dirs).

I did apt-get install --re-install nzbdrone, then chmod’d the folder & all’s well and should be good going forward.