[ZBX-6953] Apache WebServer crashing Created: 2013 Sep 04  Updated: 2017 May 30  Resolved: 2013 Oct 30

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 2.1.4
Fix Version/s: 2.1.7

Type: Incident report Priority: Major
Reporter: Oleg Egorov (Inactive) Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: apache, crash
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows XP SP3, Apache 2.4.2



 Description   

Configuration->Hosts

Set this DNS value in host interface

IPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNSIPMI.interfaces.DNS

Error log

[Mon Sep 23 18:12:28.812253 2013] [mpm_winnt:notice] [pid 2740:tid 152] AH00428: Parent: child process exited with status 3221225477 – Restarting.
[Mon Sep 23 18:12:29.452878 2013] [ssl:warn] [pid 2740:tid 152] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Mon Sep 23 18:12:29.843503 2013] [mpm_winnt:notice] [pid 2740:tid 152] AH00455: Apache/2.4.2 (Win32) OpenSSL/1.0.1c PHP/5.4.4 configured – resuming normal operations
[Mon Sep 23 18:12:29.843503 2013] [mpm_winnt:notice] [pid 2740:tid 152] AH00456: Server built: May 13 2012 14:10:15
[Mon Sep 23 18:12:29.843503 2013] [core:notice] [pid 2740:tid 152] AH00094: Command line: 'c:\\xampp\\apache\\bin
httpd.exe -d C:/xampp/apache'
[Mon Sep 23 18:12:29.843503 2013] [mpm_winnt:notice] [pid 2740:tid 152] AH00418: Parent: Created child process 3036
[Mon Sep 23 18:12:31.077878 2013] [ssl:warn] [pid 3036:tid 1884] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Mon Sep 23 18:12:31.202878 2013] [mpm_winnt:notice] [pid 3036:tid 1884] AH00354: Child: Starting 150 worker threads.



 Comments   
Comment by richlv [ 2013 Sep 24 ]

i suppose this would have to be reported upstream (apache or php) - client software should not crash server environment

Comment by Ivo Kurzemnieks [ 2013 Sep 25 ]

This was a problem with Apache in Windows. Even Apache 2.4 was crashing. The problem was with preg_match() function, which tried to use more memory than allowed. Increasing stack size memory for Apache was not a solution. So there was added extra field length validation for field "DNS name". Scanned and tested other regular expression patterns and seems like they work fine. The one that was crashing Apache was ZBX_PREG_DNS_FORMAT. So that preg_match() broke due to expression complexity, string complexity and string length.

RESOLVED in svn://svn.zabbix.com/branches/dev/ZBX-6953

Comment by Oleg Egorov (Inactive) [ 2013 Oct 08 ]

(1) In defines.inc.php
define('ZBX_HAVE_IPV6', 1);

And everywhere is check for if (defined('ZBX_HAVE_IPV6'))

Please change it to "if (ZBX_HAVE_IPV6)"

iivs RESOLVED in r39108

oleg.egorov CLOSED

Comment by Oleg Egorov (Inactive) [ 2013 Oct 08 ]

(2) In configuration.edit.js.php

			<?php if (defined('ZBX_HAVE_IPV6')): ?>
				maxlength="<?php echo ZBX_IPV6_MAX_LENGTH ?>"
			<?php else: ?>
				maxlength="<?php echo ZBX_IPV4_MAX_LENGTH ?>"
			<?php endif ?>

Use ternary operator

iivs Static HTML attribue is now used instead. Constants are now removed.
RESOLVED in r39108

oleg.egorov CLOSED

Comment by Oleg Egorov (Inactive) [ 2013 Oct 08 ]

(3) Please add new constant for ZBX_MAX_PORT_NUMBER length and don't use strlen(ZBX_MAX_PORT_NUMBER)

iivs Was not necessary. Since port can be Macro, static HTML maxlenth=64 is now used.
RESOLVED in r39108

oleg.egorov CLOSED

Comment by Oleg Egorov (Inactive) [ 2013 Oct 08 ]

(4) In fields "IP address" and "DNS name" possible use macros, in DB macros name max length is 64...
So... everywhere maxlength is 64

But see ZBX-7121...

iivs Will be fixed in ZBX-7121
CLOSED.

Comment by Oleg Egorov (Inactive) [ 2013 Oct 08 ]

(5) IPv6 max length is 39
45 symbols is full ip map

For example:

To map an IPv4 address in an IPv6 packet, you can write the address as:
::FFFF:192.168.123.123
Or in full:
0000:0000:0000:0000:0000:FFFF:192.168.123.123
With 45 characters this is the longest possible address—visually at least, it is still 128 bits of course.

iivs Since IP can be Macro, but DB maxlenth is 39 symbols, 39 symbols will be used for now. Proper length will be fixed in ZBX-7121.
CLOSED.

Comment by Oleg Egorov (Inactive) [ 2013 Oct 08 ]

TESTED

Comment by Ivo Kurzemnieks [ 2013 Oct 09 ]

Fixed in pre-2.1.7 (trunk) r39127

Comment by richlv [ 2013 Oct 26 ]

(6) commit message says "added length validation for field "DNS name" and added few HTML maxlength attributes for various fields in Configuration > Host > edit" - thanks for that - but let's document this in whatsnew, including the new limits (i'd do that myself, but digging out the new limits is a bit too time consuming)

alexei: there is nothing to add to the what's new, it's a bug fix not a new feature! CLOSED

Generated at Fri Mar 29 01:37:09 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.