Last modified: 2014-02-06 17:31:23 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 T60719, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 58719 - Jobs are no longer executed
Jobs are no longer executed
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
JobQueue (Other open bugs)
1.22.0
All All
: High major (vote)
: 1.22.x release
Assigned To: Nobody - You can work on this!
needs-release-notes
:
: 60533 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-19 22:33 UTC by Joerg
Modified: 2014-02-06 17:31 UTC (History)
9 users (show)

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


Attachments

Description Joerg 2013-12-19 22:33:10 UTC
Since the upgrade to MediaWiki 1.22 jobs can only be executed with the maintenance script runJobs.php. Jobs are still being added to the database table "jobs", but although $wgJobRunRate is set to "1", no jobs are executed during normal page requests.

The jobs_attempts field in the DB is 0, meaning MediaWiki did not try a single time to execute them and they also are not executed over time.

This still worked correctly in MediaWiki 1.21. It would be great, if it could be fixed again!
Comment 1 Andre Klapper 2014-01-02 10:57:45 UTC
Aaron / Tim: Any idea how Joerg could debug this problem further?
Comment 2 Aaron Schulz 2014-01-03 04:10:24 UTC
Apache and PHP error logs would be helpful.
Comment 3 Joerg 2014-01-03 14:21:43 UTC
There are no errors in the logs.

Let's for example say I have a job from ReplaceText: When I click the "do these replacements" button, the jobs are added to the database table. Then they are _not_ executed. And when I manually run the maintenance script runJobs.php from the shell, then they _are_ executed. And at none of these points in time do I get an error message.
Comment 4 Kevin Israel (PleaseStand) 2014-01-14 05:22:17 UTC
In ccabd0efb05e, MediaWiki was changed to start runJobs.php in the
background at the end of the request (instead of running jobs in
the same process), using the PHP binary specified as $wgPhpCli.
(The default is "/usr/bin/php".)

If you put something like $wgPhpCli = false; in your LocalSettings.php
file, are jobs executed?
Comment 5 Joerg 2014-01-15 14:38:28 UTC
Setting $wgPhpCli = false; makes the jobs run again. However, $wgPhpCli defaults to "/usr/bin/php" and I do have PHP 5.3 available at that location. So changing $wgPhpCli should not be necessary at all; things should be working with the default just fine.

Looking at ccabd0efb05e, it seems to me like one of the shell functions, wfShellWikiCmd() or wfShellExec(), do not work properly... What now?
Comment 6 Jesús Martínez Novo (Ciencia Al Poder) 2014-01-18 20:02:24 UTC
A probably cause is open_basedir restriction in effect preventing /usr/bin/php to be accessed. See bug 60208
Comment 7 Joerg 2014-01-19 03:34:43 UTC
I think this is not my problem: open_basedir (amongst other paths) contains "/usr/bin/". That should allow access to /usr/bin/php.
Comment 8 Joerg 2014-01-19 15:10:28 UTC
Ahh, open_basedir with /usr/bin/ is set when calling the script via the webserver.

In CLI mode I have: open_basedir => no value => no value.
Comment 9 Jesús Martínez Novo (Ciencia Al Poder) 2014-01-19 15:19:29 UTC
Another problem may be that /usr/bin/php is the wrong php interpreter. For example, if your host has several versions of the php CLI installed, and /usr/bin/php is an unsupported one, it may fail to execute.
Comment 10 Joerg 2014-01-19 16:57:30 UTC
The PHP interpreter basically seems to work. E.g. when I run "/usr/bin/php -v" from the shell, this returns the expected version information. Also something like /usr/bin/php -r 'phpinfo();' executes just fine.

I just realize that when I produce syntax errors on the shell, these are NOT logged to error log. (I guess that is why my error log is still empty after unsuccessfully running runJobs.php.) However, I see them on the shell and when I execute runJobs.php on the shell, I do NOT see any error.
Comment 11 Gerrit Notification Bot 2014-01-21 19:46:51 UTC
Change 108740 had a related patch set uploaded by Aaron Schulz:
Various fixes to job running code in Wiki.php

https://gerrit.wikimedia.org/r/108740
Comment 12 Yaron Koren 2014-01-28 15:47:59 UTC
*** Bug 60533 has been marked as a duplicate of this bug. ***
Comment 13 Gerrit Notification Bot 2014-01-29 23:01:07 UTC
Change 108740 merged by jenkins-bot:
Various fixes to job running code in Wiki.php

https://gerrit.wikimedia.org/r/108740
Comment 14 T. Gries 2014-01-31 21:13:55 UTC
The patch https://gerrit.wikimedia.org/r/108740 is not correct for all cases.

When you have a shared core code (the core code especially the code of /maintenance being shared by using the symbolic link method for more than one wiki) the present patch is wrong, because it does not indicate, which Wiki's job queue is treated.

The present code only runs "php runJobs.php", it missing something like

"php runJobs.php --conf=<path-to-localsettings-of-the-present-wiki>"

I hope, you understand what I mean.
Comment 15 T. Gries 2014-01-31 21:15:29 UTC
(In reply to comment #14)
> The patch https://gerrit.wikimedia.org/r/108740 is not correct for all cases.
> 
> When you have a shared core code (the core code especially the code of
> /maintenance being shared by using the symbolic link method for more than one
> wiki) the present patch is wrong, because it does not indicate, which Wiki's
> job queue is treated.
> 
> The present code only runs "php runJobs.php", it missing something like
> 
> "php runJobs.php --conf=<path-to-localsettings-of-the-present-wiki>"
> 
> I hope, you understand what I mean.

I detected this problem when running the E:ReplaceText (latest git version) together with latest git version of core, i.e. dated 2014-01-31.
Comment 16 Jesús Martínez Novo (Ciencia Al Poder) 2014-01-31 21:17:43 UTC
T. Gries: You should probably open a new bug for this
Comment 17 T. Gries 2014-01-31 21:23:18 UTC
(In reply to comment #16)
> T. Gries: You should probably open a new bug for this

I also thought so but wanted avoid this.
Comment 18 T. Gries 2014-01-31 21:25:45 UTC
this bug closed, new bug https://bugzilla.wikimedia.org/show_bug.cgi?id=60698 filed.
Comment 19 Joerg 2014-02-01 15:00:40 UTC
backport to the 1.22 branch is still missing
Comment 20 Gerrit Notification Bot 2014-02-03 08:32:43 UTC
Change 110923 had a related patch set uploaded by Nemo bis:
Various fixes to job running code in Wiki.php

https://gerrit.wikimedia.org/r/110923
Comment 21 Gerrit Notification Bot 2014-02-03 16:12:20 UTC
Change 110923 abandoned by Nemo bis:
Various fixes to job running code in Wiki.php

https://gerrit.wikimedia.org/r/110923
Comment 22 Gerrit Notification Bot 2014-02-05 17:26:46 UTC
Change 110923 restored by MarkAHershberger:
Various fixes to job running code in Wiki.php

Reason:
I want it.

https://gerrit.wikimedia.org/r/110923
Comment 23 Gerrit Notification Bot 2014-02-05 17:30:42 UTC
Change 110923 merged by jenkins-bot:
Various fixes to job running code in Wiki.php

https://gerrit.wikimedia.org/r/110923
Comment 24 Joerg 2014-02-06 17:31:23 UTC
Thanks for taking care, Mark!

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


Navigation
Links