Page MenuHomePhabricator

TimingMetric warning on File: page after uploading video file
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • set up a MediaWiki instance (used MediaWiki docker)
  • install TimedMediaHandler extension
  • upload a video file through Special:Upload (used copy of [[:File:Caminandes_3_-_Llamigos_-_Blender_Animated_Short.webm]] from Commons, confirmed with another random .ogv file)

What happens?:

This warning:

Warning: Stats: stop() called before start() for metric 'media_thumbnail_generate_transform_seconds' in /var/www/html/w/includes/libs/Stats/Metrics/TimingMetric.php on line 80

appears on output on the File: page immediately after upload, and in the error log; otherwise nothing seems untoward.

It's possible that something in the core MediaHandler classes does something different from TimedMediaHandler and something isn't getting called in a base class that should, but I can't identify any instances of the string "media_thumbnail_generate_transform_seconds" in core except for the line that triggers the call that gives this warning, in MediaHandlerState::generateAndSaveThumb:

$timer = $statsFactory->getTiming( 'media_thumbnail_generate_transform_seconds' )
  ->copyToStatsdAt( 'media.thumbnail.generate.transform' );
  $timer->start();

So why is it warning? What's producing this stat for other images? Is it being run by some external system that's set up for other file types in the Docker config?

What should have happened instead?:

No warnings should display. If the warning indicated a problem, that problem should be fixed.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

git master

Other information (browser name/version, screenshots, etc.):

error.png (1×2 px, 1 MB)

Event Timeline

Change #1048020 had a related patch set uploaded (by Cwhite; author: Cwhite):

[mediawiki/core@master] File: handle stats for recursive transformation calls

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

Change #1048020 merged by jenkins-bot:

[mediawiki/core@master] File: handle stats for recursive transformation calls

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

Umherirrender assigned this task to colewhite.
Umherirrender removed a project: Patch-For-Review.