Sewrious mod_python issue.

Discussion in 'Plugins/Modules/Addons' started by Steven E Protter, Jun 6, 2022.

  1. Steven E Protter

    Steven E Protter New Member

    MY ISPCOnfig 3.2 reliability has been very good. I am up to date on patches and have the logs running in debug mode. This was extremely helpful in solving minor issues in my setup which has been running in production for about 11 years dating back to Centos 6(Not 100% sure on this point..

    I now run on RedHat 8 Update 5 with update 6 now in 3 node load balanced configuration in my off line lab.
    Production is still at update 5.
    There are some httpd issues and the following code cleans up segment faults after a total httpd failure.

    [root@mars apache] # cat cleanipcs.sh
    #!/bin/sh
    # cleanipcs.sh
    # Clean up apache ipcs so it can be restarted after a number of core dumps
    # Running his code does indeed crash the httpd server. No surprise there.
    # April 2022 Shmuel Protter
    #
    My prime suspect here is mod_python.


    [root@mars apache] # file /usr/lib64/httpd/modules/mod_python.so
    /usr/lib64/httpd/modules/mod_python.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=6a2862684dc35c0abf8adef37cf6e687671a3827, with debug_info, not stripped, too many notes (256)
    [root@mars apache] # which /usr/lib64/httpd/modules/mod_python.so
    /usr/lib64/httpd/modules/mod_python.so
    [root@mars apache] # what /usr/lib64/httpd/modules/mod_python.so

    This is where I got and compiled the mod_python

    #!/bin/sh
    cd /tmp
    wget <redacted so the thread would post fossies.org
    tar xfz mod_python-3.5.0.tgz
    cd mod_python-3.5.0
    ./configure --with-python=/usr/bin/python3
    make
    make install
    echo 'LoadModule python_module modules/mod_python.so' > /etc/httpd/conf.modules.d/10-python.conf
    systemctl restart httpd.service
    systemctl status httpd.service





    for i in $(ipcs -s | grep apache| awk '{print $2}'); do ipcrm sem $i; done
    I don't try running this code on a running server. I would expect it to kill the apache process.

    Every 5 days or so I get a crash core-dumo with the following messaging.
    [Sun Jun 05 03:38:06.506053 2022] [lbmethod_heartbeat:notice] [pid 354349] AH02282: No slotmem from mod_heartmonitor
    [Sun Jun 05 03:38:06.509281 2022] [:notice] [pid 354349] mod_python: Creating 8 session mutexes based on 256 max processes and 0 max threads.
    [Sun Jun 05 03:38:06.509318 2022] [:notice] [pid 354349] mod_python: using mutex_directory /tmp
    Fatal Python error: PyEval_SaveThread: NULL tstate

    Though I have code checking the service it is unable to recover.

    The logical assumption is that mod_python would not be used in its 9 year old state if it was not needed. The httpd server runs without mod_python but I assume this would break ispconfig 3.2

    Is there a way to get the mod_python functionality? IS it possible I should compiled it for a different version of python?

    I have tried to set up httpd to give me a look at the core dumps but this far to no avail. /etc/httpd/conf.d/coredump.conf

    CoreDumpDirectory /var/log/httpd

    error_log-20220529:[Sun May 29 03:09:37.090825 2022] [core:notice] [pid 2180] core dump file size limit raised to 18446744073709551615 bytes

    DefaultLimitCORE=0:infinity is set in /etc/systemd/system.conf
    root@mercury ~] # ulimit -a
    core file size (blocks, -c) unlimited
    Seems like I should be getting core files.

    I am hopiing the uprade to RHEL 8.6 helps.

    Please let me know if I can do anything about the mod_python issue.



    I very much need to resolve this issue.
     
  2. Steven E Protter

    Steven E Protter New Member

    Hmm. I comment out vi /etc/httpd/conf.modules.d/10-python.conf and it seems to run okay in the lab.

    I am definitely wondering what mod_python was bringing to this party.
     
    Last edited: Jun 7, 2022

Share This Page