Re: [users@httpd] Segmentation fault

2022-03-11 Thread Ivan Ionut

Well, i disabled opcache and after I had other crashes:

[crit] Memory allocation failed, aborting process.
[crit] Memory allocation failed, aborting process.
[crit] Memory allocation failed, aborting process.

mmap() failed: [12] Cannot allocate memory

mmap() failed: [12] Cannot allocate memory

mmap() failed: [12] Cannot allocate memory

So opcache is enabled now and I will try to disable other 
extensions...because @Frank Gingras I never switched to php-fpm on a 
live server, so this will be the last solution.


---
Ivan Ionuț

Str. Săliște 20, Galati 800023

Tel/Fax: +40236 493277

Email: ivan.io...@tehnopol-gl.ro

_The content of this email is confidential and intended for the 
recipient specified in message only. It is strictly forbidden to share 
any part of this message with any third party, without a written consent 
of the sender. If you are not the intended recipient of this message, 
please notify the sender immediately, and delete the message and any 
attachments. Any disclosure, reproduction, distribution or other use of 
this message or any attachments by an individual or entity other than 
the intended recipient is prohibited._


On 10-03-2022 20:28, Frank Gingras wrote:

That would really be a band-aid; also preventing memory leaks might not 
stop segfaults at all.


You will gain many advantages by moving to the fpm pools model, and 
your httpd will use less memory as well.


On Wed, 9 Mar 2022 at 20:15, Dino Ciuffetti  wrote:

Already tried to disable the opcache PHP extension?
# sudo phpdismod opcache
It should be your problem.

Also, it seems you are on prefork, please try to set 
MaxConnectionsPerChild to something near 1 when you are using 
mod_php or big modules like this to avoid any memory leak building 
slowly, if any.


9 marzo 2022 14:15, "Ivan Ionut"  wrote:

My apache2 version:

Server version: Apache/2.4.18 (Ubuntu)
Server built: 2020-08-12T21:35:50

My php version:

PHP 7.3.7-1+ubuntu16.04.1+deb.sury.org [1]+1 (cli) (built: Jul 10 2019 
06:54:26) ( NTS )

Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.7, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.7-1+ubuntu16.04.1+deb.sury.org [1]+1, Copyright 
(c) 1999-2018, by Zend Technologies


My os version:

Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial

Hi, from last 2-3 months i have a lot of these segmentations(2-3 times 
per week);


[Wed Mar 09 10:47:12.150226 2022] [core:notice] [pid 21823] AH00051: 
child pid 22481 exit signal Segmentation fault (11), possible coredump 
in /etc/apache2
[Wed Mar 09 10:47:17.155792 2022] [core:notice] [pid 21823] AH00051: 
child pid 21895 exit signal Segmentation fault (11), possible coredump 
in /etc/apache2
[Wed Mar 09 10:47:24.163536 2022] [core:notice] [pid 21823] AH00051: 
child pid 22189 exit signal Segmentation fault (11), possible coredump 
in /etc/apache2
[Wed Mar 09 10:47:24.163618 2022] [core:notice] [pid 21823] AH00051: 
child pid 22562 exit signal Segmentation fault (11), possible coredump 
in /etc/apache2
[Wed Mar 09 10:47:25.164759 2022] [core:notice] [pid 21823] AH00051: 
child pid 22491 exit


...

Every site on the server has an error with: "Secure Connection Failed" 
or "The Connection was reset"


After I restart apache2 everything is ok.

Before this error.. I had a lot of errors (that I do not remember the 
exact log messages) ... the apache2 requested to increase the number of 
servers/workers, so the only I made some modifications


/etc/apache2/mods-available/mpm_prefork.conf


ServerLimit 4000
StartServers 905
MinSpareServers 405
MaxSpareServers 420
MaxRequestWorkers 2000
MaxConnectionsPerChild 0


Today with some tutorial and with the help of gdb... I did get some 
output of a segmentated apache2 process:


#0 0xb6324467 in ?? () from /usr/lib/php/20180731/opcache.so
No symbol table info available.
#1 0xb6322eac in ?? () from /usr/lib/php/20180731/opcache.so
No symbol table info available.
#2 0xb716baba in ?? () from /usr/lib/apache2/modules/libphp7.3.so [2]
No symbol table info available.
#3 0xb71a4b92 in ?? () from /usr/lib/apache2/modules/libphp7.3.so [2]
No symbol table info available.
#4 0xb71adaf3 in execute_ex () from 
/usr/lib/apache2/modules/libphp7.3.so [2]

No symbol table info available.
#5 0xb71112cd in zend_call_function () from 
/usr/lib/apache2/modules/libphp7.3.so [2]

No symbol table info available.
#6 0xb6fbffbf in ?? () from /usr/lib/apache2/modules/libphp7.3.so [2]
No symbol table info available.
#7 0xb6fc1345 in ?? () from /usr/lib/apache2/modules/libphp7.3.so [2]
No symbol table info available.
#8 0xb6fc154a in ?? () from /usr/lib/apache2/modules/libphp7.3.so [2]
No symbol table info available.
#9 0xb6fc1b2a in ?? () from /usr/lib/apache2/modules/libphp7.3.so [2]
No symbol table info available.
#10 0xb71a9f11 in execute_ex () from 
/usr/lib/apache2/modules/libphp7.3.so [2]

No symbol table info available.
#11 0xb71112cd in zend_call_function () from 
/usr/lib/

Re: [users@httpd] mod_evasive [OT?]

2022-03-11 Thread Darryl Philip Baker
Solved this by correctly compiling the mod_evasive source using apxs. Sorry for 
the noise on the list.

Darryl Baker, GSEC, GCLD  (he/him/his)
Sr. System Administrator
Distributed Application Platform Services
Northwestern University
4th Floor
2020 Ridge Avenue
Evanston, IL  60208-0801
darryl.ba...@northwestern.edu
(847) 467-6674


From: Darryl Philip Baker 
Reply-To: Apache httpd Users 
Date: Thursday, March 10, 2022 at 9:34 AM
To: Apache httpd Users 
Subject: [users@httpd] mod_evasive [OT?]

I am trying to upgrade our webservers from RHEL7 to RHEL8. One third party 
module we use is mod_evasive. Searching for information I find that in 2020 it 
was in the EPEL repository for RHEL8/CentOS8 but it is no longer there. I have 
no problem building it from source if necessary. Where can I find the current 
source for it? Is there another module that is better for fending off DoS and 
DDoS attacks?

Darryl Baker, GSEC, GCLD  (he/him/his)
Sr. System Administrator
Distributed Application Platform Services
Northwestern University
4th Floor
2020 Ridge Avenue
Evanston, IL  60208-0801
darryl.ba...@northwestern.edu
(847) 467-6674