Project

General

Profile

Bug #8204

apache2-mod-perl crashes out of the box

Added by Anonymous about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Category:
Aports
Target version:
Start date:
11/27/2017
Due date:
% Done:

0%

Estimated time:
Affected versions:
Security IDs:

Description

Below is a transcript of spawning an Alpine Linux edge container, in which I try to get Apache's mod_perl to work:

$ docker run --cap-add=SYS_PTRACE -ti alpine:edge /bin/sh 
/ # echo http://dl-cdn.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories
/ # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
v3.7.0_rc1-92-g51636f3dca [http://dl-cdn.alpinelinux.org/alpine/edge/main]
v3.7.0_rc1-94-gedc7d52f27 [http://dl-cdn.alpinelinux.org/alpine/edge/community]
v3.7.0_rc1-95-g58c2060efd [http://dl-cdn.alpinelinux.org/alpine/edge/testing]
OK: 11743 distinct packages available
/ # apk upgrade
Upgrading critical system libraries and apk-tools:
(1/5) Installing libressl2.6-libcrypto (2.6.3-r0)
(2/5) Installing libressl2.6-libssl (2.6.3-r0)
(3/5) Upgrading apk-tools (2.8.0-r1 -> 2.8.1-r1)
(4/5) Purging libressl2.5-libssl (2.5.5-r3)
(5/5) Purging libressl2.5-libcrypto (2.5.5-r3)
Executing busybox-1.27.2-r2.trigger
Continuing the upgrade transaction with new apk-tools:
(1/3) Upgrading musl (1.1.17-r1 -> 1.1.18-r2)
(2/3) Upgrading busybox (1.27.2-r2 -> 1.27.2-r4)
Executing busybox-1.27.2-r4.post-upgrade
NOTE: /usr/sbin/udhcpd has been moved to the package 'busybox-extras'
(3/3) Upgrading musl-utils (1.1.17-r1 -> 1.1.18-r2)
Executing busybox-1.27.2-r4.trigger
OK: 4 MiB in 11 packages
/ # apk add apache2-mod-perl
(1/9) Installing libuuid (2.31-r0)
(2/9) Installing apr (1.6.3-r0)
(3/9) Installing expat (2.2.5-r0)
(4/9) Installing apr-util (1.6.1-r1)
(5/9) Installing pcre (8.41-r1)
(6/9) Installing apache2 (2.4.29-r1)
Executing apache2-2.4.29-r1.pre-install
(7/9) Installing libbz2 (1.0.6-r6)
(8/9) Installing perl (5.26.1-r1)
(9/9) Installing apache2-mod-perl (2.0.10-r0)
Executing busybox-1.27.2-r4.trigger
OK: 47 MiB in 20 packages
/ # apk add gdb
(1/5) Installing ncurses-terminfo-base (6.0_p20170930-r0)
(2/5) Installing ncurses-terminfo (6.0_p20170930-r0)
(3/5) Installing ncurses-libs (6.0_p20170930-r0)
(4/5) Installing readline (7.0.003-r0)
(5/5) Installing gdb (8.0.1-r3)
Executing busybox-1.27.2-r4.trigger
OK: 61 MiB in 25 packages
/ # gdb `which httpd`
[...]
(gdb) run -e debug -DFOREGROUND
Starting program: /usr/sbin/httpd -e debug -DFOREGROUND
[...]
[Mon Nov 27 11:24:08.816606 2017] [so:debug] [pid 39] mod_so.c(266): AH01575: loaded module perl_module from /var/www/modules/mod_perl.so
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message

Program received signal SIGBUS, Bus error.
0x00007fd2683bd367 in Perl_hfree_next_entry () from /usr/lib/perl5/core_perl/CORE/libperl.so
(gdb) bt
#0  0x00007fd2683bd367 in Perl_hfree_next_entry () from /usr/lib/perl5/core_perl/CORE/libperl.so
#1  0x00007fd2683bd534 in ?? () from /usr/lib/perl5/core_perl/CORE/libperl.so
#2  0x00007fd2683bfb0b in Perl_hv_clear () from /usr/lib/perl5/core_perl/CORE/libperl.so
#3  0x00007fd2686dbf6a in modperl_env_clear () from /var/www/modules/mod_perl.so
#4  0x00007fd2686ced04 in ?? () from /var/www/modules/mod_perl.so
#5  0x00007fd2683f32a8 in Perl_leave_scope () from /usr/lib/perl5/core_perl/CORE/libperl.so
#6  0x00007fd26835cc2b in perl_parse () from /usr/lib/perl5/core_perl/CORE/libperl.so
#7  0x00007fd2686cf3af in modperl_startup () from /var/www/modules/mod_perl.so
#8  0x00007fd2686cf35c in modperl_startup () from /var/www/modules/mod_perl.so
#9  0x00007fd2686cf735 in modperl_init () from /var/www/modules/mod_perl.so
#10 0x00007fd2686cf894 in modperl_hook_init () from /var/www/modules/mod_perl.so
#11 0x000055dca7bb5780 in ap_run_open_logs ()
#12 0x000055dca7b9909f in main ()

As you can see, it crashes with the default configuration in place, trying to initialize Perl.

History

#1 Updated by Francesco Colista about 1 year ago

  • Status changed from New to Resolved
  • Assignee changed from Matt Smith to Francesco Colista

apache2-mod-perl was not rebuilt against perl 5.26.
This has been done in alpine:commit https://git.alpinelinux.org/cgit/aports/commit/?id=1f69ca14
I've tried to replicate the problem with the latest apache2-mod-perl package, and the issue appears to be fixed:

# docker run --cap-add=SYS_PTRACE -ti alpine:edge /bin/sh 
/ # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
v3.7.0_rc1-100-g104946fab8 [http://dl-cdn.alpinelinux.org/alpine/edge/main]
v3.7.0_rc1-98-g5bbb7aaad4 [http://dl-cdn.alpinelinux.org/alpine/edge/community]
OK: 9055 distinct packages available
/ # echo http://dl-cdn.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && apk update && apk upgrade
fetch http://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
v3.7.0_rc1-100-g104946fab8 [http://dl-cdn.alpinelinux.org/alpine/edge/main]
v3.7.0_rc1-98-g5bbb7aaad4 [http://dl-cdn.alpinelinux.org/alpine/edge/community]
v3.7.0_rc1-100-g104946fab8 [http://dl-cdn.alpinelinux.org/alpine/edge/testing]
OK: 11743 distinct packages available
Upgrading critical system libraries and apk-tools:
(1/5) Installing libressl2.6-libcrypto (2.6.3-r0)
(2/5) Installing libressl2.6-libssl (2.6.3-r0)
(3/5) Upgrading apk-tools (2.8.0-r1 -> 2.8.1-r1)
(4/5) Purging libressl2.5-libssl (2.5.5-r3)
(5/5) Purging libressl2.5-libcrypto (2.5.5-r3)
Executing busybox-1.27.2-r2.trigger
Continuing the upgrade transaction with new apk-tools:
(1/3) Upgrading musl (1.1.17-r1 -> 1.1.18-r2)
(2/3) Upgrading busybox (1.27.2-r2 -> 1.27.2-r4)
Executing busybox-1.27.2-r4.post-upgrade
NOTE: /usr/sbin/udhcpd has been moved to the package 'busybox-extras'
(3/3) Upgrading musl-utils (1.1.17-r1 -> 1.1.18-r2)
Executing busybox-1.27.2-r4.trigger
OK: 4 MiB in 11 packages
/ # apk add apache2-mod-perl
(1/9) Installing libuuid (2.31-r0)
(2/9) Installing apr (1.6.3-r0)
(3/9) Installing expat (2.2.5-r0)
(4/9) Installing apr-util (1.6.1-r1)
(5/9) Installing pcre (8.41-r1)
(6/9) Installing apache2 (2.4.29-r1)
Executing apache2-2.4.29-r1.pre-install
(7/9) Installing libbz2 (1.0.6-r6)
(8/9) Installing perl (5.26.1-r1)
(9/9) Installing apache2-mod-perl (2.0.10-r1)
Executing busybox-1.27.2-r4.trigger
OK: 47 MiB in 20 packages
/ # apk add gdb
(1/5) Installing ncurses-terminfo-base (6.0_p20170930-r0)
(2/5) Installing ncurses-terminfo (6.0_p20170930-r0)
(3/5) Installing ncurses-libs (6.0_p20170930-r0)
(4/5) Installing readline (7.0.003-r0)
(5/5) Installing gdb (8.0.1-r3)
Executing busybox-1.27.2-r4.trigger
OK: 61 MiB in 25 packages
/ # gdb `which httpd`
GNU gdb (GDB) 8.0.1
Copyright (C) 2017 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 "x86_64-alpine-linux-musl".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/sbin/httpd...(no debugging symbols found)...done.
(gdb) run -e debug -DFOREGROUND
Starting program: /usr/sbin/httpd -e debug -DFOREGROUND
[Mon Nov 27 16:42:42.410955 2017] [so:debug] [pid 46] mod_so.c(266): AH01575: loaded module mpm_prefork_module from /var/www/modules/mod_mpm_prefork.so
[Mon Nov 27 16:42:42.459254 2017] [so:debug] [pid 46] mod_so.c(266): AH01575: loaded module authn_file_module from /var/www/modules/mod_authn_file.so
[Mon Nov 27 16:42:42.459589 2017] [so:debug] [pid 46] mod_so.c(266): AH01575: loaded module authn_core_module from /var/www/modules/mod_authn_core.so
[Mon Nov 27 16:42:42.459844 2017] [so:debug] [pid 46] mod_so.c(266): AH01575: loaded module authz_host_module from /var/www/modules/mod_authz_host.so
[Mon Nov 27 16:42:42.460044 2017] [so:debug] [pid 46] mod_so.c(266): AH01575: loaded module authz_groupfile_module from /var/www/modules/mod_authz_groupfile.so
[Mon Nov 27 16:42:42.460158 2017] [so:debug] [pid 46] mod_so.c(266): AH01575: loaded module authz_user_module from /var/www/modules/mod_authz_user.so
[Mon Nov 27 16:42:42.460331 2017] [so:debug] [pid 46] mod_so.c(266): AH01575: loaded module authz_core_module from /var/www/modules/mod_authz_core.so
[Mon Nov 27 16:42:42.460488 2017] [so:debug] [pid 46] mod_so.c(266): AH01575: loaded module access_compat_module from /var/www/modules/mod_access_compat.so
[Mon Nov 27 16:42:42.460590 2017] [so:debug] [pid 46] mod_so.c(266): AH01575: loaded module auth_basic_module from /var/www/modules/mod_auth_basic.so
[Mon Nov 27 16:42:42.460710 2017] [so:debug] [pid 46] mod_so.c(266): AH01575: loaded module reqtimeout_module from /var/www/modules/mod_reqtimeout.so
[Mon Nov 27 16:42:42.460867 2017] [so:debug] [pid 46] mod_so.c(266): AH01575: loaded module filter_module from /var/www/modules/mod_filter.so
[Mon Nov 27 16:42:42.460998 2017] [so:debug] [pid 46] mod_so.c(266): AH01575: loaded module mime_module from /var/www/modules/mod_mime.so
[Mon Nov 27 16:42:42.461139 2017] [so:debug] [pid 46] mod_so.c(266): AH01575: loaded module log_config_module from /var/www/modules/mod_log_config.so
[Mon Nov 27 16:42:42.461244 2017] [so:debug] [pid 46] mod_so.c(266): AH01575: loaded module env_module from /var/www/modules/mod_env.so
[Mon Nov 27 16:42:42.461348 2017] [so:debug] [pid 46] mod_so.c(266): AH01575: loaded module headers_module from /var/www/modules/mod_headers.so
[Mon Nov 27 16:42:42.461471 2017] [so:debug] [pid 46] mod_so.c(266): AH01575: loaded module setenvif_module from /var/www/modules/mod_setenvif.so
[Mon Nov 27 16:42:42.461582 2017] [so:debug] [pid 46] mod_so.c(266): AH01575: loaded module version_module from /var/www/modules/mod_version.so
[Mon Nov 27 16:42:42.461685 2017] [so:debug] [pid 46] mod_so.c(266): AH01575: loaded module unixd_module from /var/www/modules/mod_unixd.so
[Mon Nov 27 16:42:42.461794 2017] [so:debug] [pid 46] mod_so.c(266): AH01575: loaded module status_module from /var/www/modules/mod_status.so
[Mon Nov 27 16:42:42.461923 2017] [so:debug] [pid 46] mod_so.c(266): AH01575: loaded module autoindex_module from /var/www/modules/mod_autoindex.so
[Mon Nov 27 16:42:42.462039 2017] [so:debug] [pid 46] mod_so.c(266): AH01575: loaded module dir_module from /var/www/modules/mod_dir.so
[Mon Nov 27 16:42:42.462141 2017] [so:debug] [pid 46] mod_so.c(266): AH01575: loaded module alias_module from /var/www/modules/mod_alias.so
[Mon Nov 27 16:42:42.462259 2017] [so:debug] [pid 46] mod_so.c(266): AH01575: loaded module negotiation_module from /var/www/modules/mod_negotiation.so
[Mon Nov 27 16:42:42.465310 2017] [so:debug] [pid 46] mod_so.c(266): AH01575: loaded module perl_module from /var/www/modules/mod_perl.so
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.17.0.3. Set the 'ServerName' directive globally to suppress this message

Thansk for reporting.
.: Francesco

#2 Updated by Natanael Copa about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF