I have here a patch from upstream that fixes the crash, and a DEP8
test to do a simple check. This test can run in a container, so it
will run in debian's dep8 infrastructure, and it catches this type of
bug. It's less elaborate than the other dep8 tests, but they require a
VM.

These are currently in review on ubuntu at
https://code.launchpad.net/~ahasenack/ubuntu/+source/glusterfs/+git/glusterfs/+merge/450481
From 8c8e652c73958c2c62c3a80d0814a0e04e0d3096 Mon Sep 17 00:00:00 2001
From: Andreas Hasenack <andreas.hasen...@canonical.com>
Date: Fri, 1 Sep 2023 10:19:57 -0300
Subject: [PATCH 2/2]   * d/t/control, d/t/smoke: add simple superficial smoke
 test

---
 debian/tests/control |  4 ++++
 debian/tests/smoke   | 12 ++++++++++++
 2 files changed, 16 insertions(+)
 create mode 100644 debian/tests/smoke

diff --git a/debian/tests/control b/debian/tests/control
index ad3ea8a582..47ad57c3af 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,3 +1,7 @@
+Tests: smoke
+Restrictions: needs-root, superficial, isolation-container
+Depends: @
+
 Tests: create-volume
 Restrictions: allow-stderr, isolation-machine, breaks-testbed, needs-root
 Depends: @, xfsprogs
diff --git a/debian/tests/smoke b/debian/tests/smoke
new file mode 100644
index 0000000000..1298bc0f02
--- /dev/null
+++ b/debian/tests/smoke
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -e
+
+systemctl start glusterd.service
+systemctl status glusterd.service
+
+gluster peer status
+gluster pool list
+gluster get-state glusterd
+cat /var/run/gluster/glusterd_state_*
+
-- 
2.39.2

From 6931add9aa5a689a2bd4c312cdf04235e572c99c Mon Sep 17 00:00:00 2001
From: Andreas Hasenack <andreas.hasen...@canonical.com>
Date: Fri, 18 Aug 2023 17:16:34 -0300
Subject: [PATCH 1/2]   * d/p/09-fix-startup-crash.diff: fix glibc assertion
 error on startup     of glusterd (LP: #2031905)

---
 debian/patches/09-fix-startup-crash.diff | 27 ++++++++++++++++++++++++
 debian/patches/series                    |  1 +
 2 files changed, 28 insertions(+)
 create mode 100644 debian/patches/09-fix-startup-crash.diff

diff --git a/debian/patches/09-fix-startup-crash.diff b/debian/patches/09-fix-startup-crash.diff
new file mode 100644
index 0000000000..0a22f1b501
--- /dev/null
+++ b/debian/patches/09-fix-startup-crash.diff
@@ -0,0 +1,27 @@
+commit f68929b872edd7ad7f4512a77df1c5a7787ed3c2 (upstream/release-11, release-11)
+Author: Niraj Kumar Yadav <nirya...@redhat.com>
+Date:   Fri Jul 7 14:02:38 2023 +0530
+
+    Revert structure of per_thread_pool_list_t (#4196)
+    
+    Signed-off-by: black-dragon74 <nirya...@redhat.com>
+
+Origin: upstream, https://github.com/gluster/glusterfs/commit/f68929b872edd7ad7f4512a77df1c5a7787ed3c2
+Bug: https://github.com/gluster/glusterfs/issues/4192
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/glusterfs/+bug/2031905
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1050021
+Last-Update: 2023-09-01
+
+diff --git a/libglusterfs/src/glusterfs/mem-pool.h b/libglusterfs/src/glusterfs/mem-pool.h
+index 46f764f56e..416b7ddf1e 100644
+--- a/libglusterfs/src/glusterfs/mem-pool.h
++++ b/libglusterfs/src/glusterfs/mem-pool.h
+@@ -297,7 +297,7 @@ typedef struct per_thread_pool_list {
+      * in the implementation code so we just make it a single-element array
+      * here.
+      */
+-    per_thread_pool_t pools[];
++    per_thread_pool_t pools[1];
+ } per_thread_pool_list_t;
+ 
+ /* actual pool structure, shared between different mem_pools */
diff --git a/debian/patches/series b/debian/patches/series
index ed7b3ef9fe..f71dcc2a4c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@
 04-systemd-extra-services.diff
 05-remove-hashbang.diff
 08-bash-term-in-posix-shell.diff
+09-fix-startup-crash.diff
-- 
2.39.2

Reply via email to