Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 662072

Summary: www-servers/apache mod_lbmethod_byrequests.so undefined symbol
Product: Gentoo Linux Reporter: Wojciech Myrda <vojcek>
Component: Current packagesAssignee: Apache Team - Bugzilla Reports <apache-bugs>
Status: UNCONFIRMED ---    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Wojciech Myrda 2018-07-25 07:25:09 UTC
For few days I noticed following error message when trying to reload apache. 

 * apache2 has detected an error in your setup:
apache2: Syntax error on line 111 of /etc/apache2/httpd.conf: Cannot load modules/mod_lbmethod_byrequests.so into server: /usr/lib64/apache2/modules/mod_lbmethod_byrequests.so: undefined symbol: ap_proxy_balancer_get_best_worker

Some logs in web server stopped working due to that error. Recompiling apache did not resolve it. Any idea what could have go wrong?


emerge --info
Portage 2.3.43 (python 3.5.5-final-0, default/linux/amd64/17.0, gcc-7.3.0, glibc-2.27-r5, 4.14.23 x86_64)
=================================================================
System uname: Linux-4.14.23-x86_64-Intel-R-_Core-TM-_i3-4130_CPU_@_3.40GHz-with-gentoo-2.6
Timestamp of repository gentoo: Tue, 24 Jul 2018 15:45:01 +0000
Head commit of repository gentoo: 3ac48d9469a8ae37109abae96588c9ce2ee5dc7c
sh bash 4.4_p23
ld GNU ld (Gentoo 2.30 p3) 2.30.0
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.4_p23::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.15::gentoo, 3.5.5-r1::gentoo, 3.6.6::gentoo
dev-util/cmake:           3.12.0::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6::gentoo
sys-apps/openrc:          0.38.1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.69-r4::gentoo
sys-devel/automake:       1.15.1-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.30-r3::gentoo
sys-devel/gcc:            7.3.0-r3::gentoo
sys-devel/gcc-config:     1.9.1::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r3::gentoo
sys-kernel/linux-headers: 4.17::gentoo (virtual/os-headers)
sys-libs/glibc:           2.27-r5::gentoo
Repositories:

gentoo
    location: /mnt/4tb/portage
    sync-type: rsync
    sync-uri: rsync://rsync.europe.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: no

sft
    location: /var/lib/layman/sft
    masters: gentoo
    priority: 0

dotnet
    location: /var/lib/layman/dotnet
    masters: gentoo
    priority: 1

jm-overlay
    location: /var/lib/layman/jm-overlay
    masters: dotnet gentoo
    priority: 2

haskell
    location: /var/lib/layman/haskell
    masters: gentoo
    priority: 3

bigvo
    location: /usr/local/portage
    masters: gentoo
    priority: 4

gentoo-osm
    location: /usr/local/geo
    masters: gentoo
    priority: 5

hackport
    location: /usr/local/hackport
    masters: gentoo
    priority: 6

ACCEPT_KEYWORDS="amd64 ~amd64 ~x86"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -fgcse-sm -fgcse-las -fgcse-after-reload -ftree-vectorize"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/proxhttpsproxy/config.ini /usr/share/gnupg/qualified.txt /var/bind /var/lib/unifi/data/system.properties"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe -fgcse-sm -fgcse-las -fgcse-after-reload -ftree-vectorize -fabi-version=0"
DISTDIR="/mnt/4tb/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync metadata-transfer multilib-strict news nodoc noinfo noman parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://127.0.0.1/ http://gentoo.prz.rzeszow.pl ftp://gentoo.imj.fr/pub/gentoo/ http://mirror.netcologne.de/gentoo/"
LANG="pl_PL.utf8"
LC_ALL="pl_PL.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--hash-style=both -Wl,--as-needed -Wl,--relax -Wl,--sort-common"
LINGUAS="pl"
MAKEOPTS="-j5"
PKGDIR="/mnt/4tb/distfiles/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/tmp/"
USE="acpi alsa amd64 auth berkdb bzip2 cairo caps cdda cddb cdr cli corefonts crypt css custom-cflags custom-optimization cxx dbus dri dvb dvd dvdr enca firmware-loader fontconfig fortran2003 fuse gdal gdbm geoip geos gif gmp gphoto2 hdf5 iconv icu imap irda ithreads jemalloc jpeg jpeg2k lapack lcd libass libnotify libtirpc libv4l linguas_pl lirc llvm lm_sensors logrotate lz4 lzma lzo mixer mmx mmxext modules mpeg multilib ncurses network nls nptl ocr openmp openssl optimisememory pam pch pcre pgo png postfix postgres proj readline remote remote-access samba sasl scanner seccomp sendmail sensord snmp spamassassin sqlite sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 stream svg symlink system-jsoncpp system-sqlite tcpd thread threads tiff truetype tv udev unicode usb v4l v4l2 vaapi vhosts xmltv zlib zstd" ABI_X86="64 32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias authn_dbd dbd http2 ident imagemap lbmethod_byrequests lbmethod_bytraffic slotmem_shm proxy_balancer proxy" CALLIGRA_FEATURES="karbon plan sheets stage words" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" L10N="pl" LCD_DEVICES="bayrad cfontz cfontz633 imon imonlcd glk hd44780 lb216 lcdm001 mtxorb ncurses text picolcd" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LIRC_DEVICES="devinput" LLVM_TARGETS="AMDGPU BPF X86" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_6" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5 python3_6" RUBY_TARGETS="ruby20" SANE_BACKENDS="gt68xx plustek" USERLAND="GNU" VIDEO_CARDS="intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2018-07-25 08:58:53 UTC
Please post the output of

  emerge --info www-servers/apache

to this bug.
Comment 2 Wojciech Myrda 2018-07-25 09:01:53 UTC
here is missing part

=================================================================
                        Package Settings
=================================================================

www-servers/apache-2.4.34-r1::gentoo was built with the following:
USE="gdbm ssl suexec suexec-caps threads -debug -doc -ldap -libressl (-selinux) -static -suexec-syslog" ABI_X86="(64)" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_core authn_dbd authn_dbm authn_file authz_core authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock dbd deflate dir env expires ext_filter file_cache filter headers http2 ident imagemap include info lbmethod_byrequests lbmethod_bytraffic log_config logio mime mime_magic negotiation proxy proxy_balancer rewrite setenvif slotmem_shm socache_shmcb speling status unique_id unixd userdir usertrack vhost_alias -access_compat -asis -auth_digest -authz_dbd -brotli -cache_disk -cache_socache -cern_meta -charset_lite -dumpio -lbmethod_bybusyness -lbmethod_heartbeat -log_forensic -macro -md -proxy_ajp -proxy_connect -proxy_fcgi -proxy_ftp -proxy_html -proxy_http -proxy_scgi -proxy_wstunnel -ratelimit -remoteip -reqtimeout -substitute -version -watchdog -xml2enc" APACHE2_MPMS="-event -prefork -worker"
LDFLAGS="-Wl,-O1 -Wl,--hash-style=both -Wl,--as-needed -Wl,--relax -Wl,--sort-common -Wl,--no-as-needed"
Comment 3 Josh G 2018-07-26 17:41:16 UTC
The problem is that mod_proxy is loaded AFTER modules which depend on it attempt to load. Not sure why the order suddenly matters, but change your httpd.conf to:

<IfDefine INFO>
LoadModule info_module modules/mod_info.so
</IfDefine>
LoadModule log_config_module modules/mod_log_config.so
LoadModule logio_module modules/mod_logio.so
LoadModule macro_module modules/mod_macro.so
LoadModule mime_module modules/mod_mime.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule negotiation_module modules/mod_negotiation.so
<IfDefine PROXY>
LoadModule proxy_module modules/mod_proxy.so
LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so
LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so
LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so
LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so
</IfDefine>
Comment 4 Wojciech Myrda 2018-07-27 08:52:52 UTC
@Josh G
Yes that indeed has worked with exception that in my case I did not use all those modules, but idea behind it worked.

</IfDefine>
LoadModule log_config_module modules/mod_log_config.so
LoadModule logio_module modules/mod_logio.so
LoadModule mime_module modules/mod_mime.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule negotiation_module modules/mod_negotiation.so
<IfDefine PROXY>
LoadModule proxy_module modules/mod_proxy.so
LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so
LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so
</IfDefine>

Looking at the "genlop -t apache" output I see that apache was just updated to version 2.4.34 which in changelog has bunch of mod_proxy* related fixes. Could be that somewhere there now is implemented more strict checking at the module load, but that is just my guess.
Comment 5 Patrice BOUVARD 2018-08-21 10:18:33 UTC
I'm confirming this bug.

I solved it by loading "proxy_module modules/mod_proxy.so" before "lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so" as mentionned by Josh in comment #3


www-servers/apache-2.4.34-r1:2::gentoo  USE="gdbm ssl suexec suexec-caps threads -debug -doc -ldap -libressl (-selinux) -static -suexec-syslog" APACHE2_MODULES="access_compat actions alias auth_basic authn_alias authn_anon authn_core authn_dbm authn_file authz_core authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers http2 include info lbmethod_bytraffic log_config logio mime mime_magic negotiation proxy proxy_balancer proxy_http ratelimit rewrite setenvif slotmem_shm socache_shmcb speling status unique_id unixd userdir usertrack vhost_alias -asis -auth_digest -authn_dbd -authz_dbd -brotli -cache_disk -cache_socache -cern_meta -charset_lite -dbd -dumpio -ident -imagemap -lbmethod_bybusyness -lbmethod_byrequests -lbmethod_heartbeat -log_forensic -macro -md -proxy_ajp -proxy_connect -proxy_fcgi -proxy_ftp -proxy_html -proxy_scgi -proxy_wstunnel -remoteip -reqtimeout -substitute -version -watchdog -xml2enc" APACHE2_MPMS="worker -event -prefork"