Compilation with Passenger support hangs on "adding module"

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Compilation with Passenger support hangs on "adding module"

vergil
Hi

I'm using Nginx on a Gentoo Linux box to serve Ruby apps with Passenger for
years now and up to this point, never any real trouble compiling Nginx.

Today, however, trying to upgrade Nginx from 1.16.1 to 1.17.10, the
compilation hangs early when adding the Passenger module. The version of
Passenger (6.0.4) hasn't changed in a longer while, however, I've recently
updated from gcc-9.2 to gcc-9.3.

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/9.3.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-9.3.0/work/gcc-9.3.0/configure
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/9.3.0
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/9.3.0
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/9.3.0/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/9.3.0/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/include/g++-v9
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/9.3.0/python
--enable-languages=c,c++ --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --enable-nls --without-included-gettext
--enable-checking=release --with-bugurl=https://bugs.gentoo.org/
--with-pkgversion='Gentoo Hardened 9.3.0 p2' --enable-esp
--enable-libstdcxx-time --disable-libstdcxx-pch --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--enable-multilib --with-multilib-list=m32,m64 --disable-altivec
--disable-fixed-point --enable-targets=all --enable-libgomp
--disable-libmudflap --disable-libssp --disable-libada --disable-systemtap
--enable-vtable-verify --disable-libquadmath --enable-lto --without-isl
--enable-default-pie --enable-default-ssp
Thread model: posix
gcc version 9.3.0 (Gentoo Hardened 9.3.0 p2)

Here's the build output:

>>> Configuring source in
/var/tmp/portage/www-servers/nginx-1.17.10-r1/work/nginx-1.17.10 ...
checking for OS
 + Linux 5.4.38-gentoo x86_64
checking for C compiler ... found
 + using GNU C compiler
checking for --with-ld-opt="-L/usr/lib64" ... found
checking for -Wl,-E switch ... found
checking for gcc builtin atomic operations ... found
checking for C99 variadic macros ... found
checking for gcc variadic macros ... found
checking for gcc builtin 64 bit byteswap ... found
checking for unistd.h ... found
checking for inttypes.h ... found
checking for limits.h ... found
checking for sys/filio.h ... not found
checking for sys/param.h ... found
checking for sys/mount.h ... found
checking for sys/statvfs.h ... found
checking for crypt.h ... found
checking for Linux specific features
checking for epoll ... found
checking for EPOLLRDHUP ... found
checking for EPOLLEXCLUSIVE ... found
checking for O_PATH ... found
checking for sendfile() ... found
checking for sendfile64() ... found
checking for sys/prctl.h ... found
checking for prctl(PR_SET_DUMPABLE) ... found
checking for prctl(PR_SET_KEEPCAPS) ... found
checking for capabilities ... found
checking for crypt_r() ... found
checking for sys/vfs.h ... found
checking for poll() ... found
checking for /dev/poll ... not found
checking for kqueue ... not found
checking for crypt() ... not found
checking for crypt() in libcrypt ... found
checking for F_READAHEAD ... not found
checking for posix_fadvise() ... found
checking for O_DIRECT ... found
checking for F_NOCACHE ... not found
checking for directio() ... not found
checking for statfs() ... found
checking for statvfs() ... found
checking for dlopen() ... not found
checking for dlopen() in libdl ... found
checking for sched_yield() ... found
checking for sched_setaffinity() ... found
checking for SO_SETFIB ... not found
checking for SO_REUSEPORT ... found
checking for SO_ACCEPTFILTER ... not found
checking for SO_BINDANY ... not found
checking for IP_TRANSPARENT ... found
checking for IP_BINDANY ... not found
checking for IP_BIND_ADDRESS_NO_PORT ... found
checking for IP_RECVDSTADDR ... not found
checking for IP_SENDSRCADDR ... not found
checking for IP_PKTINFO ... found
checking for IPV6_RECVPKTINFO ... found
checking for TCP_DEFER_ACCEPT ... found
checking for TCP_KEEPIDLE ... found
checking for TCP_FASTOPEN ... found
checking for TCP_INFO ... found
checking for accept4() ... found
checking for eventfd() ... found
checking for int size ... 4 bytes
checking for long size ... 8 bytes
checking for long long size ... 8 bytes
checking for void * size ... 8 bytes
checking for uint32_t ... found
checking for uint64_t ... found
checking for sig_atomic_t ... found
checking for sig_atomic_t size ... 4 bytes
checking for socklen_t ... found
checking for in_addr_t ... found
checking for in_port_t ... found
checking for rlim_t ... found
checking for uintptr_t ... uintptr_t found
checking for system byte ordering ... little endian
checking for size_t size ... 8 bytes
checking for off_t size ... 8 bytes
checking for time_t size ... 8 bytes
checking for AF_INET6 ... found
checking for setproctitle() ... not found
checking for pread() ... found
checking for pwrite() ... found
checking for pwritev() ... found
checking for sys_nerr ... found
checking for localtime_r() ... found
checking for clock_gettime(CLOCK_MONOTONIC) ... found
checking for posix_memalign() ... found
checking for memalign() ... found
checking for mmap(MAP_ANON|MAP_SHARED) ... found
checking for mmap("/dev/zero", MAP_SHARED) ... found
checking for System V shared memory ... found
checking for POSIX semaphores ... not found
checking for POSIX semaphores in libpthread ... found
checking for struct msghdr.msg_control ... found
checking for ioctl(FIONBIO) ... found
checking for ioctl(FIONREAD) ... found
checking for struct tm.tm_gmtoff ... found
checking for struct dirent.d_namlen ... not found
checking for struct dirent.d_type ... found
checking for sysconf(_SC_NPROCESSORS_ONLN) ... found
checking for sysconf(_SC_LEVEL1_DCACHE_LINESIZE) ... found
checking for openat(), fstatat() ... found
checking for getaddrinfo() ... found
configuring additional modules
adding module in
/usr/local/lib/ruby/gems/2.6.0/gems/passenger-6.0.4/src/nginx_module

Before diving into the whole toolchain, environment, logs dance: Anything I
can do to get more output than just "adding module"?

Thanks for your help!

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,288136,288136#msg-288136

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: Compilation with Passenger support hangs on "adding module"

Maxim Dounin
Hello!

On Tue, May 26, 2020 at 06:33:35AM -0400, svoop wrote:

> I'm using Nginx on a Gentoo Linux box to serve Ruby apps with Passenger for
> years now and up to this point, never any real trouble compiling Nginx.
>
> Today, however, trying to upgrade Nginx from 1.16.1 to 1.17.10, the
> compilation hangs early when adding the Passenger module. The version of
> Passenger (6.0.4) hasn't changed in a longer while, however, I've recently
> updated from gcc-9.2 to gcc-9.3.

[...]

> Here's the build output:
>
> >>> Configuring source in
> /var/tmp/portage/www-servers/nginx-1.17.10-r1/work/nginx-1.17.10 ...
> checking for OS
>  + Linux 5.4.38-gentoo x86_64
> checking for C compiler ... found
>  + using GNU C compiler

[...]

> checking for getaddrinfo() ... found
> configuring additional modules
> adding module in
> /usr/local/lib/ruby/gems/2.6.0/gems/passenger-6.0.4/src/nginx_module
>
> Before diving into the whole toolchain, environment, logs dance: Anything I
> can do to get more output than just "adding module"?

Following the "adding module ..." line, nginx configure calls the
"config" script from the module directory.  And since there is no
further output, it hangs somewhere in the config script of the
passenger module.

As such, there is nothing to be done on nginx side here, you
should dig into passenger's config.  Or you may want to upgrade
passenger instead, to see if it helps.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: Compilation with Passenger support hangs on "adding module"

vergil
> Following the "adding module ..." line, nginx configure calls the
> "config" script from the module directory. And since there is no
> further output, it hangs somewhere in the config script of the
> passenger module.

You're right, I spend a good part of the day to track this down and figured
out that the Passenger config script hangs whenever it invokes Ruby. And
this happens only if Ruby is using hardened jemalloc. Seems to be related to
this problem:

https://bugs.gentoo.org/617518

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,288136,288158#msg-288158

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx