https://bugzilla.wikimedia.org/show_bug.cgi?id=70227

            Bug ID: 70227
           Summary: ParserOutput::getTimes and Profiler::getTime return
                    wrong results in HHVM
           Product: MediaWiki
           Version: unspecified
          Hardware: All
               URL: https://github.com/facebook/hhvm/pull/3632
                OS: All
            Status: NEW
          Keywords: hiphop
          Severity: normal
          Priority: Unprioritized
         Component: General/Unknown
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]
       Web browser: ---
   Mobile Platform: ---

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to