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

Bug 603378

Summary: www-apache/mod_perl - test failure with www-apache/mpm_itk installed: the server is down, giving up after 301 secs
Product: Gentoo Linux Reporter: Thomas Deutschmann <whissi>
Component: Current packagesAssignee: Gentoo Perl team <perl>
Status: RESOLVED CANTFIX    
Severity: normal CC: idl0r, kentnl
Priority: Normal Keywords: TESTFAILURE
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 300119, 607958    
Attachments: build.log
build.log #2

Description Thomas Deutschmann gentoo-dev Security 2016-12-21 20:35:16 UTC
Created attachment 457040 [details]
build.log

I am unable to complete tests on x86:


From /var/tmp/portage/www-apache/mod_perl-2.0.10/work/mod_perl-2.0.10/t/logs/error_log:

> [Wed Dec 21 20:20:24.551854 2016] [ssl:info] [pid 9912] AH01887: Init: Initializing (virtual) servers for SSL
> [Wed Dec 21 20:20:24.551881 2016] [ssl:info] [pid 9912] AH01876: mod_ssl/2.4.23 compiled against Server: Apache/2.4.23, Library: OpenSSL/1.0.2j
> ********************************************************************************
> *** This is a test for Apache2::ServerUtil::server_shutdown_cleanup_register ***
> *** Following a line consisting only of * characters there should be a line  ***
> *** containing                                                               ***
> ***     "cleanup died: testing server_shutdown_cleanup_register".            ***
> *** The next line should then read                                           ***
> ***     "done with server_shutdown_cleanup_register"                         ***
> ********************************************************************************
> Apache2::ServerUtil: cleanup died: testing server_shutdown_cleanup_register
> *** done with server_shutdown_cleanup_register                               ***
> ********************************************************************************
> END in modperl_extra.pl, pid=9912
> [Wed Dec 21 20:20:25.321541 2016] [cgid:error] [pid 9920] (2)No such file or directory: AH01243: Couldn't bind unix domain socket /var/tmp/portage/www-apache/mod_perl-2.0.10/work/mod_perl-2.0.10/t/logs/logs/cgisock.9916
> [Wed Dec 21 20:20:25.321980 2016] [ssl:warn] [pid 9916] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
> [Wed Dec 21 20:20:25.321992 2016] [ssl:info] [pid 9916] AH01887: Init: Initializing (virtual) servers for SSL
> [Wed Dec 21 20:20:25.322000 2016] [ssl:info] [pid 9916] AH01876: mod_ssl/2.4.23 compiled against Server: Apache/2.4.23, Library: OpenSSL/1.0.2j
> [Wed Dec 21 20:20:25.335508 2016] [:info] [pid 9921] Installing seccomp filter failed (probably due to too old kernel); unable to restrict setuid privileges. Error was: Permission denied
> [Wed Dec 21 20:20:25.335707 2016] [mpm_prefork:notice] [pid 9916] AH00163: Apache/2.4.23 (Unix) world domination series/2.0 OpenSSL/1.0.2j mpm-itk/2.4.7-04 mod_perl/2.0.10 Perl/v5.22.2 configured -- resuming normal operations
> [Wed Dec 21 20:20:25.335719 2016] [mpm_prefork:info] [pid 9916] AH00164: Server built: Dec 21 2016 20:18:59
> [Wed Dec 21 20:20:25.335739 2016] [core:notice] [pid 9916] AH00094: Command line: '/usr/sbin/apache2 -d /var/tmp/portage/www-apache/mod_perl-2.0.10/work/mod_perl-2.0.10/t -f /var/tmp/portage/www-apache/mod_perl-2.0.10/work/mod_perl-2.0.10/t/conf/httpd.conf -D APACHE2 -D APACHE2_4'
> [Wed Dec 21 20:20:25.335857 2016] [cgid:crit] [pid 9916] AH01238: cgid daemon failed to initialize
> [Wed Dec 21 20:20:25.335870 2016] [:info] [pid 9922] Installing seccomp filter failed (probably due to too old kernel); unable to restrict setuid privileges. Error was: Permission denied
> [Wed Dec 21 20:20:26.119277 2016] [mpm_itk:warn] [pid 9926] (itkmpm: pid=9926 uid=250, gid=250) itk_post_perdir_config(): initgroups(portage, 250): Operation not permitted
> [...]
> [Wed Dec 21 20:20:58.352155 2016] [mpm_itk:warn] [pid 9958] (itkmpm: pid=9958 uid=250, gid=250) itk_post_perdir_config(): initgroups(portage, 250): Operation not permitted
> [Wed Dec 21 20:20:59.358940 2016] [mpm_itk:warn] [pid 9959] (itkmpm: pid=9959 uid=250, gid=250) itk_post_perdir_config(): initgroups(portage, 250): Operation not permitted
> [Wed Dec 21 20:20:59.359075 2016] [:info] [pid 9960] Installing seccomp filter failed (probably due to too old kernel); unable to restrict setuid privileges. Error was: Permission denied
> [Wed Dec 21 20:21:00.366029 2016] [mpm_itk:warn] [pid 9961] (itkmpm: pid=9961 uid=250, gid=250) itk_post_perdir_config(): initgroups(portage, 250): Operation not permitted
> [Wed Dec 21 20:21:01.373176 2016] [mpm_itk:warn] [pid 9962] (itkmpm: pid=9962 uid=250, gid=250) itk_post_perdir_config(): initgroups(portage, 250): Operation not permitted
> [Wed Dec 21 20:21:02.380447 2016] [mpm_itk:warn] [pid 9963] (itkmpm: pid=9963 uid=250, gid=250) itk_post_perdir_config(): initgroups(portage, 250): Operation not permitted
> [...]
> [Wed Dec 21 20:21:39.631972 2016] [mpm_itk:warn] [pid 10000] (itkmpm: pid=10000 uid=250, gid=250) itk_post_perdir_config(): initgroups(portage, 250): Operation not permitted
> [...]
Comment 1 Thomas Deutschmann gentoo-dev Security 2016-12-21 20:35:42 UTC
# emerge --info
Portage 2.3.0 (python 3.4.5-final-0, default/linux/x86/13.0, gcc-4.9.4, glibc-2.22-r4, 4.4.26-gentoo i686)
=================================================================
System uname: Linux-4.4.26-gentoo-i686-Intel-R-_Core-TM-_i7-3770K_CPU_@_3.50GHz-with-gentoo-2.2
KiB Mem:     3108776 total,   1319660 free
KiB Swap:     488276 total,    475812 free
Timestamp of repository gentoo: Wed, 21 Dec 2016 08:22:26 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
ccache version 3.2.4 [disabled]
app-shells/bash:          4.3_p48-r1::gentoo
dev-lang/perl:            5.22.2::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/ccache:          3.2.4::gentoo
dev-util/cmake:           3.5.2-r1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.22.4::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.69::gentoo
sys-devel/automake:       1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.4::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.22-r4::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000


ABI="x86"
ABI_X86="32"
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
ACCEPT_PROPERTIES="*"
ACCEPT_RESTRICT="*"
ARCH="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=ivybridge -mtune=ivybridge -mno-xsaveopt"
CHOST="i686-pc-linux-gnu"
CHOST_x86="i686-pc-linux-gnu"
COLLISION_IGNORE="/lib/modules/* *.py[co] *$py.class */dropin.cache"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3"
CXXFLAGS="-O2 -pipe -march=ivybridge -mtune=ivybridge -mno-xsaveopt"
DEFAULT_ABI="x86"
EDITOR="/usr/bin/mcedit"
ELIBC="glibc"
EPREFIX=""
EROOT="/"
EVENT_NOEPOLL="1"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs cgroup config-protect-if-modified distlocks downgrade-backup ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -march=i686 -pipe"
GCC_SPECS=""
GRUB_PLATFORMS="efi-32 pc"
GUILE_LOAD_PATH="/usr/share/guile/1.8"
HOME="/root"
INFOPATH="/usr/share/info:/usr/share/gcc-data/i686-pc-linux-gnu/4.9.4/info:/usr/share/binutils-data/i686-pc-linux-gnu/2.25.1/info"
INPUT_DEVICES="keyboard mouse evdev"
IUSE_IMPLICIT="abi_x86_32 prefix prefix-guest"
KERNEL="linux"
L10N="en en-US de de-DE"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LC_MESSAGES="C"
LC_PAPER="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LIBDIR_x86="lib"
LINGUAS="en de"
LOGNAME="root"
MAIL="/var/mail/root"
MAKEOPTS="--jobs 5 --load-average 7.95"
MULTILIB_ABIS="x86"
MULTIOSDIRS="../lib"
NOCOLOR="true"
OFFICE_IMPLEMENTATION="libreoffice"
PAGER="/usr/bin/less"
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.9.4"
PHP_TARGETS="php5-6"
PWD="/root"
PYTHONDONTWRITEBYTECODE="1"
PYTHON_SINGLE_TARGET="python2_7"
PYTHON_TARGETS="python2_7 python3_4"
ROOT="/"
ROOTPATH="/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.9.4"
RUBY_TARGETS="ruby21"
SHELL="/bin/bash"
SHLVL="2"
SSH_TTY="/dev/pts/0"
TERM="screen"
TMUX="/tmp/tmux-0/default,4333,0"
TMUX_PANE="%6"
USER="root"
USERLAND="GNU"
VIDEO_CARDS="intel"
Comment 2 Thomas Deutschmann gentoo-dev Security 2016-12-21 20:38:11 UTC
Please advise if I should ignore the problem and continue stabilization (see bug 597824) on x86.

Failure is also present in current stable =www-apache/mod_perl-2.0.10_pre201601 so it isn't a regression from =www-apache/mod_perl-2.0.10.
Comment 3 Andreas K. Hüttel gentoo-dev 2016-12-21 20:57:25 UTC
Please continue with stabilization as this bug is not a regression.
Comment 4 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-01-20 13:52:59 UTC
Workaround of FEATURES="-userpriv"  makes this problem go away, so its more a problem that the tests expect privileges to run, not that the code is broken.
Comment 5 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-01-20 14:07:49 UTC
ugh. -userpriv is just hiding the problem, tests self-disable without it.
Comment 6 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-01-20 15:00:57 UTC
ok, it looks like this specific failure mode is caused by www-apache/mpm_itk being installed, as that module loads and exhibits this bug ( I think )

https://lists.err.no/pipermail/mpm-itk/2016-December/001067.html

Can you confirm that the test either passes or fails in a significantly different manner without mpm_itk installed?
Comment 7 Thomas Deutschmann gentoo-dev Security 2017-01-20 20:33:56 UTC
Created attachment 460770 [details]
build.log #2

New build.log without www-apache/mpm_itk.

Test suite runs without www-apache/mpm_itk. However, now we are getting failing tests:

Test Summary Report
-------------------
t/apache/read.t                       (Wstat: 0 Tests: 1 Failed: 1)
  Failed test:  1
t/filter/in_bbs_inject_header.t       (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: Bad plan.  You planned 36 tests but ran 0.
Files=245, Tests=2593, 156 wallclock secs ( 0.33 usr  1.81 sys + 85.99 cusr 49.93 csys = 138.06 CPU)
Result: FAIL
Failed 2/245 test programs. 1/2593 subtests failed.
[warning] server localhost:8529 shutdown
[  error] error running tests (please examine t/logs/error_log)
+--------------------------------------------------------+
| Please file a bug report: http://perl.apache.org/bugs/ |
+--------------------------------------------------------+
Makefile:1072: recipe for target 'run_tests' failed
make: *** [run_tests] Error 1
Comment 8 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-01-21 06:53:57 UTC
Excellent. :)

Just means we have to add 

DEPEND="test? ( !www-apache/mpm_itk )" 

And then work out why it fails this way.

My understanding is that mpm_itk needs apache
to spawn as UID=root, but the tests themselves
skip when run as UID=root, making mpm_itk and
mod_perl's test suite mutually exclusive. 

The annoying thing here is that the only dependent of mpm_itk: app-backup/backuppc also uses mod_perl.
Comment 9 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-02-02 00:07:33 UTC
Residual test failures are probably better off described in a new bug.

commit:  cf9fef3ca4b6cf1c6cec68e4be1a5969186a03c3
author:  2017-02-02 00:05:26 +0000 Kent Fredric <kentnl@gentoo.org>
commit:  2017-02-02 00:06:03 +0000 Kent Fredric <kentnl@gentoo.org>
gpg-key: E854324B1366A820

    www-apache/mod_perl: Block testing with mpm-itk installed re bug #603378

    mpm_itk needs root or things running apache as non-root fail.
    mod_perl tests needs to be not run as root or it will skip tests.
    
    Therefor, mod_perl's tests and mpm_itk can't coexist.
    
    Bug: https://bugs.gentoo.org/603378
Comment 10 Andreas K. Hüttel gentoo-dev 2017-04-23 21:05:07 UTC
(In reply to Kent Fredric (IRC: kent\n) from comment #9)
> Residual test failures are probably better off described in a new bug.
> 
> commit:  cf9fef3ca4b6cf1c6cec68e4be1a5969186a03c3
> author:  2017-02-02 00:05:26 +0000 Kent Fredric <kentnl@gentoo.org>
> commit:  2017-02-02 00:06:03 +0000 Kent Fredric <kentnl@gentoo.org>
> gpg-key: E854324B1366A820
> 
>     www-apache/mod_perl: Block testing with mpm-itk installed re bug #603378
> 
>     mpm_itk needs root or things running apache as non-root fail.
>     mod_perl tests needs to be not run as root or it will skip tests.
>     
>     Therefor, mod_perl's tests and mpm_itk can't coexist.
>     
>     Bug: https://bugs.gentoo.org/603378