Mailing List Archive

[Bug 67379] New: Debugging Memory leak in httpd , leads to generate core
https://bz.apache.org/bugzilla/show_bug.cgi?id=67379

Bug ID: 67379
Summary: Debugging Memory leak in httpd , leads to generate
core
Product: Apache httpd-2
Version: 2.4.54
Hardware: PC
OS: Linux
Status: NEW
Severity: blocker
Priority: P2
Component: Core
Assignee: bugs@httpd.apache.org
Reporter: shahbhav1993@gmail.com
Target Milestone: ---

Created attachment 39020
--> https://bz.apache.org/bugzilla/attachment.cgi?id=39020&action=edit
httpd gdb log

Hi Team,

Hope doing Great!!

I have installed below modules in httpd and using below version httpd.
-bash# httpd -M
Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
auth_ax_module (shared)
auth_jwt_module (shared)
axapi_1_module (shared)
access_compat_module (shared)
alias_module (shared)
authn_core_module (shared)
authz_core_module (shared)
authz_user_module (shared)
dir_module (shared)
env_module (shared)
headers_module (shared)
log_config_module (shared)
mime_module (shared)
rewrite_module (shared)
setenvif_module (shared)
slotmem_shm_module (shared)
socache_shmcb_module (shared)
suexec_module (shared)
unixd_module (shared)
mpm_prefork_module (shared)
ssl_module (shared)
web_apis_module (shared)
cgid_module (shared)
unique_id_module (shared)

-bash# httpd -V
Server version: Apache/2.4.54 (Unix)
Server built: Jun 30 2022 13:43:50
Server's Module Magic Number: 20120211:124
Server loaded: APR 1.7.4, APR-UTIL 1.6.3, PCRE 8.35 2014-04-04
Compiled using: APR 1.5.2, APR-UTIL 1.5.2, PCRE 8.32 2012-11-30
Architecture: 64-bit
Server MPM: prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-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=256
-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_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="/etc/httpd/conf/mime.types"
-D SERVER_CONFIG_FILE="/etc/httpd/conf/httpd.conf"

I am running below script to restart the httpd ,I am not even browsing
web-pages ,after four to five days it keep on generating core. and cpu reaches
100%.

#!/bin/bash

# Define the number of restarts
total_restarts=4000

for ((i=1; i<=$total_restarts; i++)); do
httpd -k restart

# Wait for a few seconds before the next iteration
sleep 120
done

I can see /proc/parent_httpd_pid/statm output keep on increasing below I have
attached sample output.
2023-08-25 10:45:02 179536 7679 5872 158 0 15097 0
2023-08-25 10:45:30 192359 7712 5901 158 0 15097 0
2023-08-25 10:50:30 218033 7723 5906 158 0 15125 0
...
2023-08-29 03:18:21 33181755 69652 59222 158 0 23737 0
2023-08-29 03:23:21 33220220 69689 59248 158 0 23733 0
2023-08-29 03:28:21 33245866 69769 59322 158 0 23733 0
2023-08-29 03:33:21 33284361 69813 59356 158 0 23759 0

I have tried to attach gdb. but not getting useful information. dump_all_pools
command not working for me. what to do for that.
I have attached logs for gdb.
(gdb) dump_all_pools
Undefined command: "dump_all_pools". Try "help".
(gdb) c

Please let me know if any other information needed from my side.

Thanks,
Bhav

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org