Page MenuHomePhabricator

Reset of transcode does not queue new transcode
Closed, ResolvedPublic

Description

Resetting transcodes right now gets them deleted but no new transcodes are created. Flac files seem not affected.

E.g. I "erased" the 160p ogg transcode of https://commons.wikimedia.org/wiki/File:Hand_rubbing.webm#transcodestatus

Details

Related Gerrit Patches:
mediawiki/extensions/TimedMediaHandler : masterReplace prior fix for view-time master manipulation in transcodes
mediawiki/extensions/TimedMediaHandler : masterRevert regression breaking reset of media transcodes

Event Timeline

McZusatz created this task.May 24 2015, 6:20 PM
McZusatz raised the priority of this task from to Needs Triage.
McZusatz updated the task description. (Show Details)
McZusatz added a project: TimedMediaHandler.
McZusatz added a subscriber: McZusatz.
Restricted Application added a project: Multimedia. · View Herald TranscriptMay 24 2015, 6:20 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Can someone please look into this, or at least confirm the bug? Imo this is important, because someone could just delete all transcodes off of commons and no one could stop them or revert their action.

brion added a subscriber: brion.Jun 13 2015, 7:18 PM
brion added a comment.Jun 13 2015, 7:23 PM

Eek, this seems not good. :)

Krenair set Security to Software security bug.Jun 13 2015, 7:34 PM
Restricted Application changed the visibility from "Public (No Login Required)" to "Custom Policy". · View Herald TranscriptJun 13 2015, 7:34 PM
Restricted Application changed the edit policy from "All Users" to "Custom Policy". · View Herald Transcript
Restricted Application added a project: Security. · View Herald Transcript

This sounds like a bug that users could abuse and cause large-scale disruption, so I'm (boldly) moving it to security. @brion, @McZusatz: Feel free to revert this if I'm wrong/being stupid.

brion added a subscriber: aaron.Jun 13 2015, 7:56 PM

CCing Aaron as this seems to be caused by one of his master-DB cleanup patches.

Revert patch in gerrit: https://gerrit.wikimedia.org/r/218030

Basic problem seems to be that TMH wants rows in the 'transcode' table for anything that it might have to deal with in the future; the breaking change moved that table insertion from the time of the job queue insert to the inside of the actual transcode job.

Result seemed to be that the transcode being reset disappears from the transcode table, and the job never actually gets run, and the list of transcodes never gets updated.

aaron added a subscriber: Tgr.Jun 13 2015, 8:09 PM
brion added a comment.Jun 13 2015, 8:49 PM

Followup patch to make aaron happy by re-fixing the master/slave behavior: https://gerrit.wikimedia.org/r/#/c/218099/ :D

csteipp added a parent task: Restricted Task.Jun 15 2015, 5:29 PM

So, the commit introducing this bug has been reverted and merged but what happens to all the transcodes that were reset in the meantime and are now gone? (You can not request a fresh transcode because there is no link to do so.)

Also, I am wondering to what extend a unit test could avoid bugs in this TMH-area to pop up.

So, the commit introducing this bug has been reverted and merged but what happens to all the transcodes that were reset in the meantime and are now gone? (You can not request a fresh transcode because there is no link to do so.)

The API reset method works, but there's indeed no link yet; T103115 will have a user-friendly solution for individual resets, needs a little more work.

For the moment here's a horrid workaround:

  • open debug inspector in your browser
  • find the 'reset' link for another transcode
  • edit its data attributes to list the desired transcode (eg '360p.webm' or '480p.ogv')
  • now, click that link and hit 'ok' in the dialog

I plan to do a batch bot run resetting all the missing transcodes on the site but haven't gotten to it yet, will file a task so we don't forget.

Also, I am wondering to what extend a unit test could avoid bugs in this TMH-area to pop up.

Yeah that'd help a lot. :)

Also, I am wondering to what extend a unit test could avoid bugs in this TMH-area to pop up.

Yeah that'd help a lot. :)

I don't do php but if you point me to the source code file where to add tests for TMH, I may have a look and add some.

csteipp closed this task as Resolved.Jul 2 2015, 3:26 PM
csteipp claimed this task.
csteipp added a subscriber: csteipp.

Has anyone backported the revert and fixup patches to the REL1_25 branch?

It seems like the issue is fixed in master, so I'm going to close this for now.

demon added a subscriber: demon.Jul 13 2015, 6:22 PM

This is a deployed, but not bundled extension. Does it actually get a release or do we just backport to REL1_25 and then open this task?

Based on https://wikiapiary.com/wiki/Extension:TimedMediaHandler, it seems popular enough I would mention it in the release notes. But severity is low enough I'm fine either way.

demon added a comment.Jul 14 2015, 1:05 AM

I was wondering if it was a better idea to just announce these bugs relating to non-bundled extensions in a batch. I was looking at this, T97083 and T88964.

Works for me

csteipp changed the visibility from "Custom Policy" to "Public (No Login Required)".Aug 10 2015, 9:59 PM
csteipp changed the edit policy from "Custom Policy" to "All Users".
csteipp changed Security from Software security bug to None.
Restricted Application added a subscriber: Matanya. · View Herald TranscriptAug 10 2015, 9:59 PM

CVE-2015-6735 was assigned for this.