WordPress.org

Make WordPress Core

Opened 11 months ago

Last modified 11 months ago

#45303 new defect (bug)

XML parsing should be done in chunks, causing parser out of memory

Reported by: amanmanglik Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.9.8
Component: Import Keywords:
Focuses: Cc:
PR Number:

Description

SimplePie in wordpress reads xml as a single chunk instead of multiple chunks as recommended by xml_parse documentation. This is resulting is parser running out of memory internally and the error is gets suppressed. Its the cause for blogger importer plugin failing with >10MB xml files and possibly other issues.

Full context and a unpolished fix in the support thread here -
https://wordpress.org/support/topic/xml-parsing-not-in-chunks-parser-out-of-memory/

I have verified the bug and my fix on wordpress version 4.9.8 but i am guessing this has existed for a while.

Change History (3)

#1 @swissspidy
11 months ago

  • Component changed from General to Import

#2 @dd32
11 months ago

SimplePie is an external library WordPress uses, this should be reported upstream to them. Although WordPress uses an old version of the library, it looks like the code in question still exists: https://github.com/simplepie/simplepie/blob/master/library/SimplePie/Parser.php#L166-L172

#3 @amanmanglik
11 months ago

Reported it to SimplePie as well but i would request doing a local fix if SimplePie doesnt pick it up fast as Wordpress is the one being affected. Its essentially blocking all potential users who want to migrate from Blogger to WP but cant because their export wont load. My friend, whose blog i am helping with, gave up on the migration months back before involving me recently.

https://github.com/simplepie/simplepie/issues/598

Last edited 11 months ago by amanmanglik (previous) (diff)
Note: See TracTickets for help on using tickets.