Last modified: 2014-09-11 19:13:05 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 T72227, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 70227 - ParserOutput::getTimes and Profiler::getTime return wrong results in HHVM
ParserOutput::getTimes and Profiler::getTime return wrong results in HHVM
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
https://github.com/facebook/hhvm/pull...
: hhvm
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-31 01:48 UTC by Ori Livneh
Modified: 2014-09-11 19:13 UTC (History)
5 users (show)

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


Attachments

Description Ori Livneh 2014-08-31 01:48:55 UTC
The PHP function getrusage() invokes the system call of the same name with RUSAGE_SELF, which requests usage information for the calling process. Callers of getrusage() in MediaWiki assume the PHP process is not shared by multiple requests, and that the resource usage measured by RUSAGE_SELF is thus attributable to the current request. These assumptions are false under HHVM.

Unfortunately, the getrusage() PHP function currently does not allow callers to request RUSAGE_THREAD info. I submitted a pull-request to HHVM to add this feature: <https://github.com/facebook/hhvm/pull/3632>. We need to update ParserOutput::getTimes and Profiler::getTime once it is merged.

The other caller of getrusage() is a benchmarkParse.php. It doesn't need to be fixed, because it's a standalone maintenance script.
Comment 1 Gerrit Notification Bot 2014-09-05 00:01:48 UTC
Change 158550 had a related patch set uploaded by Ori.livneh:
Add wfGetRusage(), wrapping getrusage(2) syscall

https://gerrit.wikimedia.org/r/158550
Comment 2 Gerrit Notification Bot 2014-09-10 19:20:06 UTC
Change 158550 merged by jenkins-bot:
Under HHVM, measure resources for the thread, not calling process

https://gerrit.wikimedia.org/r/158550
Comment 3 Gerrit Notification Bot 2014-09-11 11:24:37 UTC
Change 159703 had a related patch set uploaded by Ori.livneh:
Under HHVM, measure resources for the thread, not calling process

https://gerrit.wikimedia.org/r/159703
Comment 4 Gerrit Notification Bot 2014-09-11 11:24:58 UTC
Change 159704 had a related patch set uploaded by Ori.livneh:
Under HHVM, measure resources for the thread, not calling process

https://gerrit.wikimedia.org/r/159704
Comment 5 Gerrit Notification Bot 2014-09-11 17:12:20 UTC
Change 159704 merged by jenkins-bot:
Under HHVM, measure resources for the thread, not calling process

https://gerrit.wikimedia.org/r/159704
Comment 6 Gerrit Notification Bot 2014-09-11 17:20:30 UTC
Change 159703 merged by jenkins-bot:
Under HHVM, measure resources for the thread, not calling process

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

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


Navigation
Links