Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#902658: apache2: apachectl graceful/restart results in segfault

115 views
Skip to first unread message

gregor herrmann

unread,
Jul 8, 2018, 6:50:02 PM7/8/18
to
On Fri, 29 Jun 2018 10:35:32 +0200, mer.at wrote:

> Package: apache2
> Version: 2.4.33-3+b1
> Severity: grave
> Tags: a11y
> Justification: renders package unusable
>
> Dear Maintainer,
>
> when i do an "apachectl graceful" or "apachectl restart", i get
> segfaults.


Same here.
As graceful restarts happen on all kinds of package updates but also
during the daily logrotate, this is quit problematic.

[Mon Jul 09 00:29:00.690201 2018] [mpm_prefork:notice] [pid 25910] AH00163: Apache/2.4.33 (Debian) SVN/1.10.0 mod_fcgid/2.3.9 mod_jk/1.2.43 OpenSSL/1.1.0h mod_wsgi/4.5.17 Python/2.7 configured -- resuming normal operations
[Mon Jul 09 00:29:00.690266 2018] [core:notice] [pid 25910] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jul 09 00:29:01.704980 2018] [core:notice] [pid 25910] AH00051: child pid 12011 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Mon Jul 09 00:29:01.705096 2018] [cgid:error] [pid 25910] AH01239: cgid daemon process died, restarting
[Mon Jul 09 00:29:01.707171 2018] [core:notice] [pid 25910] AH00051: child pid 12012 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Mon Jul 09 00:29:01.707220 2018] [fcgid:error] [pid 25910] mod_fcgid: fcgid process manager died, restarting the server
[Mon Jul 09 00:29:01.800253 2018] [core:error] [pid 25910] AH00546: no record of generation 0 of exiting child 12167
[Mon Jul 09 00:29:03.063634 2018] [mpm_prefork:notice] [pid 25910] AH00173: SIGHUP received. Attempting to restart


Cheers,
gregor

--
.''`. https://info.comodo.priv.at -- Debian Developer https://www.debian.org
: :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D 85FA BB3A 6801 8649 AA06
`. `' Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe
`- NP: Bjørn Berge: Buena
signature.asc

Christian Marillat

unread,
Jul 9, 2018, 3:00:03 AM7/9/18
to
On 09 juil. 2018 00:45, gregor herrmann <gre...@debian.org> wrote:

> On Fri, 29 Jun 2018 10:35:32 +0200, mer.at wrote:
>
>> Package: apache2
>> Version: 2.4.33-3+b1
>> Severity: grave
>> Tags: a11y
>> Justification: renders package unusable

[...]

> [Mon Jul 09 00:29:01.707220 2018] [fcgid:error] [pid 25910] mod_fcgid:
> fcgid process manager died, restarting the server
> [Mon Jul 09 00:29:01.800253 2018] [core:error] [pid 25910] AH00546: no
> record of generation 0 of exiting child 12167
> [Mon Jul 09 00:29:03.063634 2018] [mpm_prefork:notice] [pid 25910]
> AH00173: SIGHUP received. Attempting to restart

I see also the same bug.

After I've disabled mod_fcgid the crash is gone.

Christian

bruno.pomar

unread,
Jul 10, 2018, 8:50:02 AM7/10/18
to
I have the same problem with the same Debian and Apache2 version
(upgrade testing/buster 2018/07/07):


/var/log/kern.log:

Jul 9 18:25:28 eussa kernel: [12436.633037] /usr/sbin/apach[12386]: segfault at 7f5c82d98660 ip 00007f5c82d98660 sp 00007ffcfaf711f8 error 14 in libcap-ng.so.0.0.0[7f5c82d70000+200000]
Jul 9 18:25:28 eussa kernel: [12436.708687] /usr/sbin/apach[12387]: segfault at 7f5c82d98660 ip 00007f5c82d98660 sp 00007ffcfaf72628 error 14 in libcap-ng.so.0.0.0[7f5c82d70000+200000]


But for me, the culprit was "nscd", if i start or restart apache2 with
service "nscd" started, i have a segfault.

If i stop "nscd", apache2 start normaly and after i can start
"nscd". But after a new "apache2 restart" produce a segfault.



ii apache2 2.4.33-3+b1
ii apache2-bin 2.4.33-3+b1
ii apache2-data 2.4.33-3
ii apache2-dev 2.4.33-3+b1
ii apache2-doc 2.4.33-3
ii apache2-utils 2.4.33-3+b1
ii libapache2-mod-apreq2 2.13-5+b2
ii libapache2-mod-authnz-pam 1.1.0-1
ii libapache2-mod-perl2 2.0.10-2+b1
ii libapache2-reload-perl 0.13-1
ii libapache2-request-perl 2.13-5+b2

ii nscd 2.27-3

# apachectl -M
Loaded Modules:
core_module (static)
so_module (static)
watchdog_module (static)
http_module (static)
log_config_module (static)
logio_module (static)
version_module (static)
unixd_module (static)
alias_module (shared)
apreq_module (shared)
auth_basic_module (shared)
authn_core_module (shared)
authn_file_module (shared)
authnz_pam_module (shared)
authz_core_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
cgid_module (shared)
deflate_module (shared)
dir_module (shared)
env_module (shared)
filter_module (shared)
include_module (shared)
mime_module (shared)
mpm_event_module (shared)
negotiation_module (shared)
perl_module (shared)
reqtimeout_module (shared)
setenvif_module (shared)
status_module (shared)
unique_id_module (shared)
userdir_module (shared)






--
+-----------------------------------------------------------------------+
. Mèl. bruno pomar à aviation-civile gouv fr
. Tél. +33 (0)2 98 37 32 65 --- Fax. +33 (0)2 98 37 35 04
. CRNA Ouest, Service T, Subdivision QI

gregor herrmann

unread,
Jul 17, 2018, 5:40:02 PM7/17/18
to
On Tue, 17 Jul 2018 21:31:31 +0200, Stefan Fritsch wrote:

> Thanks, Gregor. Unfortunately, that is not helpful, yet. Please try again with
> ldd instead of readelf -d.

Sure, here we go:

# pid=6855; for i in $(awk '{ print $6 }' < /proc/$pid/maps|sort -u|grep /) ; do ldd $i|grep libcap && echo $i ; done
ldd: /dev/zero: not regular file
libcap-ng.so.0 => /lib/x86_64-linux-gnu/libcap-ng.so.0 (0x00007fbe2acee000)
/lib/x86_64-linux-gnu/libaudit.so.1.0.0
libcap-ng.so.0 => /lib/x86_64-linux-gnu/libcap-ng.so.0 (0x00007fb5307e0000)
/lib/x86_64-linux-gnu/libpam.so.0.83.1
ldd: /SYSV6400005e: No such file or directory
libcap-ng.so.0 => /lib/x86_64-linux-gnu/libcap-ng.so.0 (0x00007f089b471000)
/usr/lib/libc-client.so.2007e.0
libcap-ng.so.0 => /lib/x86_64-linux-gnu/libcap-ng.so.0 (0x00007f7a0a0da000)
/usr/lib/php/20170718/imap.so


Cheers,
gregor

--
.''`. https://info.comodo.priv.at -- Debian Developer https://www.debian.org
: :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D 85FA BB3A 6801 8649 AA06
`. `' Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe
`- NP: Elliott Sharp: Bad Taste
signature.asc

Kai-Martin Knaak

unread,
Jul 23, 2018, 8:50:02 PM7/23/18
to
Similar problem here. My apache2 server goes into a reload loop every
time /etc/logrotate.d/apache2 is called. That is, daily a few minutes
after midnight. The loop is triggered by the reload statement in the
logrotate script.
As a band-aid I just replaced "reload" by "restart" in the logrotate script.

In my case kern.log attributes the segfault to libglib-2.0:

# tail -n 1 /var/log/kern.log
Jul 24 02:22:39 bibo kernel: [175623.347801] /usr/sbin/apach[8662]: segfault at 7fb516473660 ip 00007fb516473660 sp 00007ffe8b10e508 error 14 in libglib-2.0.so.0.5600.1[7fb516dac000+113000]

If I apply the /proc/$pid/maps|sort search with ldd I get:

# pid=770; for i in $(awk '{ print $6 }' < /proc/$pid/maps|sort -u|grep /) ; do ldd -d $i|grep libglib && echo $i ; done
ldd: /dev/zero: not regular file
ldd: /SYSV6405bf18: No such file or directory
libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fcfb3308000)
/usr/lib/php/20170718/imagick.so
libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f0a395be000)
/usr/lib/x86_64-linux-gnu/liblqr-1.so.0.3.2
libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f2b15ea5000)
/usr/lib/x86_64-linux-gnu/libMagickCore-6.Q16.so.5.0.0
libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fa7bdb1c000)
/usr/lib/x86_64-linux-gnu/libMagickWand-6.Q16.so.5.0.0

---<)kaimartin(>---

--
Kai-Martin Knaak
Email: k...@familieknaak.de
Öffentlicher PGP-Schlüssel:
https://keyserver.ubuntu.com/pks/lookup?op=index&search=0x7B0F9882
0 new messages