When mod_python is enabled - even without some real configuration (eg. trac), just the -D PYTHON flag - the Apache process is crashes at every reloads. Reproducible: Always Steps to Reproduce: 1. Install mod_python-3.5.0. 2. Add -D PYTHON to APACHE2_OPTS in /etc/conf.d/apache2 3. Restart Apache with the new configuration. 4. /etc/init.d/apache2 reload. Actual Results: Apache crashes. I found this in the error.log. [Mon Feb 16 14:31:41 2015] [notice] Graceful restart requested, doing restart [Mon Feb 16 14:31:41 2015] [notice] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads. [Mon Feb 16 14:31:41 2015] [notice] mod_python: using mutex_directory /tmp Fatal Python error: PyEval_SaveThread: NULL tstate [Mon Feb 16 14:31:41 2015] [notice] seg fault or similar nasty error detected in the parent process Expected Results: Apache not crashes. I only tested it on amd64. emerge --info Portage 2.2.14 (python 3.4.1-final-0, default/linux/amd64/13.0/no-multilib, gcc-4.8.3, glibc-2.19-r1, 3.17.7-gentoo-syrius x86_64) ================================================================= System uname: Linux-3.17.7-gentoo-syrius-x86_64-Intel-R-_Xeon-R-_CPU_E5640_@_2.67GHz-with-gentoo-2.2 KiB Mem: 3084184 total, 206592 free KiB Swap: 1048572 total, 1037740 free Timestamp of tree: Tue, 10 Feb 2015 09:30:01 +0000 ld GNU ld (Gentoo 2.24 p1.4) 2.24 app-shells/bash: 4.2_p53 dev-lang/perl: 5.20.1-r4 dev-lang/python: 2.7.9-r1, 3.4.1 dev-util/cmake: 2.8.12.2-r1 dev-util/pkgconfig: 0.28-r1 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.13.9 sys-apps/sandbox: 2.6-r1 sys-devel/autoconf: 2.69 sys-devel/automake: 1.11.6-r1, 1.12.6, 1.13.4 sys-devel/binutils: 2.24-r3 sys-devel/gcc: 4.8.3 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4.4 sys-devel/make: 4.0-r1 sys-kernel/linux-headers: 3.16 (virtual/os-headers) sys-libs/glibc: 2.19-r1 Repositories: gentoo x-portage ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=native -mtune=native" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind /var/spool/munin-async/.ssh" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /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=native -mtune=native" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news nodoc noinfo noman parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="hu_HU.UTF-8" LC_ALL="hu_HU.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" PKGDIR="/usr/portage/packages" 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="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" USE="acl amd64 berkdb bzip2 cli cracklib crypt cxx dri fortran gdbm iconv ipv6 libav mmx modules ncurses nls nptl openmp pam pcre readline session sse sse2 ssl tcpd unicode zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="alias auth_basic authn_alias authn_file authz_groupfile authz_host authz_user cache cgi dav dav_fs dav_lock deflate headers proxy proxy_http rewrite setenvif status autoindex dir env log_config logio mime negotiation filter expires substitute" APACHE2_MPMS="prefork" 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" CPU_FLAGS_X86="mmx sse sse2" 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="hu" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" 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, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON
I´ve hit the same problem here, tested wit apache 2.2.27 and 2.2.31, also on amd64: apache2 -V Server version: Apache/2.2.31 (Unix) Server built: Sep 14 2015 09:18:45 Server's Module Magic Number: 20051115:40 Server loaded: APR 1.5.0, APR-Util 1.5.3 Compiled using: APR 1.5.0, APR-Util 1.5.3 Architecture: 64-bit Server MPM: Prefork threaded: no forked: yes (variable process count) Server compiled with.... -D APACHE_MPM_DIR="server/mpm/prefork" -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_SYSVSEM_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D DYNAMIC_MODULE_LIMIT=128 -D HTTPD_ROOT="/usr" -D SUEXEC_BIN="/usr/sbin/suexec" -D DEFAULT_PIDLOG="/var/run/httpd.pid" -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D DEFAULT_LOCKFILE="/var/run/accept.lock" -D DEFAULT_ERRORLOG="logs/error_log" -D AP_TYPES_CONFIG_FILE="/etc/apache2/mime.types" -D SERVER_CONFIG_FILE="/etc/apache2/httpd.conf" Portage 2.2.20.1 (python 2.7.9-final-0, default/linux/amd64/13.0, gcc-4.7.3, glibc-2.19-r1, 3.14.14-gentoo x86_64) ================================================================= System uname: Linux-3.14.14-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E3-1220_v3_@_3.10GHz-with-gentoo-2.2 KiB Mem: 8137148 total, 2527740 free KiB Swap: 2097148 total, 1774684 free Timestamp of repository gentoo: Mon, 14 Sep 2015 04:00:01 +0000 sh bash 4.2_p53 ld GNU ld (GNU Binutils) 2.23.2 app-shells/bash: 4.2_p53::gentoo dev-lang/perl: 5.18.2-r2::gentoo dev-lang/python: 2.7.9-r1::gentoo, 3.2.5-r6::gentoo, 3.3.5-r1::gentoo, 3.4.1::gentoo dev-util/pkgconfig: 0.28-r1::gentoo sys-apps/baselayout: 2.2::gentoo sys-apps/openrc: 0.12.4::gentoo sys-apps/sandbox: 2.6-r1::gentoo sys-devel/autoconf: 2.69::gentoo sys-devel/automake: 1.11.1::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, 1.15::gentoo sys-devel/binutils: 2.23.2::gentoo sys-devel/gcc: 4.7.3-r1::gentoo, 4.8.3::gentoo sys-devel/gcc-config: 1.7.3::gentoo sys-devel/libtool: 2.4.2-r1::gentoo sys-devel/make: 4.0-r1::gentoo sys-kernel/linux-headers: 3.13::gentoo (virtual/os-headers) sys-libs/glibc: 2.19-r1::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://x64.xx-xx.de/gentoo-portage priority: -1000 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/spool/munin-async/.ssh" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks 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" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="de_DE.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j5" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes" 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" USE="acl amd64 berkdb bzip2 cli cracklib crypt cxx dri fortran gdbm iconv ipv6 mmx mmxext modules multilib ncurses nls nptl openmp pam pcre readline seccomp session sse sse2 ssl tcpd unicode zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="svn 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 deflate dir env expires ext_filter filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif status unique_id userdir usertrack vhost_alias asis auth_digest authn_dbd cern_meta charset_lite imagemap substitute version cgi" APACHE2_MPMS="prefork" 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" CPU_FLAGS_X86="mmx mmxext sse sse2" 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="de en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" 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: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON
I have the same problem... emerge --info Portage 2.2.20.1 (python 2.7.10-final-0, default/linux/amd64/13.0, gcc-4.9.3, glibc-2.20-r2, 4.0.5-gentoo x86_64) ================================================================= System uname: Linux-4.0.5-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E7-4830_v2_@_2.20GHz-with-gentoo-2.2 KiB Mem: 2039348 total, 30720 free KiB Swap: 965628 total, 965112 free Timestamp of repository gentoo: Thu, 08 Oct 2015 20:00:01 +0000 sh bash 4.3_p39 ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1 app-shells/bash: 4.3_p39::gentoo dev-java/java-config: 2.2.0::gentoo dev-lang/perl: 5.20.2::gentoo dev-lang/python: 2.7.10::gentoo dev-util/cmake: 3.3.1-r1::gentoo dev-util/pkgconfig: 0.28-r2::gentoo sys-apps/baselayout: 2.2::gentoo sys-apps/openrc: 0.17::gentoo sys-apps/sandbox: 2.6-r1::gentoo sys-devel/autoconf: 2.69::gentoo sys-devel/automake: 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo sys-devel/binutils: 2.25.1-r1::gentoo sys-devel/gcc: 4.9.3::gentoo sys-devel/gcc-config: 1.7.3::gentoo sys-devel/libtool: 2.4.6::gentoo sys-devel/make: 4.1-r1::gentoo sys-kernel/linux-headers: 3.18::gentoo (virtual/os-headers) sys-libs/glibc: 2.20-r2::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 x-portage location: /usr/local/portage masters: gentoo priority: 0 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/redmine/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /var/lib/redmine/config/locales /var/lib/redmine/config/settings.yml" CXXFLAGS="-O2 -pipe" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks 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" GENTOO_MIRRORS="http://distfiles.gentoo.org" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j5" PKGDIR="/usr/portage/packages" 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" USE="acl acpi alsa amd64 apache2 berkdb bzip2 cli cracklib crypt curl cxx dbus dri fortran gd gdbm iconv jpeg json ldap mmx mmxext modules multilib mysql ncurses nls nptl openmp pam pcre png readline seccomp session sse sse2 ssl tcpd threads truetype unicode vhosts webdav xml zlib" ABI_X86="64" ALSA_CARDS="ens1371" APACHE2_MODULES="access auth auth_basic authn_dbm authz_dbm auth_dbm auth_anon authz_host auth_digest alias file-cache echo charset-lite cache authn_file authz_user authn_alias dav_fs dav_lock authn_default authz_default dbd disk-cache mem-cache ext-filter case_filter case-filter-in deflate filter mime-magic cern-meta expires headers usertrack unique-id proxy proxy_connect proxy_ftp proxy_http info proxy_ajp proxy_balancer include cgi cgid dav dav-fs vhost-alias speling rewrite log_config logio env setenvif mime status autoindex asis negotiation dir imap actions userdir unique_id so" 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" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" 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="evdev keyboard mouse vmmouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" RUBY_TARGETS="ruby20" USERLAND="GNU" VIDEO_CARDS="vmware vesa vga" 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" USE_PYTHON="2.7" Unset: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS ==== apache2 -V Server version: Apache/2.2.31 (Unix) Server built: Oct 9 2015 09:38:18 Server's Module Magic Number: 20051115:40 Server loaded: APR 1.5.2, APR-Util 1.5.4 Compiled using: APR 1.5.2, APR-Util 1.5.4 Architecture: 64-bit Server MPM: Worker threaded: yes (fixed thread count) forked: yes (variable process count) Server compiled with.... -D APACHE_MPM_DIR="server/mpm/worker" -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_SYSVSEM_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D DYNAMIC_MODULE_LIMIT=128 -D HTTPD_ROOT="/usr" -D SUEXEC_BIN="/usr/sbin/suexec" -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D DEFAULT_ERRORLOG="logs/error_log" -D AP_TYPES_CONFIG_FILE="/etc/apache2/mime.types" -D SERVER_CONFIG_FILE="/etc/apache2/httpd.conf" ===== [Wed Nov 18 10:06:17 2015] [notice] SIGUSR1 received. Doing graceful restart [Wed Nov 18 10:06:17 2015] [info] APR LDAP: Built with OpenLDAP LDAP SDK [Wed Nov 18 10:06:17 2015] [info] LDAP: SSL support available [Wed Nov 18 10:06:17 2015] [info] Init: Seeding PRNG with 144 bytes of entropy [Wed Nov 18 10:06:17 2015] [info] Shared memory session cache initialised [Wed Nov 18 10:06:17 2015] [info] Init: Initializing (virtual) servers for SSL [Wed Nov 18 10:06:17 2015] [info] mod_ssl/2.2.31 compiled against Server: Apache/2.2.31, Library: OpenSSL/1.0.2d [Wed Nov 18 10:06:17 2015] [info] mod_unique_id: using ip addr 127.0.0.1 [Wed Nov 18 10:06:18 2015] [notice] mod_python: Creating 8 session mutexes based on 6 max processes and 50 max threads. [Wed Nov 18 10:06:18 2015] [notice] mod_python: using mutex_directory /tmp Fatal Python error: PyEval_SaveThread: NULL tstate [Wed Nov 18 10:06:18 2015] [notice] seg fault or similar nasty error detected in the parent process
I can confirm the bug. Upstream have Issue https://github.com/grisha/mod_python/issues/46 In master that bug fixed by https://github.com/grisha/mod_python/commit/5bb5d6d0113f6bbd72966a5c1f3e6d40c2e9c8fd With that patch and patch from https://bugs.gentoo.org/show_bug.cgi?id=531154 mod_python 3.5.0 in my case work fine and can be safe reload
I can confirm this bug. On hardened grsec blocks this. (see below) Problem persists for -k graceful and -k restart. Other systems have the same issue: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204793#c3 Applying the patch mentioned here and in the link above solves the problem. Btw, for this case it would be nice to have epatch_user. Please add it. Thx. --- Sep 23 02:19:44 pluto kernel: [22182.743599] grsec: From 172.16.17.6: Abort occurred at 000000000000622e in /usr/sbin/apache2[apache2:25134] uid/euid:0/0 gid/egid:0/0, parent /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0 Sep 23 02:19:44 pluto kernel: [22182.743618] grsec: From 172.16.17.6: denied resource overstep by requesting 4096 for RLIMIT_CORE against limit 0 for /usr/sbin/apache2[apache2:25134] uid/euid:0/0 gid/egid:0/0, parent /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0 [Fri Sep 23 02:19:43.125385 2016] [mpm_event:notice] [pid 25134:tid 3613419472768] AH00494: SIGHUP received. Attempting to restart [Fri Sep 23 02:19:43.166978 2016] [auth_digest:notice] [pid 25134:tid 3613419472768] AH01757: generating secret for digest authentication ... [Fri Sep 23 02:19:43.167779 2016] [lbmethod_heartbeat:notice] [pid 25134:tid 3613419472768] AH02282: No slotmem from mod_heartmonitor [Fri Sep 23 02:19:44.000570 2016] [:notice] [pid 25134:tid 3613419472768] mod_python: Creating 8 session mutexes based on 3 max processes and 25 max threads. [Fri Sep 23 02:19:44.000607 2016] [:notice] [pid 25134:tid 3613419472768] mod_python: using mutex_directory /tmp Fatal Python error: PyEval_SaveThread: NULL tstate [Fri Sep 23 02:19:44.000718 2016] [core:notice] [pid 25134:tid 3613419472768] AH00060: seg fault or similar nasty error detected in the parent process
# Michał Górny <mgorny@gentoo.org> (05 Jun 2017) # (on behalf of Treecleaner project) # Abandoned upstream and downstream. Buggy. Segfaults hard on Python # upgrades. Use one of the *CGI modules instead. # Removal in 30 days. Bug #536134. www-apache/mod_python
commit 05f5454a3108c4ffaeae8be59f4a32c74048293c Author: Michał Górny <mgorny@gentoo.org> AuthorDate: Wed Jul 5 12:17:52 2017 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: Wed Jul 5 12:35:12 2017 app-cdr/cdrkit: Remove last-rited pkg, #591778