apachectl configtest segmentation fault

Bug #1854395 reported by Roberto Nunnari on 2019-11-28

This bug report will be marked for expiration in 54 days if no further activity occurs. (find out why)

This bug affects 1 person
Affects Status Importance Assigned to Milestone
apache2 (Ubuntu)

Bug Description



Yesterday I did apt upgrade and after that I noticed that ‘apachectl configtest’ segfaults.

# apache2ctl configtest
Syntax OK
Segmentation fault (core dumped)
Action 'configtest' failed.
The Apache error log may have more information.

Don’t get nothing more in apache error logs, but in syslog (and also in journalctl -xe) I have:

Nov 28 15:30:54 ariel kernel: [ 3060.544873] /usr/sbin/apach[7099]: segfault at 7fa10c902510 ip 00007fa10c902510 sp 00007ffc4d12cc38 error 14 in libnss_files-2.23.so[7fa10ffc4000+b000]

Yesterday upgrades:
2019-11-27 18:14:23 upgrade libnss3-nssdb:all 2:3.28.4-0ubuntu0.16.04.6 2:3.28.4-0ubuntu0.16.04.8
2019-11-27 18:14:25 upgrade libnss3:amd64 2:3.28.4-0ubuntu0.16.04.6 2:3.28.4-0ubuntu0.16.04.8

My env:
# cat /etc/issue
Ubuntu 16.04.6 LTS \n \l

The good part is that I can still use apache with 'apachectl start'
Any hints?

Thank you and best regards.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: apache2-bin 2.4.18-2ubuntu3.14
ProcVersionSignature: Ubuntu 4.4.0-169.198-generic 4.4.197
Uname: Linux 4.4.0-169-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.21
Architecture: amd64
Date: Thu Nov 28 20:56:04 2019
InstallationDate: Installed on 2017-02-10 (1020 days ago)
InstallationMedia: Ubuntu-Server 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
SourcePackage: apache2
UpgradeStatus: No upgrade log present (probably fresh install)

Tom Reynolds (tomreyn) wrote :

I'm not sure why I missed this when we were looking into it on IRC, but this is apparently something involving the openssl and nss crypto libraries / frameworks. I'm not enough of a developer to understand what exactly seems to be the problem, though, but knowing that apache httpd supports HTTPS with not just openssl I'd check which of these modules are enabled, and maybe make sure only one of them is used temporarily while you check whether you can still reproduce. I.e. look for 'ssl' (openssl) and something 'nss'-like in /etc/apache2/modes-enabled/ and maybe try disabling or re-enabling one of those.

I also think you should still try to
  sudo apport-collect 1854395
after reproducing this segfault.

Hi Tom.

The ssl apache module is enabled
There's nothing about nss in mods-enabled/ (but kernel message mentions libnss_files-2.23.so

When the ssl apache module is disabled, apachectl configtest works.
When the ssl apache module is enabled, apachectl configtest fails with segmentation fault.

About apport-collect.. I installed it and tried to run "apport-collect 1854395", it opens links but it will not let me login.

Thank you and best regards


I just:
1) apt install libapache2-mod-nss
2) a2enmod nss
3) systemctl restart apache2.service

but nothing has changed.. so I'm now going to disable and deinstall libapache2-mod-nss

Tom Reynolds (tomreyn) wrote :

Hmm, sorry for putting you on the wrong path there.

We'll now need to wait for a developer / package maintainer to have a look at this.

I just found the config line that makes it crash:

Include /etc/request-tracker4/apache2-modperl2.conf
I still have to look into it, but for now I commented it out.


Paride Legovini (legovini) wrote :

Hello Roberto,

The segfault you observed is very likely to be a bug, however I tried to reproduce it by installing/enabling request-tracker4, rt4-apache2, libapache2-mod-nss and few other things on Xenial but without success. Is there anything relevant I could try to trigger the crash?

If I understand correctly you started experiencing the problem after an upgrade, so you don't have the steps to reproduce handry from a fresh setup. We could be lucky with a strace: could you please uncomment the Include (and so get apache2ctl crash again), then run

  sudo strace apache2ctl configtest

and attach the output to this report? Before making it public better check it doesn't contain private information.

As we're waiting for additional information I'm setting the report status to Incomplete, please set the status back to New after replying. Thanks!

Changed in apache2 (Ubuntu):
status: New → Incomplete
Download full text (5.3 KiB)

Hello Paride.

I don't know what else may be relevant to trigger the crash.
libapache2-mod-nss is not relevant at all.. I just installed it in an attemt to fix the problem but it didn't help.

I'm willing to help debug this, but I need guidance. So please don't hesitate to ask.

I will now copy/paste here the output of strace as you suggested.

#strace apache2ctl configtest > /root/out 2> /root/err

# cat /root/out
Action 'configtest' failed.
The Apache error log may have more information.

# cat /root/err
execve("/usr/sbin/apache2ctl", ["apache2ctl", "configtest"], [/* 22 vars */]) = 0
brk(NULL) = 0x55fa99d60000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=37741, ...}) = 0
mmap(NULL, 37741, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fe1fd4cd000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\t\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1868984, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe1fd4cc000
mmap(NULL, 3971488, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe1fcee8000
mprotect(0x7fe1fd0a8000, 2097152, PROT_NONE) = 0
mmap(0x7fe1fd2a8000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1c0000) = 0x7fe1fd2a8000
mmap(0x7fe1fd2ae000, 14752, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe1fd2ae000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe1fd4cb000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe1fd4ca000
arch_prctl(ARCH_SET_FS, 0x7fe1fd4cb700) = 0
mprotect(0x7fe1fd2a8000, 16384, PROT_READ) = 0
mprotect(0x55fa98cbc000, 8192, PROT_READ) = 0
mprotect(0x7fe1fd4d7000, 4096, PROT_READ) = 0
munmap(0x7fe1fd4cd000, 37741) = 0
getuid() = 0
getgid() = 0
getpid() = 25420
rt_sigaction(SIGCHLD, {0x55fa98ab0540, ~[RTMIN RT_1], SA_RESTORER, 0x7fe1fcf1d4b0}, NULL, 8) = 0
geteuid() = 0
brk(NULL) = 0x55fa99d60000
brk(0x55fa99d81000) = 0x55fa99d81000
getppid() = 25418
stat("/etc/apache2/sites-enabled", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat(".", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/sbin/apache2ctl", O_RDONLY) = 3
fcntl(3, F_DUPFD, 10) = 10
close(3) = 0
fcntl(10, F_SETFD, FD_CLOEXEC) = 0
geteuid() = 0
getegid() = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x55fa98ab0540, ~[RTMIN RT_1], SA_RESTORER, 0x7fe1fcf1d4b0...


To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers