The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/6565

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
This is a temptative fix for the:

lxd: sqlite3.c:66776: removeFromSharingList: Assertion `0' failed.

failure that we occasionally see in jenkins.

Signed-off-by: Free Ekanayaka <free.ekanay...@canonical.com>
From a1f8e184d76278f67939f0d076aabd840669649d Mon Sep 17 00:00:00 2001
From: Free Ekanayaka <free.ekanay...@canonical.com>
Date: Fri, 6 Dec 2019 08:51:28 +0000
Subject: [PATCH] Enable SQLITE_CONFIG_MULTITHREAD

This is a temptative fix for the:

lxd: sqlite3.c:66776: removeFromSharingList: Assertion `0' failed.

failure that we occasionally see in jenkins.

Signed-off-by: Free Ekanayaka <free.ekanay...@canonical.com>
---
 lxd/main.go | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/lxd/main.go b/lxd/main.go
index cf6b292cbb..1c6299e727 100644
--- a/lxd/main.go
+++ b/lxd/main.go
@@ -5,6 +5,7 @@ import (
        "os"
        "time"
 
+       "github.com/canonical/go-dqlite"
        "github.com/spf13/cobra"
 
        "github.com/lxc/lxd/lxd/daemon"
@@ -35,6 +36,16 @@ type cmdGlobal struct {
 }
 
 func (c *cmdGlobal) Run(cmd *cobra.Command, args []string) error {
+       // Configure dqlite to *not* disable internal SQLite locking, since we
+       // use SQLite both through dqlite and through go-dqlite, potentially
+       // from different threads at the same time. We need to call this
+       // function as early as possible since this is a global setting in
+       // SQLite, which can't be changed afterwise.
+       err := dqlite.ConfigMultiThread()
+       if err != nil {
+               return err
+       }
+
        // Set logging global variables
        daemon.Debug = c.flagLogDebug
        daemon.Verbose = c.flagLogVerbose
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to