atril-thumbnailer crashed with SIGSEGV in ev_document_misc_surface_rotate_and_scale()

Bug #1540018 reported by Lyn Perrine
176
This bug affects 27 people
Affects Status Importance Assigned to Milestone
atril (Ubuntu)
Fix Released
Medium
Unassigned
Xenial
Fix Released
High
Vlad Orlov
Yakkety
Won't Fix
Undecided
Unassigned

Bug Description

[Impact]

Buggy epub handling code makes atril-thumbnailer crash on the first epub document it encounters.

Until we write the proper thumbnailing code for epubs, the quick fix is just to disable thumbnail generation for this type of documents. That fix is provided in the debdiff attached to the report.

The bug is old, and it still haunts Xenial users when they just use the file manager and enter some directory which contains at least one epub document. So would be nice to have the fix backported to Xenial.

[Test Case]

Steps to reproduce:

- have some epub document
- open file manager (Caja or some other one) and enter
  the directory where the epub document is
- if apport is enabled, it will show the message about
  atril-thumbnailer crash (which is annoying)
- dmesg output will have a message about the crash too

If you need to reproduce it once more, first remove all the files from ~/.cache/thumbnails/fail directory.

In case you need some epubs for testing, you can find them at: https://github.com/IDPF/epub3-samples/releases

[Regression Potential]

None. This quick fix just makes sure that crashy code won't run at all. Other types of documents (like pdfs) aren't affected.

[Original Description]

On a xenial desktop with both mate and LXQt open LXQt I mounted another partition and tried to open an mp3 podcast and then apport came up saying atril thumbnailer had crashed when I had pcmanfm-qt open in LXQt. I did mount a home parition with a lot of different files in it pdf ogg and several other things.

ProblemType: Crash
DistroRelease: Ubuntu 16.04
Package: atril 1.12.2-1
ProcVersionSignature: Ubuntu 4.3.0-7.18-generic 4.3.3
Uname: Linux 4.3.0-7-generic x86_64
ApportVersion: 2.19.4-0ubuntu1
Architecture: amd64
CurrentDesktop: LXQt
Date: Sat Jan 30 16:35:38 2016
ExecutablePath: /usr/bin/atril-thumbnailer
InstallationDate: Installed on 2015-11-28 (64 days ago)
InstallationMedia: Ubuntu-MATE 16.04 LTS "Xenial Xerus" - Alpha amd64 (20151127)
ProcCmdline: atril-thumbnailer -s 128 file:///media/username/9c6bffca-6fb6-4ac9-82ce-02fb9ff1e8e1/brendanperrine/Downloads/producingoss.epub /home/username/.thumbnails/normal/6e702ce8bebd1e4696b3f56bbbf83119.png
SegvAnalysis:
 Segfault happened at: 0x7f6fffbb8b2c <cairo_image_surface_get_width+12>: mov (%rax),%eax
 PC (0x7f6fffbb8b2c) ok
 source "(%rax)" (0x2f2f2f3a656c6966) not located in a known VMA region (needed readable region)!
 destination "%eax" ok
SegvReason: reading unknown VMA
Signal: 11
SourcePackage: atril
StacktraceTop:
 cairo_image_surface_get_width () from /usr/lib/x86_64-linux-gnu/libcairo.so.2
 ev_document_misc_surface_rotate_and_scale () from /usr/lib/x86_64-linux-gnu/libatrildocument.so.3
 ?? () from /usr/lib/x86_64-linux-gnu/atril/3/backends/libepubdocument.so
 ?? ()
 ?? ()
Title: atril-thumbnailer crashed with SIGSEGV in cairo_image_surface_get_width()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip libvirtd lpadmin plugdev sambashare sudo

Revision history for this message
Lyn Perrine (walterorlin) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 ?? ()
 ?? ()
 ev_document_misc_surface_rotate_and_scale () from /tmp/apport_sandbox_rJORCp/usr/lib/x86_64-linux-gnu/libatrildocument.so.3
 epub_document_thumbnails_get_thumbnail () from /tmp/apport_sandbox_rJORCp/usr/lib/x86_64-linux-gnu/atril/3/backends/libepubdocument.so
 atril_thumbnail_pngenc_get ()

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : StacktraceSource.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in atril (Ubuntu):
importance: Undecided → Medium
summary: atril-thumbnailer crashed with SIGSEGV in
- cairo_image_surface_get_width()
+ ev_document_misc_surface_rotate_and_scale()
tags: removed: need-amd64-retrace
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in atril (Ubuntu):
status: New → Confirmed
information type: Private → Public
Revision history for this message
Vlad Orlov (monsta) wrote :

Confirmed, report added upstream.

https://github.com/mate-desktop/atril/issues/187

tags: added: bugpattern-needed
Revision history for this message
Knieriemen Michael (knieriemen-michael) wrote :

Fehlermeldung. Installation von Ubuntu abgebrochen.

Ubuntu Mate 16.04

bedfojo (bedfojo)
no longer affects: teatrillu
Vlad Orlov (monsta)
tags: added: yakkety
Revision history for this message
Vlad Orlov (monsta) wrote :

Uploaded a patch which disables thumbnail generation for epubs, fixing the crash.

tags: added: patch
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "fix-thumbnailer-crash.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

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

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

Changed in atril (Ubuntu Xenial):
status: New → Confirmed
Changed in atril (Ubuntu Yakkety):
status: New → Confirmed
Revision history for this message
Vlad Orlov (monsta) wrote :

Fix released in Zesty (atril 1.18), other releases still need the patch.

Changed in atril (Ubuntu):
status: Confirmed → Fix Released
Vlad Orlov (monsta)
tags: added: ubuntu-mate-xenial-sru
removed: yakkety
Revision history for this message
Vlad Orlov (monsta) wrote :
Revision history for this message
Vlad Orlov (monsta) wrote :

[Impact]

Buggy epub handling code makes atril-thumbnailer crash
on the first epub document it encounters.

Until we write the proper thumbnailing code for epubs,
the quick fix is just to disable thumbnail generation
for this type of documents. That fix is provided in
the debdiff attached to the report.

The bug is old, and it still haunts Xenial users when
they just use the file manager and enter some directory
which contains at least one epub document. So would be
nice to have the fix backported to Xenial.

[Test Case]

Steps to reproduce:

- have some epub document
- open file manager (Caja or some other one) and enter
  the directory where the epub document is
- if apport is enabled, it will show the message about
  atril-thumbnailer crash (which is annoying)
- dmesg output will have a message about the crash too

If you need to reproduce it once more, first remove all
the files from ~/.cache/thumbnails/fail directory.

In case you need some epubs for testing, you can find
them at: https://github.com/IDPF/epub3-samples/releases

[Regression Potential]

None. This quick fix just makes sure that crashy code
won't run at all. Other types of documents (like pdfs)
aren't affected.

Simon Quigley (tsimonq2)
description: updated
Changed in atril (Ubuntu Xenial):
assignee: nobody → Vlad Orlov (monsta)
importance: Undecided → High
status: Confirmed → In Progress
Changed in atril (Ubuntu Yakkety):
status: Confirmed → Won't Fix
Revision history for this message
Simon Quigley (tsimonq2) wrote :

Yakkety is EOL, marking as Won't Fix.

Revision history for this message
Vlad Orlov (monsta) wrote :

Yeah, it should be marked so - I just don't have the rights to do that.

Revision history for this message
Simon Quigley (tsimonq2) wrote :

Uploaded.

Changed in atril (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-xenial
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

The fix has been accepted into -proposed. Please test as per the regular SRU policy.

Revision history for this message
Vlad Orlov (monsta) wrote :

Ok, testing...

- downloaded epub30-spec.epub from https://github.com/IDPF/epub3-samples/releases
- removed my locally built atril, atril-common, libatrildocument3, libatrilview3
- installed version 1.12.2-1ubuntu0.1 of these packages from xenial-proposed
- opened the download folder in Caja file manager

Thumbnail for epub30-spec.epub isn't created, and atril-thumbnailer does not crash (confirmed with dmesg output). The fix works.

tags: added: verification-done verification-done-xenial
removed: verification-needed verification-needed-xenial
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for atril has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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

This bug was fixed in the package atril - 1.12.2-1ubuntu0.1

---------------
atril (1.12.2-1ubuntu0.1) xenial; urgency=medium

  * fix-thumbnailer-crash.patch: new patch. Disables thumbnail generation
    for epub documents, stopping atril-thumbnailer crashes (LP: #1540018)

 -- Vlad Orlov <email address hidden> Mon, 30 Oct 2017 18:06:38 +0300

Changed in atril (Ubuntu Xenial):
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.