Page MenuHomePhabricator

Disallow enabling "XHGui" and "Inline profile" together
Open, MediumPublic

Description

If both "XHGui" and "Inline profile" are checked in the WikimediaDebug extension, we end up with an empty profile in XHGui.

Example: https://performance.wikimedia.org/xhgui/?url=af13a0fb-7f76-430a-b48b-129c45c584ec

Related: the resulting error message when that profile is viewed is completely unhelpful (T259950).

Event Timeline

Imported from GitHub issue wikimedia/WikimediaDebug#24.


@Krinkle wrote on 8 Feb 2020:

When enabling both, XHGui gets the short end of the stick.

The wmf-config/profile.php file starts Tideways capturing when either of these two options is enabled.

Then MediaWiki's Profiler class (given "Inline profiler" is on) will at some point during Setup.php try to start it but do nothing as its already in capturing mode (fine, harmless).

Then, at some point MediaWiki's done and its Profiler classes turn off Tideways, get the traces, and output them via ProfilerOutputText (if possible).

Then, a little later, the shutdown function for XHGui in wmf-config/profiler.php kicks in and ends up getting an empty array, which it then submits to XHGui, which in turn can't render it as it's invalid/garbage.

Krinkle renamed this task from "X-Wikimedia-Debug: profile; forceprofile" results in empty XHGui profile to Disallow enabling "XHGui" and "Inline profile" together.Aug 10 2020, 10:48 PM
Krinkle added a project: WikimediaDebug.
Krinkle triaged this task as Medium priority.Aug 11 2020, 12:24 AM

@CDanis got bit by this trying to track down T266865 today.

I'm going to take a stab at turning this into a radio button in the extension, since that seems like a quicker/easier fix than buffering the traces to send to both destinations. (If we eventually implement the latter, we can revert the former.)

Removing inactive task assignee (please do so as part of offboarding processes).