Page MenuHomePhabricator

Image thumbnailing on WAMP sometimes locks up
Closed, DeclinedPublic

Description

Author: ronald

Description:
We run a fairly large corporate Wiki (150k+ users) using mediaWiki v1.17, PHP 5.2.6 on a WAMP stack. We notice that sometimes jobs that are executed on the command line (using the PHP passthru command) get stuck. These jobs include:

  • Image thumbnailing (ImageMagick)
  • PDF generating (using an extension and external PDF generator)
  • Math conversion (LaTex)

The cause and symptoms are as follows:

  • 2 command line jobs are requested at more or less the same time
  • One of the jobs hangs: Taskmanager will show 'cmd'and 'convert' jobs that never finish, and one of Apache's worker threads will remain in W state.
  • More jobs get requested and will get stuck as well, to the point where all Apache worker threads are locked.

I can reliably reproduce this issue in our test environment.

The bug appears to be caused by a known PHP issue: https://bugs.php.net/bug.php?id=44942

A workaround for this bug has been tested: we have modified includes/GlobalFuncitons.php with the suggested fix, that is: call session_write_close() before calling passthru(), and calling session_start() afterwards.

Given that this is a (long-standing) PHP bug, is this something that should be fixed in the MediaWiki core code? At this time, it appears to be our only option.


Version: 1.17.x
Severity: normal
Platform: PC

Details

Reference
bz37539

Related Objects

StatusSubtypeAssignedTask
OpenNone
DeclinedNone

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:30 AM
bzimport set Reference to bz37539.
bzimport added a subscriber: Unknown Object (MLST).

ronald wrote:

To reproduce:

  1. Open 2 browser windows to your Wiki (when MediaWiki is hosted on multiple servers, make sure both browsers point at the same server)
  2. Edit a different article in each of the browsers (or create new test articles)
  3. Add an (existing) image to each of the articles, specify a thumbnail or resize for these images.
  4. Hit Preview or Submit on both browsers at the same time (within 1 second of each other)
  5. One or both browser windows will fail to load. On the server, there will be a stuck cmd.exe and/or convert.exe job in Taskmgr.

To clear this error, bounce Apache.

Have you tried reproducing this with something newer than MW 1.17?

Ronald In 't Velt: Does this still happen in a supported version of MediaWiki (preferably 1.22)?

No news in mentioned upstream ticket in https://bugs.php.net/bug.php?id=44942

Adding bug 41371 as blocked as it's an issue with thumbnailing.

Aklapper subscribed.

https://bugs.php.net/bug.php?id=44942 says

[2016-07-03 05:53 UTC] this should be fixed in latest.

No reply to the last two comments in this ticket, hence assuming it is not an issue anymore in supported MediaWiki / PHP version.
If there is still a problem, please reopen and provide steps to reproduce plus version information for MediaWiki and PHP. Thanks!