Allowed memory size of 183500800 bytes exhausted (tried to allocate 2018670161 bytes).
Closed, ResolvedPublic

Description

PHP fatal error in /usr/local/apache/common-local/php-1.22wmf15/extensions/TimedMediaHandler/handlers/OggHandler/PEAR/File_Ogg/File/Ogg/Media.php line 119: Allowed memory size of 183500800 bytes exhausted (tried to allocate 2018670161 bytes).

when uploading audio files (Ogg vorbis) at Wikimedia Commons. PLEASE ASAP ask the questions you need to debug/track down this issue. I can't provide the answer and must ask the reporter at https://commons.wikimedia.org/wiki/Commons:Upload_help#.22Unknown_error.22_when_uploading_audio_files_via_Upload_Wizard ( permalink: https://commons.wikimedia.org/w/index.php?title=Commons:Upload_help&oldid=103591481#.22Unknown_error.22_when_uploading_audio_files_via_Upload_Wizard )


Version: unspecified
Severity: normal

bzimport set Reference to bz53840.
Rillke created this task.Via LegacySep 6 2013, 9:22 AM
bzimport added a comment.Via ConduitSep 6 2013, 6:41 PM

jgerber wrote:

can you provide a link to the file you tried to upload.

Aklapper added a comment.Via ConduitNov 7 2013, 3:43 PM

Rainer: can you provide a link to the file you tried to upload?

kaldari added a comment.Via ConduitSep 18 2014, 4:54 AM

I get the same error any time I try to upload an OGG audio file via https://commons.wikimedia.org/wiki/Special:Upload:

PHP fatal error in /srv/mediawiki/php-1.24wmf21/extensions/TimedMediaHandler/handlers/OggHandler/PEAR/File_Ogg/File/Ogg/Media.php line 119:
Allowed memory size of 268435456 bytes exhausted (tried to allocate 1802524276 bytes)

I tried files ranging in size from 13.2 MB to 6.1 MB. All failed with the same error.

kaldari added a comment.Via ConduitSep 18 2014, 5:00 AM

The error seems to happen in _decodeBareCommentsHeader(), which parses the comments header in the ogg file. This header contains a series of comments related to the audio encoded in the stream as well as a string to identify the encoding software. The encoding software that I used was MediaHuman Audio Converter, version 1.9.1.

kaldari added a comment.Via ConduitSep 18 2014, 5:06 AM

I think what's happening is that the function is choking when trying to parse the encoded COVERART comment, which is far larger than the other comments in the header.

gerritbot added a comment.Via ConduitSep 18 2014, 5:26 AM

Change 161174 had a related patch set uploaded by Kaldari:
Protect against exceeding memory errors when parsing Ogg files

https://gerrit.wikimedia.org/r/161174

kaldari added a comment.Via ConduitSep 18 2014, 5:45 AM

For some reason, if I try to set any kind of size limit on the comments (even 100 MB), it causes several unit tests to fail. Anyone have any idea what's going on with those unit tests?
https://integration.wikimedia.org/ci/job/mwext-TimedMediaHandler-testextension/7/console

kaldari added a comment.Via ConduitSep 18 2014, 6:24 AM

In the meantime, I was able to upload the Ogg file by removing the cover art from the file.

kaldari added a comment.Via ConduitSep 18 2014, 6:45 AM

Got the unit tests passing with the fix. It's now skipping any comments that are longer than 10 KB, which should be more than enough for any of the information we're interested in.

gerritbot added a comment.Via ConduitSep 19 2014, 6:14 PM

Change 161174 merged by jenkins-bot:
Protect against exceeding memory errors when parsing Ogg files

https://gerrit.wikimedia.org/r/161174

kaldari added a comment.Via ConduitSep 19 2014, 10:01 PM

Hopefully, this is fixed now.

Gilles added a project: Multimedia.Via WebDec 4 2014, 9:24 AM
Gilles raised the priority of this task from "High" to "Unbreak Now!".Via WebDec 4 2014, 10:11 AM
Gilles moved this task to Closed on the Multimedia workboard.
Gilles lowered the priority of this task from "Unbreak Now!" to "High".Via ConduitDec 4 2014, 11:23 AM

Add Comment