Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 520386 - www-servers/apache - /usr/sbin/apache2: segmentation fault in fill_out_finfo (finfo=0x720c8, info=0x747e0, wanted=<optimized out>) at file_io/unix/filestat.c:110
Summary: www-servers/apache - /usr/sbin/apache2: segmentation fault in fill_out_finfo ...
Status: RESOLVED DUPLICATE of bug 520268
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: ARM Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-21 07:56 UTC by Fab
Modified: 2014-10-12 21:12 UTC (History)
0 users

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 Fab 2014-08-21 07:56:01 UTC
Hi,

I installed gentoo on a cubieboard2 (Dual-Core Cortex-A7 ARM CPU).
I'm trying to start apache-2.2.27-r4, but it always fails with segfault :

> # /etc/init.d/apache2 start
> /etc/init.d/apache2: line 60:  1158 Segmentation fault      ${APACHE2} ${APACHE2_OPTS} -t > /dev/null 2>&1
> * apache2 has detected an error in your setup:
> /etc/init.d/apache2: line 60:  1162 Segmentation fault      ${APACHE2} ${APACHE2_OPTS} -t
>  * ERROR: apache2 failed to start

Trying to run the server through strace gives me :
> open("/var/log/apache2/startuperror.log", O_WRONLY|O_CREAT|O_APPEND|O_LARGEFILE|O_CLOEXEC, 0666) = 3
> fcntl64(3, F_GETFD)                     = 0x1 (flags FD_CLOEXEC)
> dup3(3, 2, 0)                           = 2
> close(3)                                = 0
> stat64("/etc/apache2/httpd.conf", {st_mode=S_IFREG|0644, st_size=6353, ...}) = 0
> --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x74} ---
> +++ killed by SIGSEGV +++

I tried apache-2.4.10-r1, same error.
I tried emerge -e world and reboot, same error.
emerge --info will follow.
Comment 1 Fab 2014-08-21 07:56:28 UTC
# emerge --info
Portage 2.2.8-r1 (default/linux/arm/13.0/armv7a, gcc-4.7.3, glibc-2.19-r1, 3.4.79+ armv7l)
=================================================================
System uname: Linux-3.4.79+-armv7l-ARMv7_Processor_rev_4_-v7l-with-gentoo-2.2
KiB Mem:      896792 total,    577324 free
KiB Swap:     262140 total,    262140 free
Timestamp of tree: Wed, 20 Aug 2014 07:15:01 +0000
ld GNU ld (Gentoo 2.23.2 p1.0) 2.23.2
distcc 3.1 armv7a-hardfloat-linux-gnueabi [enabled]
app-shells/bash:          4.2_p45
dev-lang/python:          2.7.7, 3.3.5-r1
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.69
sys-devel/automake:       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-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.13 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo
ACCEPT_KEYWORDS="arm"
ACCEPT_LICENSE="* -@EULA"
CBUILD="armv7a-hardfloat-linux-gnueabi"
CFLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
CHOST="armv7a-hardfloat-linux-gnueabi"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /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="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
DISTDIR="/portage/distfiles/"
FCFLAGS="-O2 -pipe -march=armv7-a"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distcc distcc-pump distlocks ebuild-locks fail-clean fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe -march=armv7-a"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="fr_FR.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/portage/packages/armv7-a/"
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="/portage/trees/gentoo"
PORTDIR_OVERLAY=""
USE="apache2 arm berkdb bzip2 cli cracklib crypt cxx dri fortran gdbm iconv ipv6 minimal modules mysql ncurses nls nptl openmp pam pcre readline session ssl tcpd unicode zlib" 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="fr" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" 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:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2014-08-21 11:41:00 UTC
strace doesn't give any insight in segmentation faults. Please obtain a gdb backtrace instead.
Comment 3 Fab 2014-08-21 18:01:59 UTC
Yes, I know. Just needed some time to rebuild some packages with debug symbols.
I rebuilt glibc, apr, apr-util and apache. Then SIGSEGV changed to SIGILL :

> (gdb) run
> Starting program: /usr/sbin/apache2 -D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PHP5 -d /usr/lib/apache2 -f /etc/apache2/httpd.conf -E /var/log/apache2/startuperror.log -t
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/libthread_db.so.1".
> 
> Program received signal SIGILL, Illegal instruction.
> 0x0005016c in ?? ()
> (gdb) bt
> #0  0x0005016c in ?? ()
> #1  0xb6d4ae94 in fill_out_finfo (finfo=0x720c8, info=0x747e0, wanted=<optimized out>) at file_io/unix/filestat.c:110
> #2  0x00000000 in ?? ()

fill_out_finfo belongs to dev-libs/apr. Is that enough ?
I can try to get a core dump but I need to rebuild the kernel.
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2014-08-22 07:42:40 UTC

*** This bug has been marked as a duplicate of bug 520268 ***
Comment 5 Fab 2014-10-12 12:31:35 UTC
Sorry for reopening this, but, after some weeks, I give it a new try by uninstalling and rebuilding apache and its dependencies :
 - www-servers/apache-2.2.27-r4
 - dev-libs/apr-1.5.0-r2
 - dev-libs/apr-util-1.5.3-r2
And now I'm getting a totally unrelated backtrace. I don't know why I did not get this the first time. What do you think ?



# env LANG=C gdb --args /usr/sbin/apache2 -D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PHP5 -d /usr/lib/apache2 -f /etc/apache2/httpd.conf -E /var/log/apache2/startuperror.log -t
GNU gdb (Gentoo 7.6.2 p1) 7.6.2
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "armv7a-hardfloat-linux-gnueabi".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /usr/sbin/apache2...Reading symbols from /usr/lib/debug/usr/sbin/apache2.debug...done.
done.
(gdb) run
Starting program: /usr/sbin/apache2 -D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PHP5 -d /usr/lib/apache2 -f /etc/apache2/httpd.conf -E /var/log/apache2/startuperror.log -t
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
apr_palloc (pool=pool@entry=0x74c20, in_size=in_size@entry=12) at memory/unix/apr_pools.c:684
684	memory/unix/apr_pools.c: No such file or directory.
(gdb) bt
#0  apr_palloc (pool=pool@entry=0x74c20, in_size=in_size@entry=12) at memory/unix/apr_pools.c:684
#1  0x00028de4 in substring_conf (p=p@entry=0x74c20, start=0x790e0 "ServerRoot \"/usr/lib/apache2\"", len=10, quote=quote@entry=0 '\000') at util.c:735
#2  0x00029e9c in ap_getword_conf (p=p@entry=0x74c20, line=0xbefff02c, line@entry=0xbefff024) at util.c:795
#3  0x0003aecc in ap_build_config_sub (p=p@entry=0x74c20, temp_pool=temp_pool@entry=0x720c8, l=l@entry=0x790e0 "ServerRoot \"/usr/lib/apache2\"", parms=parms@entry=0xbefff0a4, 
    current=current@entry=0xbefff070, curr_parent=curr_parent@entry=0xbefff074, conftree=conftree@entry=0x61550 <ap_conftree>) at config.c:983
#4  0x0003b598 in ap_build_config (parms=0xbefff0a4, parms@entry=0xbefff09c, p=p@entry=0x74c20, temp_pool=temp_pool@entry=0x720c8, conftree=conftree@entry=0x61550 <ap_conftree>)
    at config.c:1224
#5  0x0003b850 in process_resource_config_nofnmatch (s=s@entry=0x6fb58, fname=fname@entry=0x74ba8 "/etc/apache2/httpd.conf", conftree=conftree@entry=0x61550 <ap_conftree>, p=0x74c20, 
    p@entry=0x6a0a8, ptemp=ptemp@entry=0x720c8, depth=0) at config.c:1634
#6  0x0003bddc in ap_process_resource_config (s=s@entry=0x6fb58, fname=0x74ba8 "/etc/apache2/httpd.conf", conftree=conftree@entry=0x61550 <ap_conftree>, p=p@entry=0x6a0a8, 
    ptemp=ptemp@entry=0x720c8) at config.c:1666
#7  0x0003c710 in ap_read_config (process=process@entry=0x68128, ptemp=0x720c8, filename=0x3e1c0 <ap_replace_stderr_log+264> "\325\377\377\352", 
    filename@entry=0xb6ff6460 "d\372\377\266", conftree=conftree@entry=0x61550 <ap_conftree>) at config.c:2054
#8  0x000271e8 in main (argc=-1090521586, argv=0xbefff622) at main.c:632
(gdb) quit
A debugging session is active.

	Inferior 1 [process 15351] will be killed.

Quit anyway? (y or n) y
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2014-10-12 21:12:41 UTC
(In reply to Fab from comment #5)
> And now I'm getting a totally unrelated backtrace.

File a new bug report. This one is a duplicate of bug #520268.

*** This bug has been marked as a duplicate of bug 520268 ***