Failed: SQLite error cannot commit - no transaction is active

Hi,

The backup was run for the second time, but has not been successfully completed.
Source: 166,48 GB
Backup: 96,49 GB / 1 Version
Remote volume size: 250 MB

From Google GCP to One drive.

Failed: SQLite error cannot commit - no transaction is active Details: Mono.Data.Sqlite.SqliteException (0x80004005): SQLite error cannot commit - no transaction is active
 at Mono.Data.Sqlite.SQLite3.Reset (Mono.Data.Sqlite.SqliteStatement stmt) [0x00084] in <440c18e6376b4cdd8c5493c63fd9c672>:0 
 at Mono.Data.Sqlite.SQLite3.Step (Mono.Data.Sqlite.SqliteStatement stmt) [0x0003d] in <440c18e6376b4cdd8c5493c63fd9c672>:0 
 at Mono.Data.Sqlite.SqliteDataReader.NextResult () [0x00104] in <440c18e6376b4cdd8c5493c63fd9c672>:0 
 at Mono.Data.Sqlite.SqliteDataReader..ctor (Mono.Data.Sqlite.SqliteCommand cmd, System.Data.CommandBehavior behave) [0x0004e] in <440c18e6376b4cdd8c5493c63fd9c672>:0 
 at (wrapper remoting-invoke-with-check) Mono.Data.Sqlite.SqliteDataReader..ctor(Mono.Data.Sqlite.SqliteCommand,System.Data.CommandBehavior)
 at Mono.Data.Sqlite.SqliteCommand.ExecuteReader (System.Data.CommandBehavior behavior) [0x00006] in <440c18e6376b4cdd8c5493c63fd9c672>:0 
 at Mono.Data.Sqlite.SqliteCommand.ExecuteNonQuery () [0x00000] in <440c18e6376b4cdd8c5493c63fd9c672>:0 
 at Mono.Data.Sqlite.SqliteTransaction.Commit () [0x0002e] in <440c18e6376b4cdd8c5493c63fd9c672>:0 
 at Duplicati.Library.Main.Operation.Common.DatabaseCommon.Dispose (System.Boolean isDisposing) [0x0000f] in <67fc15b21e344070849a0f6dd9bbef24>:0 
 at Duplicati.Library.Main.Operation.Common.SingleRunner.Dispose () [0x00000] in <67fc15b21e344070849a0f6dd9bbef24>:0 
 at Duplicati.Library.Main.Operation.BackupHandler+<RunAsync>d__19.MoveNext () [0x01028] in <67fc15b21e344070849a0f6dd9bbef24>:0 -
-- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <54e9b3a3cde34f29acadf3f4c5afbe51>:0 
 at CoCoL.ChannelExtensions.WaitForTaskOrThrow (System.Threading.Tasks.Task task) [0x00050] in <6973ce2780de4b28aaa2c5ffc59993b1>:0 
 at Duplicati.Library.Main.Operation.BackupHandler.Run (System.String[] sources, Duplicati.Library.Utility.IFilter filter) [0x00008] in <67fc15b21e344070849a0f6dd9bbef24>:0 
 at Duplicati.Library.Main.Controller+<>c__DisplayClass13_0.<Backup>b__0 (Duplicati.Library.Main.BackupResults result) [0x00035] in <67fc15b21e344070849a0f6dd9bbef24>:0 
 at Duplicati.Library.Main.Controller.RunAction[T] (T result, System.String[]& paths, Duplicati.Library.Utility.IFilter& filter, System.Action`1[T] method) [0x0011d] in <67fc15b21e344070849a0f6dd9bbef24>:0 

Log data: 2019-01-17 02:13:21 -02 - [Error-Duplicati.Library.Main.Operation.BackupHandler-FatalError]: Fatal error Mono.Data.Sqlite.SqliteException (0x80004005): SQLite error cannot commit - no transaction is active
 at Mono.Data.Sqlite.SQLite3.Reset (Mono.Data.Sqlite.SqliteStatement stmt) [0x00084] in <440c18e6376b4cdd8c5493c63fd9c672>:0 
 at Mono.Data.Sqlite.SQLite3.Step (Mono.Data.Sqlite.SqliteStatement stmt) [0x0003d] in <440c18e6376b4cdd8c5493c63fd9c672>:0 
 at Mono.Data.Sqlite.SqliteDataReader.NextResult () [0x00104] in <440c18e6376b4cdd8c5493c63fd9c672>:0 
 at Mono.Data.Sqlite.SqliteDataReader..ctor (Mono.Data.Sqlite.SqliteCommand cmd, System.Data.CommandBehavior behave) [0x0004e] in <440c18e6376b4cdd8c5493c63fd9c672>:0 
 at (wrapper remoting-invoke-with-check) Mono.Data.Sqlite.SqliteDataReader..ctor(Mono.Data.Sqlite.SqliteCommand,System.Data.CommandBehavior)
 at Mono.Data.Sqlite.SqliteCommand.ExecuteReader (System.Data.CommandBehavior behavior) [0x00006] in <440c18e6376b4cdd8c5493c63fd9c672>:0 
 at Mono.Data.Sqlite.SqliteCommand.ExecuteNonQuery () [0x00000] in <440c18e6376b4cdd8c5493c63fd9c672>:0 at Mono.Data.Sqlite.SqliteTransaction.Commit () [0x0002e] in <440c18e6376b4cdd8c5493c63fd9c672>:0 
 at Duplicati.Library.Main.Operation.Common.DatabaseCommon.Dispose (System.Boolean isDisposing) [0x0000f] in <67fc15b21e344070849a0f6dd9bbef24>:0 
 at Duplicati.Library.Main.Operation.Common.SingleRunner.Dispose () [0x00000] in <67fc15b21e344070849a0f6dd9bbef24>:0 
 at Duplicati.Library.Main.Operation.BackupHandler+<RunAsync>d__19.MoveNext () [0x00fd7] in <67fc15b21e344070849a0f6dd9bbef24>:100:

Did this ever get resolved for you?

Both my 2.0.4.15 based Docker based jobs (two different destinations) started showing this “SQLite error cannot commit - no transaction is active” error today. :frowning:

Oh. And I edited your post to make the error easier to read.

Hi

I divided my files into groups. Before I was trying to backup the whole /home. Isn’t the best solution

Thanks for edited the post!

AggregateException: SQL logic error or missing database cannot commit - no transaction is active #3323 looks slightly similar to this one (but I have no detailed answer to either) in that a Commit was tried when it shouldn’t have been (i.e. no transaction was active). Dispose() tries to check first, but something is wrong.

Possibly there are longer stack traces available to show how this got to where it is (see first link example)?

Alternatively, setting up –log-file possibly even at the VERY wordy –log-file-log-level=Profiling could be tried, especially by @JonMikelV who seems to have this error in plural. If it’s sticky that’s a good chance to log.

Thanks for the tip @Bruno_M!

And for @ts678 I’ve included my detailed logs below, but “unfortunately” subsequent backups ran as usual. Yay? :slight_smile:

I guess the real question is whether the bug is a lost transaction, a potential double-commit scenario, or NOT having a transaction status check BEFORE attempting commit (silent but possibly deadly).

Note that the error is exactly the same for both destinations, though GUID? numbers differ from @Bruno_M’s error (likely different Duplicati version).

Box destination error
Mono.Data.Sqlite.SqliteException (0x80004005): SQLite error
cannot commit - no transaction is active
  at Mono.Data.Sqlite.SQLite3.Reset (Mono.Data.Sqlite.SqliteStatement stmt) [0x00084] in <a5a8127f47744e27b9a70502589d53dc>:0 
  at Mono.Data.Sqlite.SQLite3.Step (Mono.Data.Sqlite.SqliteStatement stmt) [0x0003d] in <a5a8127f47744e27b9a70502589d53dc>:0 
  at Mono.Data.Sqlite.SqliteDataReader.NextResult () [0x00104] in <a5a8127f47744e27b9a70502589d53dc>:0 
  at Mono.Data.Sqlite.SqliteDataReader..ctor (Mono.Data.Sqlite.SqliteCommand cmd, System.Data.CommandBehavior behave) [0x0004e] in <a5a8127f47744e27b9a70502589d53dc>:0 
  at (wrapper remoting-invoke-with-check) Mono.Data.Sqlite.SqliteDataReader..ctor(Mono.Data.Sqlite.SqliteCommand,System.Data.CommandBehavior)
  at Mono.Data.Sqlite.SqliteCommand.ExecuteReader (System.Data.CommandBehavior behavior) [0x00006] in <a5a8127f47744e27b9a70502589d53dc>:0 
  at Mono.Data.Sqlite.SqliteCommand.ExecuteNonQuery () [0x00000] in <a5a8127f47744e27b9a70502589d53dc>:0 
  at Mono.Data.Sqlite.SqliteTransaction.Commit () [0x0002e] in <a5a8127f47744e27b9a70502589d53dc>:0 
  at Duplicati.Library.Main.Operation.Common.DatabaseCommon.Dispose (System.Boolean isDisposing) [0x0000f] in <fbbeda0cad134e648d781c1357bdba9c>:0 
  at Duplicati.Library.Main.Operation.Common.SingleRunner.Dispose () [0x00000] in <fbbeda0cad134e648d781c1357bdba9c>:0 
  at Duplicati.Library.Main.Operation.BackupHandler+<RunAsync>d__19.MoveNext () [0x01017] in <fbbeda0cad134e648d781c1357bdba9c>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <a6f810169ec746eeb2789b925e2858c0>:0 
  at CoCoL.ChannelExtensions.WaitForTaskOrThrow (System.Threading.Tasks.Task task) [0x00050] in <6973ce2780de4b28aaa2c5ffc59993b1>:0 
  at Duplicati.Library.Main.Operation.BackupHandler.Run (System.String[] sources, Duplicati.Library.Utility.IFilter filter) [0x00008] in <fbbeda0cad134e648d781c1357bdba9c>:0 
  at Duplicati.Library.Main.Controller+<>c__DisplayClass13_0.<Backup>b__0 (Duplicati.Library.Main.BackupResults result) [0x00035] in <fbbeda0cad134e648d781c1357bdba9c>:0 
  at Duplicati.Library.Main.Controller.RunAction[T] (T result, System.String[]& paths, Duplicati.Library.Utility.IFilter& filter, System.Action`1[T] method) [0x00271] in <fbbeda0cad134e648d781c1357bdba9c>:0 
  at Duplicati.Library.Main.Controller.Backup (System.String[] inputsources, Duplicati.Library.Utility.IFilter filter) [0x00068] in <fbbeda0cad134e648d781c1357bdba9c>:0 
  at Duplicati.Server.Runner.Run (Duplicati.Server.Runner+IRunnerData data, System.Boolean fromQueue) [0x002f7] in <75bfd5a73aa341feaf69df24cfa473d4>:0 
Local destination error
Mono.Data.Sqlite.SqliteException (0x80004005): SQLite error
cannot commit - no transaction is active
  at Mono.Data.Sqlite.SQLite3.Reset (Mono.Data.Sqlite.SqliteStatement stmt) [0x00084] in <a5a8127f47744e27b9a70502589d53dc>:0 
  at Mono.Data.Sqlite.SQLite3.Step (Mono.Data.Sqlite.SqliteStatement stmt) [0x0003d] in <a5a8127f47744e27b9a70502589d53dc>:0 
  at Mono.Data.Sqlite.SqliteDataReader.NextResult () [0x00104] in <a5a8127f47744e27b9a70502589d53dc>:0 
  at Mono.Data.Sqlite.SqliteDataReader..ctor (Mono.Data.Sqlite.SqliteCommand cmd, System.Data.CommandBehavior behave) [0x0004e] in <a5a8127f47744e27b9a70502589d53dc>:0 
  at (wrapper remoting-invoke-with-check) Mono.Data.Sqlite.SqliteDataReader..ctor(Mono.Data.Sqlite.SqliteCommand,System.Data.CommandBehavior)
  at Mono.Data.Sqlite.SqliteCommand.ExecuteReader (System.Data.CommandBehavior behavior) [0x00006] in <a5a8127f47744e27b9a70502589d53dc>:0 
  at Mono.Data.Sqlite.SqliteCommand.ExecuteNonQuery () [0x00000] in <a5a8127f47744e27b9a70502589d53dc>:0 
  at Mono.Data.Sqlite.SqliteTransaction.Commit () [0x0002e] in <a5a8127f47744e27b9a70502589d53dc>:0 
  at Duplicati.Library.Main.Operation.Common.DatabaseCommon.Dispose (System.Boolean isDisposing) [0x0000f] in <fbbeda0cad134e648d781c1357bdba9c>:0 
  at Duplicati.Library.Main.Operation.Common.SingleRunner.Dispose () [0x00000] in <fbbeda0cad134e648d781c1357bdba9c>:0 
  at Duplicati.Library.Main.Operation.BackupHandler+<RunAsync>d__19.MoveNext () [0x01017] in <fbbeda0cad134e648d781c1357bdba9c>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <a6f810169ec746eeb2789b925e2858c0>:0 
  at CoCoL.ChannelExtensions.WaitForTaskOrThrow (System.Threading.Tasks.Task task) [0x00050] in <6973ce2780de4b28aaa2c5ffc59993b1>:0 
  at Duplicati.Library.Main.Operation.BackupHandler.Run (System.String[] sources, Duplicati.Library.Utility.IFilter filter) [0x00008] in <fbbeda0cad134e648d781c1357bdba9c>:0 
  at Duplicati.Library.Main.Controller+<>c__DisplayClass13_0.<Backup>b__0 (Duplicati.Library.Main.BackupResults result) [0x00035] in <fbbeda0cad134e648d781c1357bdba9c>:0 
  at Duplicati.Library.Main.Controller.RunAction[T] (T result, System.String[]& paths, Duplicati.Library.Utility.IFilter& filter, System.Action`1[T] method) [0x00271] in <fbbeda0cad134e648d781c1357bdba9c>:0 
  at Duplicati.Library.Main.Controller.Backup (System.String[] inputsources, Duplicati.Library.Utility.IFilter filter) [0x00068] in <fbbeda0cad134e648d781c1357bdba9c>:0 
  at Duplicati.Server.Runner.Run (Duplicati.Server.Runner+IRunnerData data, System.Boolean fromQueue) [0x002f7] in <75bfd5a73aa341feaf69df24cfa473d4>:0