# Apache 2.4 dumping core after logrotate and using mod_php5



## echz (May 6, 2015)

I am having a strange problem with Apache 2.4 dumping core upon launch while having mod_php5 active and was hoping someone can help me get to the bottom of it...

It all started when I noticed logrotate wasn't working because of an error in its config file.  Once I found and solved that error, that same night at 19 seconds after midnight I got an error message in the Apache log that said:  
	
	



```
[core:notice] [pid 48129] AH00060: seg fault or similar nasty error detected in the parent process
```

Apache has not run correctly since that evening where logrotate ran.  The only way I can get it to launch without receiving such messages as kernel: 
	
	



```
pid 73392 (httpd), uid 0: exited on signal 11 (core dumped)
```
 is to disable mod_php5 -- it will launch fine then, however I (obviously) won't have PHP support.

When I run gdb on the core file, it produces:


```
Loaded symbols for /libexec/ld-elf.so.1
#0  0x2865c1b5 in OPENSSL_ia32_cpuid () from /usr/local/lib/libcrypto.so.8
[New Thread 28c03080 (LWP 100162/httpd)]
(gdb) bt
#0  0x2865c1b5 in OPENSSL_ia32_cpuid () from /usr/local/lib/libcrypto.so.8
#1  0x2bd8022b in OPENSSL_cpuid_setup () from /lib/libcrypto.so.7
#2  0x2bc7af85 in _init () from /lib/libcrypto.so.7
#3  0x00000000 in ?? ()
```

I can not figure out what's going on beyond this.  I've searched and searched for a solution, I tried rebuilding the individual ports, I've tried rebuilding the entire world, I've even tried beating my head on the keyboard hoping that produced positive results ... all to no avail.

If anyone in the community could possibly offer me some ideas to try and rectify this, I would be forever grateful for your wisdom and knowledge ... Thanks!!


----------



## junovitch@ (May 10, 2015)

These two lines make things look ugly.  The same OpenSSL library should be used but it looks like the system OpenSSL and security/openssl port are in use.

```
#0 0x2865c1b5 in OPENSSL_ia32_cpuid () from /usr/local/lib/libcrypto.so.8
#1 0x2bd8022b in OPENSSL_cpuid_setup () from /lib/libcrypto.so.7
```

I'm not 100% on the cause, either PHP or Apache built with the port rather than the base OpenSSL and that's causing unpredictable results.  The safest suggestion would be to force one and ensure it's used for all ports.  Try something like this /etc/make.conf and a re-install of all ports.

```
WITH_OPENSSL_PORT=yes
```


----------

