Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 510736 - SSL enabled www-servers/apache-2.4.9-r2 fails on graceful restart
Summary: SSL enabled www-servers/apache-2.4.9-r2 fails on graceful restart
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Apache Team - Bugzilla Reports
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-19 11:52 UTC by Thomas Beutin
Modified: 2021-04-28 19:22 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Beutin 2014-05-19 11:52:40 UTC
start of www-servers/apache-2.4.9-r2 with SSL support runs w/o any problem, but a
/etc/init.d/apache2 graceful
let the server freeze, which means
- one apache process is still running (not the one with PID from /run/apache2.pid)
- no request will be answered anymore
- one more graceful restart reports "httpd not running, trying to start", and a new tree of processes gets started, but the old process still lurks around

Reproducible: Always

Steps to Reproduce:
1. install www-servers/apache-2.4.9-r2
2. activate SSL
3. do a graceful restart, even w/o any change on the config files
Actual Results:  
[Mon May 19 13:47:26.759904 2014] [mpm_worker:notice] [pid 7052:tid 139882589394752] AH00297: SIGUSR1 received.  Doing graceful restart
[Mon May 19 13:47:26.760096 2014] [mpm_worker:debug] [pid 7060:tid 139882026419968] worker.c(876): (22)Invalid argument: AH00274: apr_proc_mutex_unlock failed. Attempting to shutdown process gracefully.
[Mon May 19 13:47:26.760381 2014] [core:notice] [pid 7052] AH00060: seg fault or similar nasty error detected in the parent process
[Mon May 19 13:47:27.263781 2014] [:alert] [pid 7059:tid 139882589394752] FastCGI: read() from pipe failed (0)
[Mon May 19 13:47:27.263816 2014] [:alert] [pid 7059:tid 139882589394752] FastCGI: the PM is shutting down, Apache seems to have disappeared - bye

Expected Results:  
I know, this error seems to be very strange, and i have a similar configuration of apache running on a different system w/o problems.

# emerge --info =www-servers/apache-2.4.9-r2
Portage 2.2.8-r1 (default/linux/amd64/13.0, gcc-4.7.3, glibc-2.17, 3.12.13-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.12.13-gentoo-x86_64-AMD_Opteron-tm-_Processor_6386_SE-with-gentoo-2.2
KiB Mem:   264271428 total, 260092608 free
KiB Swap:  272498492 total, 272498492 free
Timestamp of tree: Mon, 19 May 2014 09:30:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.5-r3, 3.2.5-r3, 3.3.3
dev-util/cmake:           2.8.12.2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo science sunrise barzog-overlay x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=bdver2 -fomit-frame-pointer -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/easy-rsa /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=bdver2 -fomit-frame-pointer -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j66"
PKGDIR="/usr/portage/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"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/science /var/lib/layman/sunrise /var/lib/layman/barzog-overlay /usr/local/portage"
USE="X509 aac aacplus aalib accounting acl adns aim amd64 ansi apache2 audit automount autotrace bacula-console bash-completion bcmath bidi bind-mysql bittorrent bzip2 calendar caps ccache cdb cgi chipcard chroot command-args corefonts cpudetection cpulimit cracklib cramfs crypt cscope css csv ctype curl curlwrappers customlog cvsgraph cxx cyrus dba dbi dbm dbx device-mapper devmap dhcp djvu dlopen dnsdb ecc emf encode enscript exif expat fam fastcgi ffmpeg fftw fits flac flash flatfile fontconfig fpm fpx ftp fuse gd gdal gdbm geoip geos gif gmp graphviz gs gssapi gzip hardened hardenedphp hdf5 hdri hpn http i18n iconv icq icu idea idled idn imagemagick imap imlib imlib2 inifile innodb ipalias iproute2 ipv6 jabber jbig jpeg jpeg2k json lapack lcms ldap less libwww lm_sensors lmtp logrotate logwatch lzma lzo mbox mcal memlimit mgetty mhash milter mime mimencode ming mmap mmx mp3 mpeg mpm-prefork mppe-mppc multilib mysql mysqli nagios-dns nagios-game nagios-ntp nagios-ping nagios-ssh ncurses netboot netcdf netifrc network nfs nis nls nntp nptl nptlonly oav ocaml ocamlopt odbc ogg oggvorbis openexr openmp openrc openssh openssl pam pam_chroot pam_timestamp pango parse-clocks pcntl pcre pdf pdfkit pdflib perl php pic plotutils png posix postfix postgis postgres postscript procmail proj pwdb python qdbm qemu quotas radius raw readline recode reiserfs rmtp rrdtool rss sample sasl screen sendfile sendmail sensord session sftp sftplogging shaper shared sharedext sieve simplexml slang slp smartcard smime smp sms smtp snmp snortsam soap sockets socks5 spamassassin spell spl sql sqlite sqlite3 sse sse2 sse3 sse4 sse4_1 sse4_2 ssl ssse3 stream subversion svg sysfs syslog sysvipc szip tcpd theora threads tidy tiff tls tokenizer transparent-proxy truetype truetype-fonts type1-fonts udev unicode userlocales utf8 uuid vhosts vim-syntax virtual-users virus-scan vorbis vpx wddx webp withsamplescripts wmf x264 xattr xfs xinetd xls xml xml2 xmlrpc xpm xsl xslt xvid yahoo yaz zlib" ABI_X86="64" APACHE2_MODULES="access auth auth_basic auth_digest authn_default authn_core authn_file authz_core authz_groupfile authz_host authz_user authn_dbm authn_dbd dbd ident imagemap authn_dbd authn_file authn_default authz_groupfile authn_alias authn_anon authz_dbm authz_owner authz_default authz_user auth_digest authz_host alias file_cache echo charset_lite cache disk_cache mem_cache ext_filter case_filter case-filter-in deflate filter mime_magic cern_meta proxy_ajp proxy_balancer expires headers usertrack proxy proxy_connect proxy_ftp proxy_http info include cgi cgid dav dav_lock dav_fs vhost_alias speling rewrite log_config logio env setenvif mime status substitute autoindex asis negotiation dir imap actions userdir so unique_id version dumpio log_forensic reqtimeout socache_shmcb unixd proxy_fcgi slotmem_shm ratelimit remoteip" APACHE2_MPMS="worker" CURL_SSL="openssl" ELIBC="glibc" FFTOOLS="cws2fws qt-faststart aviocat ismindex" GRUB_PLATFORMS="pc" KERNEL="linux" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2 python3_3" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" USERLAND="GNU" VIDEO_CARDS="dummy"
USE_PYTHON="2.7 3.2 3.3"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC

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

www-servers/apache-2.4.9-r2 was built with the following:
USE="ldap ssl threads -debug -doc (-selinux) -static -suexec" APACHE2_MODULES="actions alias asis auth_basic auth_digest 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 cern_meta cgi cgid charset_lite dav dav_fs dav_lock dbd deflate dir dumpio env expires ext_filter file_cache filter headers ident imagemap include info log_config log_forensic logio mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_fcgi proxy_ftp proxy_http ratelimit remoteip reqtimeout rewrite setenvif slotmem_shm socache_shmcb speling status substitute unique_id unixd userdir usertrack version vhost_alias -access_compat -cache_disk -lbmethod_bybusyness -lbmethod_byrequests -lbmethod_bytraffic -lbmethod_heartbeat -proxy_scgi" APACHE2_MPMS="worker -event -itk -peruser -prefork"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--no-as-needed"
Comment 1 Lars Wendler (Polynomial-C) gentoo-dev 2014-05-19 12:03:31 UTC
Indeed quite strange. I cannot reproduce it and thus do not even know where to start looking for this problem.
Comment 2 Thomas Beutin 2014-05-19 15:29:49 UTC
(In reply to Lars Wendler (Polynomial-C) from comment #1)
> Indeed quite strange. I cannot reproduce it and thus do not even know where
> to start looking for this problem.

same for me. could this be related to a quite big machine? w/o SSL it just works.
Comment 3 Thomas Beutin 2014-05-28 15:27:16 UTC
(In reply to Thomas Beutin from comment #2)
> (In reply to Lars Wendler (Polynomial-C) from comment #1)
> > Indeed quite strange. I cannot reproduce it and thus do not even know where
> > to start looking for this problem.
> 
> same for me. could this be related to a quite big machine? w/o SSL it just
> works.

...the remainig processes are easy to kill by a SIGHUP...
Comment 4 Lars Wendler (Polynomial-C) gentoo-dev 2019-04-20 14:00:27 UTC
Is this still an issue with current apache versions?
Comment 5 Leho Kraav (:macmaN @lkraav) 2019-04-20 15:17:34 UTC
I haven't been able to restart my main server Apache instance in a timely fashion for years. `systemctl restart apache2` always has had to wait all the way to timeout, then SIGKILL the processes. Current:

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

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

I have a suspicion it could by `mod_wsgi` / Python related. My laptop localhost apache is doing much better, but isn't serving any Python apps via mod_wsgi.