Last modified: 2013-12-06 19:53:31 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T59985, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 57985 - rsvg large stderr cause a PHP memory exhaustion
rsvg large stderr cause a PHP memory exhaustion
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-04 16:25 UTC by Antoine "hashar" Musso (WMF)
Modified: 2013-12-06 19:53 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Antoine "hashar" Musso (WMF) 2013-12-04 16:25:28 UTC
I have spotted on the Wikimedia cluster a SVG image that cause RSVG to generate roughly 125MB of stderr output.

In includes/media/SVG.php we log that error using something like:

 wfDebugLog( 'thumbnails', trim($stderr) );

trim() thus returns a copy of $stderr (aka roughly 125MB) which can't be allocated by PHP under its max memory constraint. That result in a fatal error and no log at all.


Which should probably substr() the $stderr before handling it. No point in logging the full error IMHO.
Comment 1 Gerrit Notification Bot 2013-12-04 16:32:10 UTC
Change 99142 had a related patch set uploaded by Hashar:
generalize BitmapHandler::logErrorForExternalProcess

https://gerrit.wikimedia.org/r/99142
Comment 2 Gerrit Notification Bot 2013-12-04 17:02:43 UTC
Change 99157 had a related patch set uploaded by Hashar:
media: limit size of stderr being logged

https://gerrit.wikimedia.org/r/99157
Comment 3 Gerrit Notification Bot 2013-12-06 17:28:19 UTC
Change 99142 merged by Brian Wolff:
generalize BitmapHandler::logErrorForExternalProcess

https://gerrit.wikimedia.org/r/99142
Comment 4 Gerrit Notification Bot 2013-12-06 17:37:28 UTC
Change 99157 merged by jenkins-bot:
media: limit size of stderr being logged

https://gerrit.wikimedia.org/r/99157
Comment 5 Umherirrender 2013-12-06 19:53:31 UTC
successfully merged

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links