Launchpad has imported 3 comments from the remote bug at
https://bugzilla.redhat.com/show_bug.cgi?id=1984813.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2021-07-22T09:41:22+00:00 fweimer wrote:

+++ This bug was initially created as a clone of Bug #1984808 +++

Building autofs fails with:

gcc -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches 
-pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 
-Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 
-fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  
-mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection 
-fcf-protection -D_REENTRANT -D_FILE_OFFSET_BITS=64 -I/usr/include/tirpc  
-D_REENTRANT -D_FILE_OFFSET_BITS=64 -I/usr/include/tirpc  -rdynamic -fPIE 
-D_GNU_SOURCE -I../include -DAUTOFS_LIB_DIR=\"/usr/lib64/autofs\"  
-DAUTOFS_MAP_DIR=\"/etc\" -DAUTOFS_CONF_DIR=\"/etc/sysconfig\" 
-DAUTOFS_FIFO_DIR=\"/run\" -DAUTOFS_FLAG_DIR=\"/run\" 
-DVERSION_STRING=\"5.1.7-18.fc35\" -DWITH_SYSTEMD -I/usr/include/libxml2  -c 
automount.c
In file included from /usr/include/bits/local_lim.h:81,
                 from /usr/include/bits/posix1_lim.h:161,
                 from /usr/include/dirent.h:233,
                 from automount.c:22:
automount.c:87:37: error: initializer element is not constant
   87 | size_t detached_thread_stack_size = PTHREAD_STACK_MIN * 144;
      |                                     ^~~~~~~~~~~~~~~~~
make[1]: Leaving directory '/builddir/build/BUILD/autofs-5.1.7/daemon'

This use of PTHREAD_STACK_MIN is a bit strange because the computed
stack size varies wildly between architectures. And it was done
deliberately to *increase* stack size (most uses of PTHREAD_STACK_MIN
intend to do the opposite):

commit ef4886702177f1bbeba66858181a7db44ca8ebd6
Author: Ian Kent <ra...@themaw.net>
Date:   Fri Apr 21 08:17:52 2017 +0800

    autofs-5.1.2 - increase worker thread per-thread stack size
    
    automount(8) uses a worker thread per-thread stack size of 1M which is
    sufficient for its needs.
    
    But some glibc functions (such as nscd_getgr_r()) use alloca() to allocate
    working storage that can have an arbitary size. Since alloca() never fails
    there is no way to check for stack overflow. This has been fixed in more
    recent versions of glibc.
    
    But for older version of glibc all that can be done by automount to avoid
    this is to increase the stack size.
    
    Signed-off-by: Ian Kent <ra...@themaw.net>

Maybe this can be disabled for glibc 2.34 and later. Due to the symbol
version changes in glibc 2.34, the compiled binary cannot run on earlier
glibc versions, so a compile-time check would be safe in this case.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/autofs/+bug/1941070/comments/0

------------------------------------------------------------------------
On 2021-07-22T11:30:20+00:00 ikent wrote:

Right, I'll fix it in Rawhide first, ;)

Reply at:
https://bugs.launchpad.net/ubuntu/+source/autofs/+bug/1941070/comments/1

------------------------------------------------------------------------
On 2021-07-30T07:25:31+00:00 ikent wrote:

The glibc functions that lead to autofs needing to use PTHREAD_STACK_MIN have
changed in glibc some time ago now.

So the original code that resulted in autofs needing this is now gone.

So there's no reason there should be any regressions due to this change.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/autofs/+bug/1941070/comments/2


** Changed in: autofs (Fedora)
       Status: Unknown => Fix Released

** Changed in: autofs (Fedora)
   Importance: Unknown => Undecided

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1941070

Title:
  autofs 5.1.7-1build1 FTBFS

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/autofs/+bug/1941070/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to