store | blogs | forums | twitter | facebook | wiki | mailing lists | downloads | support portal
Atomic Secure Linux
It is currently Wed Jun 19, 2013 1:05 pm

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic Share/Bookmark  [ 9 posts ] 
Author Message
 Post subject: zend_mm_heap corrupted
Unread postPosted: Sat Mar 13, 2010 7:58 pm 
Offline
Long Time Forum Regular
Long Time Forum Regular

Joined: Sat Aug 20, 2005 9:30 am
Posts: 2812
Location: The Netherlands
I just noticed that on one server /var/log/httpd/error_log has a lot of 'zend_mm_heap corrupted' entries. OSSEC apparently doesn't pick these up. Pages load normally though. Is there a problem to solve here?

Installed PHP packages:

Code:
# rpm -qa | grep ^php | sort
php-5.2.13-1.el4.art
php-cli-5.2.13-1.el4.art
php-common-5.2.13-1.el4.art
php-devel-5.2.13-1.el4.art
php-gd-5.2.13-1.el4.art
php-imap-5.2.13-1.el4.art
php-ioncube-loader-3.3.11-1.el4.art
php-ldap-5.2.13-1.el4.art
php-mbstring-5.2.13-1.el4.art
php-mysql-5.2.13-1.el4.art
php-pdo-5.2.13-1.el4.art
php-pear-1.7.2-2.el4.art
php-xml-5.2.13-1.el4.art


Don't know if this is related, but this is also the one server where installing php-eaccelerator causes Apache to segfault, while it works fine on all of our other servers.

_________________
Lemonbit Internet Dedicated Server Management


Top
 Profile  
 
 Post subject: Re: zend_mm_heap corrupted
Unread postPosted: Mon Mar 15, 2010 5:26 am 
Offline
Forum Regular
Forum Regular

Joined: Sat Mar 28, 2009 6:58 pm
Posts: 802
Location: Germany
It seems like a code related error to me that mostly happens in heavy code.
I have searched a little bit.
Maybe you can try this to near it down:
Code:
edit /usr/local/apache2/bin/apachectl

and add:
export USE_ZEND_ALLOC=0

and stop & start apache.


or try to change one of these variables in php.ini. best would be on the domain that is causing the crash.
I assume to the other post that you are using suPHP.
Code:
variables_order
  - Not OK: EGPCS
  - OK: GPCS
register_long_arrays
  - Not OK: On
  - OK: Off
magic_quotes_gpc
  - Not OK: On
  - OK: Off


Top
 Profile  
 
 Post subject: Re: zend_mm_heap corrupted
Unread postPosted: Mon Mar 15, 2010 5:39 am 
Offline
Long Time Forum Regular
Long Time Forum Regular

Joined: Sat Aug 20, 2005 9:30 am
Posts: 2812
Location: The Netherlands
BruceLee wrote:
It seems like a code related error to me that mostly happens in heavy code.
I have searched a little bit.
Maybe you can try this to near it down:
Code:
edit /usr/local/apache2/bin/apachectl

and add:
export USE_ZEND_ALLOC=0

and stop & start apache.


(That would be /usr/sbin/apachectl on CentOS.) I just googled USE_ZEND_ALLOC and read it doesn't do much when using mod_php.

Quote:
or try to change one of these variables in php.ini. best would be on the domain that is causing the crash.


The 'zend_mm_heap corrupted' messages appear in the global /var/log/httpd/error_log, so not in a specific domain's error_log.

Quote:
I assume to the other post that you are using suPHP.


No, this is just plain old mod_php.

Quote:
Code:
variables_order
  - Not OK: EGPCS
  - OK: GPCS


EGPCS is the default. Why do you recommend not registering environment variables?

Quote:
Code:
register_long_arrays
  - Not OK: On
  - OK: Off
magic_quotes_gpc
  - Not OK: On
  - OK: Off


These settings are both set to off.

_________________
Lemonbit Internet Dedicated Server Management


Top
 Profile  
 
 Post subject: Re: zend_mm_heap corrupted
Unread postPosted: Mon Mar 15, 2010 6:03 am 
Offline
Forum Regular
Forum Regular

Joined: Sat Mar 28, 2009 6:58 pm
Posts: 802
Location: Germany
those where just options to isolate the problem.
After reading your answers it seems not so easy to near down.
Do these errors show up constantly or only during day or night time?


Top
 Profile  
 
 Post subject: Re: zend_mm_heap corrupted
Unread postPosted: Mon Mar 15, 2010 6:21 am 
Offline
Long Time Forum Regular
Long Time Forum Regular

Joined: Sat Aug 20, 2005 9:30 am
Posts: 2812
Location: The Netherlands
I'm not sure as there are no timestamps with the 'zend_mm_heap corrupted' messages. I also noticed Apache segfaults ~20 times a day (no eAccelerator installed). I also noticed a bunch of apache owned semaphores hanging around after stopping Apache. I cleaned those up, let's see if that makes a difference.

_________________
Lemonbit Internet Dedicated Server Management


Top
 Profile  
 
 Post subject: Re: zend_mm_heap corrupted
Unread postPosted: Mon Mar 15, 2010 6:39 am 
Offline
Forum Regular
Forum Regular

Joined: Sat Mar 28, 2009 6:58 pm
Posts: 802
Location: Germany
It could be Horde related. If a user access horde webmail interface and want to read/open bigger emails.
Do you have users leaving there mail on the server and using horde?
Maybe you can create a dummy mail account and put some big messages(with big embedded pictures e.g.) in an extra created imap folder other than inbox
and then try out horde. After reading a few messages the error could show up.

this case seems pretty tricky. maybe you could gdb the whole processes to near it down.


Top
 Profile  
 
 Post subject: Re: zend_mm_heap corrupted
Unread postPosted: Mon Mar 15, 2010 6:43 am 
Offline
Long Time Forum Regular
Long Time Forum Regular

Joined: Sat Aug 20, 2005 9:30 am
Posts: 2812
Location: The Netherlands
Trying to open e-mails with large attachments result in out of memory errors when PHP's memory_limit is reached. I know those, but those are nice clean error messages, with timestamps and references to Horde and everything.

Thanks for the help though.

_________________
Lemonbit Internet Dedicated Server Management


Top
 Profile  
 
 Post subject: Re: zend_mm_heap corrupted
Unread postPosted: Mon Mar 15, 2010 7:08 am 
Offline
Long Time Forum Regular
Long Time Forum Regular

Joined: Sat Aug 20, 2005 9:30 am
Posts: 2812
Location: The Netherlands
Hm, that wasn't it. Just got another 'zend_mm_heap corrupted' in /var/log/httpd/error_log. :(

_________________
Lemonbit Internet Dedicated Server Management


Top
 Profile  
 
 Post subject: Re: zend_mm_heap corrupted
Unread postPosted: Mon Mar 15, 2010 8:11 am 
Offline
Long Time Forum Regular
Long Time Forum Regular

Joined: Thu Dec 09, 2004 11:19 am
Posts: 1876
When it comes to the mod_sec-related segfaults, I find that NOT cleaning up the semaphores helps.

i.e. get segfaults, see semaphores increase slightly, restart apache (service httpd restart) without cleaning semaphores = no more segfaults. In contrast, cleaning the semaphores quite often results in segfaults again.

This isn't mod_sec related, and not segfault-related either, but I thought I'd mention it anyway!

Have you run a memory check/checked hardware log for any bit errors? Just in case?

_________________
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic Share/Bookmark  [ 9 posts ] 

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: Highland and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group