Sonarr on Linux now crashing after a few secs

Sonarr version (exact version): 2.0.0.4326
Mono version (if Sonarr is not running on Windows):4.6.0
OS: RHEL 6.8
((Debug logs)):http://pastebin.com/M7gLU2db
(Make sure debug logging is enabled in settings and post the full log to hastebin/pastebin/dropbox/google drive or something similar, do not post them directly here)
Description of issue: Sonarr has been running happily for 6 months on this box, now its crashing within seconds, usually when and RSS Sync starts.

The paste is an error when I get when running from the $ prompt, I’ve turned on debug logging but is /home/Mike/.config/NzbDrone/logs/sonarr.txt the correct file? it only contains info items ending with “Starting NzbDrone API” before crashing again.

Currently its staying up for maybe 15 secs.

Thanks!

No, sonarr.debug.txt is.

Looks like the logging database is corrupt, deleting the log DB from /home/Mike/.config/NzbDrone should get it going again. If not it may be nzbdrone.db in the same folder that’s the issue, you’ll need to ((restore)) from a backup of the DB (which Sonarr takes automatically).

Running mono with the --debug switch would give us more information as to exactly what it was doing when it crashed.

Ah, thanks, - new paste of sonarr.debug.txt - http://pastebin.com/RWNNJeu3

It crashed after this

The origional error was running a raw command from the shell, there may have been some missing environment variables as it crashed immediately, rather than after ~15 secs

Nothing critical in the debug log there, it can’t resize images, but that won’t affect stability.

understood, and yet its dieing, every time, after this

((Trace logs)) might give a bit more details, but the standard output/error will probably be the best bet if crashing since logging might not happen if mono dies. Mono 4.6 is quite new, though other users don’t seem to be having issues.

(Thanks for the help btw) - I tried enabling trace logs, the log file still ends with:

16-10-5 11:20:53.6|Trace|HttpClient|Res: [GET] http://skyhook.sonarr.tv/v1/tvdb/shows/en/277928: 200.OK (416 ms)
16-10-5 11:20:53.6|Debug|MediaCoverService|Couldn’t resize media cover Banner-70 for [287314][Bloodline], using full size image instead.
16-10-5 11:20:53.6|Debug|GlobalExceptionHandlers|Minor Fail: The type initializer for ‘System.Drawing.GDIPlus’ threw an exception.

[v2.0.0.4326] System.TypeInitializationException: The type initializer for ‘System.Drawing.GDIPlus’ threw an exception. —> System.DllNotFoundException: libgdiplus.so.0
at (wrapper managed-to-native) System.Drawing.GDIPlus:GdiplusStartup (ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)
at System.Drawing.GDIPlus…cctor () [0x000cc] in <93576e487af246b9880ff86779ad60ff>:0
— End of inner exception stack trace —
at (wrapper managed-to-native) System.Object:__icall_wrapper_mono_generic_class_init (intptr)
at System.Drawing.Image.Dispose (System.Boolean disposing) [0x00000] in <93576e487af246b9880ff86779ad60ff>:0
at System.Drawing.Image.Finalize () [0x00000] in <93576e487af246b9880ff86779ad60ff>:0

Did this start happening when you upgraded to mono 4.6?
If the lack of libgdiplus.so.0 is causing the crash (even though it shouldn’t) installing the appropriate OS package to resolve that should fix it.

I’ve been looking at installing libgdiplus but its not trivial. I might just bite the bullet & dockerize.

If it’s the mono upgrade that caused it (though I don’t see why it would), downgrading might help, but docker is pretty painless.

I think it might’ve been the mono upgrade, this box does a yum update reasonably often.

Downgrading isn’t that easy as the mono repo only has 4.6.1 and 4.6.2, tried both same result. I may end up compiling mono from source but that’s a pain too with all the libs it needs.

Just as an update, I installed sonarr in a docker container (been meaning to do this for a while with all my VM’s) I used the linuxserver.io image, which in turn uses mono 4.2.1, everything seems to be working again.

Thanks for your help, and for sonarr, I’m a bit suspicious of mono 4.6.1/2, so maybe keep an eye out for others who may hit this.

1 Like

For whats its worth, I encountered the same issue on Centos 6.8 after the upgrade to mono 4.6

Installing libgdiplus from epel solved the issue for me so looks like it is the lack of that causing the crash

Same issue here with mono 4.6 on arch linux arm. My sonarr started crashing every few seconds as well after an update of 50+ packages, enabling trace yielded this same error.

[code]16-10-22 16:38:00.3|Debug|GlobalExceptionHandlers|Minor Fail: The type initializer for ‘System.Drawing.GDIPlus’ threw an exception.

[v2.0.0.4326] System.TypeInitializationException: The type initializer for ‘System.Drawing.GDIPlus’ threw an exception. —> System.DllNotFoundException: libgdiplus.so.0
at (wrapper managed-to-native) System.Drawing.GDIPlus:GdiplusStartup (ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)
at System.Drawing.GDIPlus…cctor () [0x000cc] in <360d2c78ba5a464c84ab987e916718c3>:0
— End of inner exception stack trace —
at (wrapper managed-to-native) System.Object:__icall_wrapper_mono_generic_class_init (intptr)
at System.Drawing.Image.Dispose (System.Boolean disposing) [0x00000] in <360d2c78ba5a464c84ab987e916718c3>:0
at System.Drawing.Image.Finalize () [0x00000] in <360d2c78ba5a464c84ab987e916718c3>:0[/code]

I do, in fact, have libgdiplus installed, and the file libgdiplus.so does exist.

# ls /usr/lib/libgdiplus.s* /usr/lib/libgdiplus.so /usr/lib/libgdiplus.so.0 /usr/lib/libgdiplus.so.0.0.0

I downgraded mono from 4.6.1.3 to 4.4.1.0 and it’s been running fine since. It’s only been about 20 minutes, but I’ve gone from crashing < 5 seconds after start to running this long. Will update if that doesn’t solve it, but there indeed does seem to be something wonky in mono 4.6.

Same issue so I installed the library using yum and it stayed up since. I didn’t have to downgrade Mono (running 4.6.0-2) and my centos 7 has all current patches.

yum install libgdiplus

We believe we have a fix for this is the latest develop build (2.0.0.4385) is now out in develop We’re hoping to get this out to the main release (master) ASAP, but want to confirm its working. If someone is already running develop or can test it out that would be great.

Has this been fixed now in the stable releases? I’m running 2.0.0.4427 with mono 4.6.0 and sonar crashes constantly whenever I do anything on the GUI.

Yes. That sounds unrelated if it’s only failing when using the UI.

Please open a new thread with the requested information.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.