From 52efec290c28df5ae956e1d7832837c1ee6e4a5e4d03cca77077d8c784f8446f Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sun, 19 Apr 2020 13:07:41 +0000 Subject: [PATCH 1/2] Accepting request 793906 from home:darix:branches:network:utilities - update to version 1.6.5 https://github.com/memcached/memcached/wiki/ReleaseNotes165 - drop link_sasl.patch issue is fixed - update to version 1.6.4 https://github.com/memcached/memcached/wiki/ReleaseNotes163 https://github.com/memcached/memcached/wiki/ReleaseNotes164 - drop patches as they are included in the update: https://github.com/memcached/memcached/pull/634 https://github.com/memcached/memcached/pull/635 - added link_sasl.patch: it seems libsasl2 wasnt linked which lead to undefined references - disable extstore also on ppc(64) - limit tls support to 15 and above - disable lto until the 2 settings structs are resolved OBS-URL: https://build.opensuse.org/request/show/793906 OBS-URL: https://build.opensuse.org/package/show/network:utilities/memcached?expand=0&rev=73 --- 634.patch | 59 -------------------- 635.patch | 120 ----------------------------------------- memcached-1.6.2.tar.gz | 3 -- memcached-1.6.5.tar.gz | 3 ++ memcached.changes | 25 +++++++-- memcached.spec | 6 +-- 6 files changed, 26 insertions(+), 190 deletions(-) delete mode 100644 634.patch delete mode 100644 635.patch delete mode 100644 memcached-1.6.2.tar.gz create mode 100644 memcached-1.6.5.tar.gz diff --git a/634.patch b/634.patch deleted file mode 100644 index 87965f3..0000000 --- a/634.patch +++ /dev/null @@ -1,59 +0,0 @@ -From aba4ffb5fce37ba6d2977c190592fd35ad7f3462 Mon Sep 17 00:00:00 2001 -From: Kanak Kshetri -Date: Wed, 1 Apr 2020 07:34:16 -0500 -Subject: [PATCH] testapp: Fix failure with -flto=auto - ---- - Makefile.am | 2 +- - testapp.c | 11 +++++------ - 2 files changed, 6 insertions(+), 7 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 0d30161e7..d62facfce 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -4,7 +4,7 @@ noinst_PROGRAMS = memcached-debug sizes testapp timedrun - - BUILT_SOURCES= - --testapp_SOURCES = testapp.c util.c util.h stats_prefix.c stats_prefix.h jenkins_hash.c murmur3_hash.c hash.c hash.h cache.c -+testapp_SOURCES = testapp.c util.c util.h stats_prefix.c stats_prefix.h jenkins_hash.c murmur3_hash.c hash.h cache.c - - timedrun_SOURCES = timedrun.c - -diff --git a/testapp.c b/testapp.c -index fffed794e..193adda86 100644 ---- a/testapp.c -+++ b/testapp.c -@@ -21,6 +21,7 @@ - #include "config.h" - #include "cache.h" - #include "hash.h" -+#include "jenkins_hash.h" - #include "stats_prefix.h" - #include "util.h" - #include "protocol_binary.h" -@@ -42,10 +43,7 @@ struct conn { - ssize_t (*write)(struct conn *c, const void *buf, size_t count); - }; - --struct settings { -- char *hash_algorithm; --}; --struct settings settings; -+hash_func hash; - - static ssize_t tcp_read(struct conn *c, void *buf, size_t count); - static ssize_t tcp_write(struct conn *c, const void *buf, size_t count); -@@ -2306,8 +2304,9 @@ int main(int argc, char **argv) - enable_ssl = true; - } - #endif -- /* Stats prefix test is sensitive to the choice of hash function */ -- hash_init(JENKINS_HASH); -+ /* Initialized directly instead of using hash_init to avoid pulling in -+ the definition of settings struct from memcached.h */ -+ hash = jenkins_hash; - stats_prefix_init(':'); - - for (num_cases = 0; testcases[num_cases].description; num_cases++) { diff --git a/635.patch b/635.patch deleted file mode 100644 index d30d9cb..0000000 --- a/635.patch +++ /dev/null @@ -1,120 +0,0 @@ -From 5174ef33576f461d43f43b2019f5e10655b4c78f Mon Sep 17 00:00:00 2001 -From: dormando -Date: Wed, 25 Mar 2020 14:02:11 -0700 -Subject: [PATCH] restart: fix rare segfault on shutdown - -Client connections were being closed and cleaned up after worker -threads exit. In 2018 a patch went in to have the worker threads -actually free their event base when stopped. If your system is strict -enough (which is apparently none out of the dozen+ systems we've tested -against!) it will segfault on invalid memory. - -This change leaves the workers hung while they wait for connections to -be centrally closed. I would prefer to have each worker thread close -its own connections for speed if nothing else, but we still need to -close the listener connections and any connections currently open in -side channels. - -Much apprecation to darix for helping narrow this down, as it presented -as a wiped stack that only appeared in a specific build environment on -a specific linux distribution. - -Hopefully with all of the valgrind noise fixes lately we can start -running it more regularly and spot these early. ---- - memcached.c | 19 ++++++++++++------- - memcached.h | 3 +-- - thread.c | 14 ++++++++++++++ - 3 files changed, 27 insertions(+), 9 deletions(-) - -diff --git a/memcached.c b/memcached.c -index 2592b3f94..dd52dd04c 100644 ---- a/memcached.c -+++ b/memcached.c -@@ -939,6 +939,18 @@ static void conn_close(conn *c) { - return; - } - -+// Since some connections might be off on side threads and some are managed as -+// listeners we need to walk through them all from a central point. -+// Must be called with all worker threads hung or in the process of closing. -+void conn_close_all(void) { -+ int i; -+ for (i = 0; i < max_fds; i++) { -+ if (conns[i] && conns[i]->state != conn_closed) { -+ conn_close(conns[i]); -+ } -+ } -+} -+ - /** - * Convert a state name to a human readable form. - */ -@@ -10126,13 +10138,6 @@ int main (int argc, char **argv) { - - fprintf(stderr, "Gracefully stopping\n"); - stop_threads(); -- int i; -- // FIXME: make a function callable from threads.c -- for (i = 0; i < max_fds; i++) { -- if (conns[i] && conns[i]->state != conn_closed) { -- conn_close(conns[i]); -- } -- } - if (memory_file != NULL) { - restart_mmap_close(); - } -diff --git a/memcached.h b/memcached.h -index a3ddd88c1..bdc38bd9c 100644 ---- a/memcached.h -+++ b/memcached.h -@@ -820,9 +820,8 @@ enum delta_result_type add_delta(conn *c, const char *key, - const int64_t delta, char *buf, - uint64_t *cas); - void accept_new_conns(const bool do_accept); --conn *conn_from_freelist(void); --bool conn_add_to_freelist(conn *c); - void conn_close_idle(conn *c); -+void conn_close_all(void); - item *item_alloc(char *key, size_t nkey, int flags, rel_time_t exptime, int nbytes); - #define DO_UPDATE true - #define DONT_UPDATE false -diff --git a/thread.c b/thread.c -index ed9765a48..e7f96dcba 100644 ---- a/thread.c -+++ b/thread.c -@@ -204,6 +204,7 @@ void stop_threads(void) { - if (settings.verbose > 0) - fprintf(stderr, "asking workers to stop\n"); - buf[0] = 's'; -+ pthread_mutex_lock(&worker_hang_lock); - pthread_mutex_lock(&init_lock); - init_count = 0; - for (i = 0; i < settings.num_threads; i++) { -@@ -215,6 +216,8 @@ void stop_threads(void) { - wait_for_thread_registration(settings.num_threads); - pthread_mutex_unlock(&init_lock); - -+ // All of the workers are hung but haven't done cleanup yet. -+ - if (settings.verbose > 0) - fprintf(stderr, "asking background threads to stop\n"); - -@@ -236,6 +239,17 @@ void stop_threads(void) { - if (settings.verbose > 0) - fprintf(stderr, "stopped idle timeout thread\n"); - -+ // Close all connections then let the workers finally exit. -+ if (settings.verbose > 0) -+ fprintf(stderr, "closing connections\n"); -+ conn_close_all(); -+ pthread_mutex_unlock(&worker_hang_lock); -+ if (settings.verbose > 0) -+ fprintf(stderr, "reaping worker threads\n"); -+ for (i = 0; i < settings.num_threads; i++) { -+ pthread_join(threads[i].thread_id, NULL); -+ } -+ - if (settings.verbose > 0) - fprintf(stderr, "all background threads stopped\n"); - diff --git a/memcached-1.6.2.tar.gz b/memcached-1.6.2.tar.gz deleted file mode 100644 index d91f3e5..0000000 --- a/memcached-1.6.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:06720118c40689be0b85249b3dcb23c6e6d5e3ce53893aca9faced264145168b -size 536527 diff --git a/memcached-1.6.5.tar.gz b/memcached-1.6.5.tar.gz new file mode 100644 index 0000000..92acf92 --- /dev/null +++ b/memcached-1.6.5.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1f4da3706fc13c33be9df97b2c1c8d7b0891d5f0dc88aebc603cb178e68b27df +size 539962 diff --git a/memcached.changes b/memcached.changes index e9ca770..da6690c 100644 --- a/memcached.changes +++ b/memcached.changes @@ -1,7 +1,26 @@ +------------------------------------------------------------------- +Mon Apr 13 19:08:36 UTC 2020 - Marcus Rueckert + +- update to version 1.6.5 + https://github.com/memcached/memcached/wiki/ReleaseNotes165 +- drop link_sasl.patch issue is fixed + +------------------------------------------------------------------- +Mon Apr 13 12:00:31 UTC 2020 - Marcus Rueckert + +- update to version 1.6.4 + https://github.com/memcached/memcached/wiki/ReleaseNotes163 + https://github.com/memcached/memcached/wiki/ReleaseNotes164 +- drop patches as they are included in the update: + https://github.com/memcached/memcached/pull/634 + https://github.com/memcached/memcached/pull/635 +- added link_sasl.patch: it seems libsasl2 wasnt linked which lead + to undefined references + ------------------------------------------------------------------- Wed Apr 1 23:59:38 UTC 2020 - Marcus Rueckert -- disable extstore also on ppc(64) +- disable extstore also on ppc(64) ------------------------------------------------------------------- Wed Apr 1 23:26:11 UTC 2020 - Marcus Rueckert @@ -21,12 +40,12 @@ Thu Mar 26 01:22:59 UTC 2020 - Marcus Rueckert ------------------------------------------------------------------- Tue Mar 24 21:27:33 UTC 2020 - Marcus Rueckert -- limit tls support to 15 and above +- limit tls support to 15 and above ------------------------------------------------------------------- Tue Mar 24 21:20:51 UTC 2020 - Marcus Rueckert -- disable lto until the 2 settings structs are resolved +- disable lto until the 2 settings structs are resolved ------------------------------------------------------------------- Tue Mar 24 20:54:55 UTC 2020 - Marcus Rueckert diff --git a/memcached.spec b/memcached.spec index 7a9bba9..c5ac083 100644 --- a/memcached.spec +++ b/memcached.spec @@ -28,7 +28,7 @@ %endif Name: memcached -Version: 1.6.2 +Version: 1.6.5 Release: 0 Summary: A high-performance, distributed memory object caching system License: BSD-3-Clause @@ -39,8 +39,6 @@ Source1: %{name}.init Source2: %{name}.sysconfig Source3: memcached-rpmlintrc Source4: memcached.service -Patch: https://patch-diff.githubusercontent.com/raw/memcached/memcached/pull/635.patch -Patch1: https://patch-diff.githubusercontent.com/raw/memcached/memcached/pull/634.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: cyrus-sasl-devel @@ -90,8 +88,6 @@ This package contains development files %prep %setup -q -%patch -p1 -%patch1 -p1 %build autoreconf -fi From 21f52dd88f3f0261fd91df5af1248b863835f41af8ac7fa1734bfc92fc1dca38 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sun, 19 Apr 2020 13:16:44 +0000 Subject: [PATCH 2/2] - dropped 635.patch and 634.patch: in 1.6.5 release OBS-URL: https://build.opensuse.org/package/show/network:utilities/memcached?expand=0&rev=74 --- memcached.changes | 1 + 1 file changed, 1 insertion(+) diff --git a/memcached.changes b/memcached.changes index da6690c..c1405ac 100644 --- a/memcached.changes +++ b/memcached.changes @@ -4,6 +4,7 @@ Mon Apr 13 19:08:36 UTC 2020 - Marcus Rueckert - update to version 1.6.5 https://github.com/memcached/memcached/wiki/ReleaseNotes165 - drop link_sasl.patch issue is fixed +- dropped 635.patch and 634.patch: in 1.6.5 release ------------------------------------------------------------------- Mon Apr 13 12:00:31 UTC 2020 - Marcus Rueckert