Fixed: Duplicati.Library.IO.dll; error SIGSEGV after Sendmail in mono 4.6.2

my summary is:
don’t user mono 4.6.2. It got it working with mono 5.18.0.240.

Best
Jens

Hi Forum,
I am tracking down the inability to send backup reports. I looked through the web and identified to reproduce the errors with duplicati-cli.

My environment is a 2.0.5.1_beta_2020-01-18 on Mono JIT compiler version Stable 4.6.2.16/ac9e222. The hardware is Alpine AL212 from ANNAPURNALABS in a Synology DS416 running DSM 6.2.2-24922 Update 4. The Linux kernel reports Linux 3.10.105 #24922 SMP Tue Jul 9 18:27:24 CST 2019 armv7l GNU/Linux synology_alpine4k_ds416

The problem occured in the GUI and I could not solve it by switching Duplicati versions. It can be triggerd by:

mono Duplicati.CommandLine.exe --console-log-level=ExplicitOnly send-mail  <normal parameters>   --send-mail-url=smtps://mail.gmx.net:587/?starttls=when-available 
Failed to load assembly /volume1/@appstore/Duplicati/Duplicati.Library.IO.dll, error message: The classes in the module cannot be loaded. => The classes in the module cannot be loaded.
Failed to load assembly /volume1/@appstore/Duplicati/Duplicati.Library.IO.dll, error message: The classes in the module cannot be loaded. => The classes in the module cannot be loaded.
Failed to load assembly /volume1/@appstore/Duplicati/Duplicati.Library.IO.dll, error message: The classes in the module cannot be loaded. => The classes in the module cannot be loaded.
gpg
Failed to load assembly /volume1/@appstore/Duplicati/Duplicati.Library.IO.dll, error message: The classes in the module cannot be loaded. => The classes in the module cannot be loaded.
The option log-level is deprecated: Use the log-file-log-level and console-log-level options instead
The operation SendMail has started
Starting - Running SendMail
Running SendMail took 0:00:00:00.019

Stacktrace:

  at <unknown> <0xffffffff>
  at System.Collections.Generic.Dictionary`2<string, int>.Insert (string,int,bool) <0x00063>
  at System.Collections.Generic.Dictionary`2<string, int>.Add (string,int) <0x00027>
  at MimeKit.Utils.CharsetUtils.AddAliases (System.Collections.Generic.Dictionary`2<string, int>,int,int,string[]) <0x00077>
  at MimeKit.Utils.CharsetUtils..cctor () <0x001ef>
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <0x0006f>
  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) object.__icall_wrapper_mono_generic_class_init (intptr) <0x0003b>
  at MimeKit.ParserOptions..ctor () <0x0008f>
  at MimeKit.ParserOptions..cctor () <0x00063>
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <0x0006f>
  at <unknown> <0xffffffff>
  at Duplicati.Library.Modules.Builtin.SendMail.SendMessage (string,string) <0x00117>
  at Duplicati.Library.Modules.Builtin.ReportHelper.OnFinish (object) <0x0058b>
  at Duplicati.Library.Main.Controller.OnOperationComplete (object) <0x00237>
  at Duplicati.Library.Main.Controller.RunAction<T_REF> (T_REF,string[]&,Duplicati.Library.Utility.IFilter&,System.Action`1<T_REF>) <0x0054f>
  at Duplicati.Library.Main.Controller.RunAction<T_REF> (T_REF,System.Action`1<T_REF>) <0x0007f>
  at Duplicati.Library.Main.Controller.SendMail () <0x0046b>
  at Duplicati.CommandLine.Commands.SendMail (System.IO.TextWriter,System.Action`1<Duplicati.Library.Main.Controller>,System.Collections.Generic.List`1<string>,System.Collections.Generic.Dictionary`2<string, string>,Duplicati.Library.Utility.IFilter) <0x000f3>
  at (wrapper delegate-invoke) System.Func`6<System.IO.TextWriter, System.Action`1<Duplicati.Library.Main.Controller>, System.Collections.Generic.List`1<string>, System.Collections.Generic.Dictionary`2<string, string>, Duplicati.Library.Utility.IFilter, int>.invoke_TResult_T1_T2_T3_T4_T5 (System.IO.TextWriter,System.Action`1<Duplicati.Library.Main.Controller>,System.Collections.Generic.List`1<string>,System.Collections.Generic.Dictionary`2<string, string>,Duplicati.Library.Utility.IFilter) <0x000ef>
  at Duplicati.CommandLine.Program.ParseCommandLine (System.IO.TextWriter,System.Action`1<Duplicati.Library.Main.Controller>,bool&,string[]) <0x008a7>
  at Duplicati.CommandLine.Program.RunCommandLine (System.IO.TextWriter,System.IO.TextWriter,System.Action`1<Duplicati.Library.Main.Controller>,string[]) <0x00057>
  at Duplicati.CommandLine.Program.RealMain (string[]) <0x00107>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <0x000ef>
  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) <0x00047>
  at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x000ab>
  at System.Reflection.MethodBase.Invoke (object,object[]) <0x00047>
  at Duplicati.Library.AutoUpdater.UpdaterManager.RunMethod (System.Reflection.MethodInfo,string[]) <0x0005f>
  at Duplicati.Library.AutoUpdater.UpdaterManager/<>c__DisplayClass58_0.<RunFromMostRecentSpawn>b__0 () <0x00017>
  at Duplicati.Library.AutoUpdater.UpdaterManager.WrapWithUpdater (Duplicati.Library.AutoUpdater.AutoUpdateStrategy,System.Action) <0x002df>
  at Duplicati.Library.AutoUpdater.UpdaterManager.RunFromMostRecentSpawn (System.Reflection.MethodInfo,string[],Duplicati.Library.AutoUpdater.AutoUpdateStrategy) <0x0010b>
  at Duplicati.Library.AutoUpdater.UpdaterManager.RunFromMostRecent (System.Reflection.MethodInfo,string[],Duplicati.Library.AutoUpdater.AutoUpdateStrategy) <0x00053>
  at Duplicati.CommandLine.Program.Main (string[]) <0x00033>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <0x000ef>

Native stacktrace:


Debug info from gdb:


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

The suited search string would be “Duplicati.Library.IO.dll error”, but I did not find information on this.
The backups run fine, but reporting fails for the above reason.

I will be very thankful for any further suggestions.

Best
Jens

I’ve downgraded to Duplicati 4.6.2.
There no lib warnings occur, but the stacktrace looks similar to me.

ash-4.3#  mono Duplicati.CommandLine.exe --log-level=ExplicitOnly send-mail  -send-mail=<blabla>
gpg
The option log-level is deprecated: Use the log-file-log-level and console-log-level options instead
The operation SendMail has started
Starting - Running SendMail
Running SendMail took 0:00:00:00.019
Stacktrace:

  at <unknown> <0xffffffff>
  at System.Collections.Generic.Dictionary`2<string, int>.Insert (string,int,bool) <0x00063>
  at System.Collections.Generic.Dictionary`2<string, int>.Add (string,int) <0x00027>
  at MimeKit.Utils.CharsetUtils.AddAliases (System.Collections.Generic.Dictionary`2<string, int>,int,int,string[]) <0x00077>
  at MimeKit.Utils.CharsetUtils..cctor () <0x001ef>
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <0x0006f>
  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) object.__icall_wrapper_mono_generic_class_init (intptr) <0x0003b>
  at MimeKit.ParserOptions..ctor () <0x0008f>
  at MimeKit.ParserOptions..cctor () <0x00063>
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <0x0006f>
  at <unknown> <0xffffffff>
  at Duplicati.Library.Modules.Builtin.SendMail.SendMessage (string,string) <0x00117>
  at Duplicati.Library.Modules.Builtin.ReportHelper.OnFinish (object) <0x0058b>
  at Duplicati.Library.Main.Controller.OnOperationComplete (object) <0x00237>
  at Duplicati.Library.Main.Controller.RunAction<T_REF> (T_REF,string[]&,Duplicati.Library.Utility.IFilter&,System.Action`1<T_REF>) <0x0054f>
  at Duplicati.Library.Main.Controller.RunAction<T_REF> (T_REF,System.Action`1<T_REF>) <0x0007f>
  at Duplicati.Library.Main.Controller.SendMail () <0x0046b>
  at Duplicati.CommandLine.Commands.SendMail (System.IO.TextWriter,System.Action`1<Duplicati.Library.Main.Controller>,System.Collections.Generic.List`1<string>,System.Collections.Generic.Dictionary`2<string, string>,Duplicati.Library.Utility.IFilter) <0x000f3>
  at (wrapper delegate-invoke) System.Func`6<System.IO.TextWriter, System.Action`1<Duplicati.Library.Main.Controller>, System.Collections.Generic.List`1<string>, System.Collections.Generic.Dictionary`2<string, string>, Duplicati.Library.Utility.IFilter, int>.invoke_TResult_T1_T2_T3_T4_T5 (System.IO.TextWriter,System.Action`1<Duplicati.Library.Main.Controller>,System.Collections.Generic.List`1<string>,System.Collections.Generic.Dictionary`2<string, string>,Duplicati.Library.Utility.IFilter) <0x000ef>
  at Duplicati.CommandLine.Program.ParseCommandLine (System.IO.TextWriter,System.Action`1<Duplicati.Library.Main.Controller>,bool&,string[]) <0x008a7>
  at Duplicati.CommandLine.Program.RunCommandLine (System.IO.TextWriter,System.IO.TextWriter,System.Action`1<Duplicati.Library.Main.Controller>,string[]) <0x00057>
  at Duplicati.CommandLine.Program.RealMain (string[]) <0x00107>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <0x000ef>
  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) <0x00047>
  at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x000ab>
  at System.Reflection.MethodBase.Invoke (object,object[]) <0x00047>
  at Duplicati.Library.AutoUpdater.UpdaterManager.RunMethod (System.Reflection.MethodInfo,string[]) <0x0005f>
  at Duplicati.Library.AutoUpdater.UpdaterManager/<>c__DisplayClass58_0.<RunFromMostRecentSpawn>b__0 () <0x00017>
  at Duplicati.Library.AutoUpdater.UpdaterManager.WrapWithUpdater (Duplicati.Library.AutoUpdater.AutoUpdateStrategy,System.Action) <0x002df>
  at Duplicati.Library.AutoUpdater.UpdaterManager.RunFromMostRecentSpawn (System.Reflection.MethodInfo,string[],Duplicati.Library.AutoUpdater.AutoUpdateStrategy) <0x0010b>
  at Duplicati.Library.AutoUpdater.UpdaterManager.RunFromMostRecent (System.Reflection.MethodInfo,string[],Duplicati.Library.AutoUpdater.AutoUpdateStrategy) <0x00053>
  at Duplicati.CommandLine.Program.Main (string[]) <0x00033>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <0x000ef>

Native stacktrace:


Debug info from gdb:


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

my next try is to find another mono release. The previous originates from the synology beta repository.

Best
Jens

Fixed it by updating to current mono 5.18.0.240 from https://synocommunity.com/package/mono; unfortunately the package does not set paths right. But aport from that it seems to be working.

There is another aspect that the certificate checking does not work out in this combination.

ash-4.3#  /volume1/@appstore/mono/bin/mono Duplicati.CommandLine.exe --log-level=ExplicitOnly send-mail  --send-mail=<blabla> --accept-specified-ssl-hash=ACEE29FF71E97EEBD0527A1A58912EC26CF56C36 
Failed to load assembly /volume1/@appstore/Duplicati/Duplicati.Library.IO.dll, error message: Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown.
Could not load type of field 'Duplicati.Library.Common.IO.VssBackupComponents:_vssBackupComponents' (1) due to: Could not load file or assembly 'AlphaVSS.Common, Version=1.4.0.0, Culture=neutral, PublicKeyToken=959d3993561034e3' or one of its dependencies. => Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown.
Could not load type of field 'Duplicati.Library.Common.IO.VssBackupComponents:_vssBackupComponents' (1) due to: Could not load file or assembly 'AlphaVSS.Common, Version=1.4.0.0, Culture=neutral, PublicKeyToken=959d3993561034e3' or one of its dependencies.
Failed to load assembly /volume1/@appstore/Duplicati/Duplicati.Library.IO.dll, error message: Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown.
Could not load type of field 'Duplicati.Library.Common.IO.VssBackupComponents:_vssBackupComponents' (1) due to: Could not load file or assembly 'AlphaVSS.Common, Version=1.4.0.0, Culture=neutral, PublicKeyToken=959d3993561034e3' or one of its dependencies. => Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown.
Could not load type of field 'Duplicati.Library.Common.IO.VssBackupComponents:_vssBackupComponents' (1) due to: Could not load file or assembly 'AlphaVSS.Common, Version=1.4.0.0, Culture=neutral, PublicKeyToken=959d3993561034e3' or one of its dependencies.
Failed to load assembly /volume1/@appstore/Duplicati/Duplicati.Library.IO.dll, error message: Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown.
Could not load type of field 'Duplicati.Library.Common.IO.VssBackupComponents:_vssBackupComponents' (1) due to: Could not load file or assembly 'AlphaVSS.Common, Version=1.4.0.0, Culture=neutral, PublicKeyToken=959d3993561034e3' or one of its dependencies. => Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown.
Could not load type of field 'Duplicati.Library.Common.IO.VssBackupComponents:_vssBackupComponents' (1) due to: Could not load file or assembly 'AlphaVSS.Common, Version=1.4.0.0, Culture=neutral, PublicKeyToken=959d3993561034e3' or one of its dependencies.
gpg
Failed to load assembly /volume1/@appstore/Duplicati/Duplicati.Library.IO.dll, error message: Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown.
Could not load type of field 'Duplicati.Library.Common.IO.VssBackupComponents:_vssBackupComponents' (1) due to: Could not load file or assembly 'AlphaVSS.Common, Version=1.4.0.0, Culture=neutral, PublicKeyToken=959d3993561034e3' or one of its dependencies. => Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown.
Could not load type of field 'Duplicati.Library.Common.IO.VssBackupComponents:_vssBackupComponents' (1) due to: Could not load file or assembly 'AlphaVSS.Common, Version=1.4.0.0, Culture=neutral, PublicKeyToken=959d3993561034e3' or one of its dependencies.
The option log-level is deprecated: Use the log-file-log-level and console-log-level options instead
The option --accept-specified-ssl-hash is not supported because the module Configure http requests (http-options) is not currently loaded
The operation SendMail has started
Starting - Running SendMail
Running SendMail took 0:00:00:00.020
Whole SMTP communication: Connected to smtp://mail.gmx.net:587/?starttls=always
S: 220 gmx.com (mrgmx004) Nemesis ESMTP Service ready

S: 221 gmx.com Service closing transmission channel

Email sent successfully using server: smtp://mail.gmx.net:587/?starttls=always
Email sent successfully using server: smtp://mail.gmx.net:587/?starttls=always

Thanks for posting your solution. Definitely true that mono 5.x or newer is required for Duplicati 2.0.5.1 and later.

1 Like