vs-thumb should not rely on standard streams to communicate result image back

Bug #1556835 reported by Thomas Voß
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
Critical
Alejandro J. Cura
thumbnailer (Ubuntu)
Fix Released
High
Michi Henning

Bug Description

vs-thumb right now streams extracted data to stdout by default (see [1]). The approach is brittle in the sense that any component (e.g., gstreamer or gstreamer plugin) writing to stdout can easily break the thumbnail. We have zero control over stdout and should thus either:

  (1.) Rely on specifying an explicit temporary destination file or
  (2.) Open a dedicated communication pipe to communicate back the resulting thumbnail to the calling process.

Please also see [2.] for the respective product bug.

[1.] http://bazaar.launchpad.net/~unity-team/thumbnailer/trunk/view/head:/src/vs-thumb/thumbnailextractor.cpp#L371
[2.] https://bugs.launchpad.net/zhongshan/+bug/1554867

Related branches

Revision history for this message
Michi Henning (michihenning) wrote :

Writing via a temp file is way more expensive. (The old thumbnailer did that.)

Dedicated pipe sounds like the way to go.

Changed in thumbnailer (Ubuntu):
assignee: nobody → Michi Henning (michihenning)
importance: Undecided → High
Revision history for this message
Michi Henning (michihenning) wrote :

BTW, the problem referenced in the bug report isn't caused by something writing to stdout. There error there is caused by a missing/broken codec, it seems.

Revision history for this message
Michi Henning (michihenning) wrote :

Not sure there is a bug there at all, actually. The media scanner indexes the file, and the thumbnailer can't make a thumbnail for it because there is no codec for the file. So, no thumbnail. That's expected and normal behavior.

Revision history for this message
Michi Henning (michihenning) wrote :

Thomas tells me that this reliably happens for any video taken on an M10 or Turbo. Looks like something in gstreamer is indeed writing to stdout. I'll change it to run the pipe via a different file descriptor.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in thumbnailer (Ubuntu):
status: New → Confirmed
Changed in canonical-device-images:
importance: Undecided → Critical
status: New → Confirmed
Changed in thumbnailer (Ubuntu):
status: Confirmed → In Progress
affects: canonical-device-images → canonical-devices-system-image
Changed in canonical-devices-system-image:
assignee: nobody → Alejandro J. Cura (alecu)
milestone: none → ww08-2016
Changed in canonical-devices-system-image:
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package thumbnailer - 2.4+16.04.20160321-0ubuntu1

---------------
thumbnailer (2.4+16.04.20160321-0ubuntu1) xenial; urgency=medium

  [ Michi Henning ]
  * vs-thumb now uses a separate pipe instead of writing to stdout (LP: #1556835).

  [ CI Train Bot ]
  * No-change rebuild.

 -- Michi Henning <email address hidden> Mon, 21 Mar 2016 02:12:07 +0000

Changed in thumbnailer (Ubuntu):
status: In Progress → Fix Released
Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.