[ZBX-11091] Memory leak is in PHP frontend when trying to import template Created: 2016 Aug 14  Updated: 2017 May 30  Resolved: 2016 Oct 04

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 3.0.4
Fix Version/s: 3.0.6rc1, 3.2.2rc1, 3.4.0alpha1

Type: Incident report Priority: Major
Reporter: Andre Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: memoryleak, templates, xml
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: XML File pgsql-template.xml    

 Description   

Subj

zabbix-frontend-php 3.0.4-1+jessie
php5 5.6.24+dfsg-0+deb8u1

Template XML file in attachment

PHP log

PHP Fatal error:  Allowed memory size of 2336227328 bytes exhausted (tried to allocate 137454 bytes) in /usr/share/zabbix/include/classes/import/readers/CXmlImportReader.php on line 83" while reading response header from upstream, request: "POST /conf.import.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "host", referrer: "https://host/conf.import.php?rules_preset=template&sid=21a619ceb46053a9"


 Comments   
Comment by vitalijs.cemeris (Inactive) [ 2016 Aug 24 ]

Attached XML file is incorrect and reading it will throw exception: "Invalid tag "/": unexpected tag "w:wordDocument"".
markuss, I suppose you exported this xml from Word.Document.

Comment by vitalijs.cemeris (Inactive) [ 2016 Aug 25 ]

(1) No translation strings changed.

gunarspujats CLOSED

Comment by vitalijs.cemeris (Inactive) [ 2016 Aug 25 ]

Fixed in the development branch svn://svn.zabbix.com/branches/dev/ZBX-11091

Comment by vitalijs.cemeris (Inactive) [ 2016 Aug 25 ]

If debugging is enabled than import could also exhaust 128M (which is minimum requirement for PHP option "memory_limit")

Comment by Gunars Pujats (Inactive) [ 2016 Sep 12 ]

(2) Improved template import performance in r62449.

sasha REVERTED in r62973

gunarspujats CLOSED

Comment by Gunars Pujats (Inactive) [ 2016 Oct 04 ]

Tested.

Comment by Alexander Vladishev [ 2016 Oct 04 ]

Fixed in:

  • pre-3.0.6rc1 r62986
  • pre-3.2.2rc1 r62987
  • pre-3.3.0 (trunk) r62988
Generated at Fri Mar 29 16:33:31 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.