Bug 55327 - Segmentation fault when stopping Apache 2.4.6 normally
Summary: Segmentation fault when stopping Apache 2.4.6 normally
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: All (show other bugs)
Version: 2.4.6
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-30 07:19 UTC by Leif Gustafsson
Modified: 2014-12-26 16:37 UTC (History)
2 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Leif Gustafsson 2013-07-30 07:19:39 UTC
Apache 2.4.6 seg faults when stopped, failing to free semaphore arrays. I have had the same issue with 2.4.4 also.

We are running on RH 6.2. We have built the Apache ourselves. We are using APR 1.4.6 in this case, but have the same issue with 1.4.8. We are using apr-util 1.5.2.

I did a gdb trace as seen below.

BR,
Leif Gustafsson

GDB trace
---
Continuing.

Program received signal SIGTERM, Terminated.
0x00000034e10de2d3 in __select_nocancel () from /lib64/libc.so.6
(gdb) c
Continuing.

Program received signal SIGSEGV, Segmentation fault.
apr_palloc (pool=0x16acff8, in_size=38) at memory/unix/apr_pools.c:684
684	    if (size <= node_free_space(active)) {
(gdb) bt
#0  apr_palloc (pool=0x16acff8, in_size=38) at memory/unix/apr_pools.c:684
#1  0x00007eff89a43ccc in apr_pstrcat (a=0x16acff8) at strings/apr_strings.c:149
#2  0x00007eff85c00bdb in socache_dbm_destroy (ctx=0x16a5b28, s=<value optimized out>) at mod_socache_dbm.c:179
#3  0x00007eff859e9cda in ssl_scache_kill (s=0x1385558) at ssl_scache.c:100
#4  0x00007eff859d7c56 in ssl_init_ModuleKill (data=<value optimized out>) at ssl_engine_init.c:1745
#5  0x00007eff89a4d15e in run_cleanups (pool=0x135c138) at memory/unix/apr_pools.c:2352
#6  apr_pool_destroy (pool=0x135c138) at memory/unix/apr_pools.c:814
#7  0x00007eff89a4d135 in apr_pool_destroy (pool=0x135a128) at memory/unix/apr_pools.c:811
#8  0x000000000042813f in destroy_and_exit_process (process=0x135a218, process_exit_value=0) at main.c:264
#9  0x0000000000429486 in main (argc=5, argv=0x7fff7770ae58) at main.c:784
Comment 1 Leif Gustafsson 2013-07-30 07:33:41 UTC
When started we have 259 semaphores allocated.

When stopped 255 semaphores are left allocated. Is the number 255 a coincidence or not. ?
Comment 2 Michael Orlitzky 2014-12-26 16:37:36 UTC
We received a similar report at,

  https://bugs.gentoo.org/show_bug.cgi?id=525222

The stack trace is different, but both wind up in apr_palloc, at memory/unix/apr_pools.c:684. Maybe related, who knows.