Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package autofs for openSUSE:Factory checked 
in at 2021-09-17 23:25:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/autofs (Old)
 and      /work/SRC/openSUSE:Factory/.autofs.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "autofs"

Fri Sep 17 23:25:33 2021 rev:125 rq:918849 version:5.1.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/autofs/autofs.changes    2021-05-02 
18:35:25.489124531 +0200
+++ /work/SRC/openSUSE:Factory/.autofs.new.1899/autofs.changes  2021-09-17 
23:25:42.401223078 +0200
@@ -1,0 +2,6 @@
+Wed Sep  8 18:15:58 UTC 2021 - Goldwyn Rodrigues <[email protected]>
+
+-  autofs-5.1.7-use-default-stack-size-for-threads.patch: Use default
+   stack size for threads (bsc#1189199)
+
+-------------------------------------------------------------------

New:
----
  autofs-5.1.7-use-default-stack-size-for-threads.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ autofs.spec ++++++
--- /var/tmp/diff_new_pack.Wget8J/_old  2021-09-17 23:25:43.821224345 +0200
+++ /var/tmp/diff_new_pack.Wget8J/_new  2021-09-17 23:25:43.821224345 +0200
@@ -90,6 +90,7 @@
 # bsc#1175238 - Use /usr/etc/nsswitch.conf if /etc/nsswitch.conf is not 
available
 Patch106:       autofs-nsswitch-usr-etc.patch
 Patch107:       autofs-5.1.7-Fix-option-for-master_read_wait.patch
+Patch108:       autofs-5.1.7-use-default-stack-size-for-threads.patch
 Requires(pre):  %fillup_prereq
 Requires(pre):  aaa_base
 BuildRequires:  systemd-rpm-macros
@@ -115,6 +116,7 @@
 %patch105 -p1
 %patch106 -p1
 %patch107 -p1
+%patch108 -p1
 
 %build
 autoreconf -fiv

++++++ autofs-5.1.7-use-default-stack-size-for-threads.patch ++++++
>From 91edcc55c681dac41d2213b498ec6450aee22d9f Mon Sep 17 00:00:00 2001
From: Ian Kent <[email protected]>
Date: Mon, 26 Jul 2021 13:18:38 +0800
Subject: [PATCH] autofs-5.1.7 - use default stack size for threads
References: bsc#1189199

autofs uses PTHREAD_STACK_MIN to set the stack size for threads it
creates.

In two cases it is used to reduce the stack size for long running
service threads while it's used to allocate a larger stack for worker
threads that can have larger memory requirements.

In recent glibc releases PTHREAD_STACK_MIN is no longer a constant
which can lead to unexpectedly different stack sizes on different
architectures and the autofs assumption it's a constant causes a
compile failure.

The need to alter the stack size was due to observed stack overflow
which was thought to be due the thread stack being too small for autofs
and glibc alloca(3) usage.

Quite a bit of that alloca(3) usage has been eliminated from autofs now,
particularly those that might be allocating largish amounts of storage,
and there has been a lot of change in glibc too so using the thread
default stack should be ok.

Signed-off-by: Ian Kent <[email protected]>

---
 CHANGELOG          |    1 +
 daemon/automount.c |   29 -----------------------------
 daemon/state.c     |    6 +-----
 lib/alarm.c        |    6 +-----
 4 files changed, 3 insertions(+), 39 deletions(-)

--- a/CHANGELOG
+++ b/CHANGELOG
@@ -75,6 +75,7 @@
 - make autofs.a a shared library.
 - make lookup_file.c nss map read status return handling consistent.
 - fix empty mounts list return from unlink_mount_tree().
+- use default stack size for threads.
 
 07/10/2019 autofs-5.1.6
 - support strictexpire mount option.
--- a/daemon/automount.c
+++ b/daemon/automount.c
@@ -84,7 +84,6 @@
 /* Attributes for creating detached and joinable threads */
 pthread_attr_t th_attr;
 pthread_attr_t th_attr_detached;
-size_t detached_thread_stack_size = PTHREAD_STACK_MIN * 144;
 
 struct master_readmap_cond mrc = {
        PTHREAD_MUTEX_INITIALIZER, PTHREAD_COND_INITIALIZER, 0, NULL, 0, 0, 0, 
0};
@@ -2609,34 +2608,6 @@
                if (start_pipefd[1] != -1) {
                        res = write(start_pipefd[1], pst_stat, 
sizeof(*pst_stat));
                        close(start_pipefd[1]);
-               }
-               release_flag_file();
-               macro_free_global_table();
-               exit(1);
-       }
-
-#ifdef _POSIX_THREAD_ATTR_STACKSIZE
-       if (pthread_attr_setstacksize(
-                       &th_attr_detached, detached_thread_stack_size)) {
-               logerr("%s: failed to set stack size thread attribute!",
-                      program);
-               if (start_pipefd[1] != -1) {
-                       res = write(start_pipefd[1], pst_stat, 
sizeof(*pst_stat));
-                       close(start_pipefd[1]);
-               }
-               release_flag_file();
-               macro_free_global_table();
-               exit(1);
-       }
-#endif
-
-       if (pthread_attr_getstacksize(
-                       &th_attr_detached, &detached_thread_stack_size)) {
-               logerr("%s: failed to get detached thread stack size!",
-                      program);
-               if (start_pipefd[1] != -1) {
-                       res = write(start_pipefd[1], pst_stat, 
sizeof(*pst_stat));
-                       close(start_pipefd[1]);
                }
                release_flag_file();
                macro_free_global_table();
--- a/daemon/state.c
+++ b/daemon/state.c
@@ -1173,12 +1173,8 @@
        status = pthread_attr_init(pattrs);
        if (status)
                pattrs = NULL;
-       else {
+       else
                pthread_attr_setdetachstate(pattrs, PTHREAD_CREATE_DETACHED);
-#ifdef _POSIX_THREAD_ATTR_STACKSIZE
-               pthread_attr_setstacksize(pattrs, PTHREAD_STACK_MIN*4);
-#endif
-       }
 
        status = pthread_create(&thid, pattrs, st_queue_handler, NULL);
 
--- a/lib/alarm.c
+++ b/lib/alarm.c
@@ -270,12 +270,8 @@
        status = pthread_attr_init(pattrs);
        if (status)
                pattrs = NULL;
-       else {
+       else
                pthread_attr_setdetachstate(pattrs, PTHREAD_CREATE_DETACHED);
-#ifdef _POSIX_THREAD_ATTR_STACKSIZE
-               pthread_attr_setstacksize(pattrs, PTHREAD_STACK_MIN*4);
-#endif
-       }
 
        status = pthread_condattr_init(&condattrs);
        if (status)

Reply via email to