atril on opening ptc40.ps.bz2 file crashed with SIGSEGV in INT_cairo_surface_set_device_scale()

Bug #1909663 reported by Markus Kuhn
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
atril (Ubuntu)
Confirmed
Medium
Unassigned
cairo (Ubuntu)
Confirmed
Undecided
Unassigned
glib2.0 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Reproduce with:

$ wget http://pages.cs.wisc.edu/~yeoh/nt/ptc40.ps.bz2
$ $ atril ptc40.ps.bz2
undefined -21

** (atril:9516): WARNING **: 11:27:21.344: Error rendering thumbnail
undefined -21

[...]
Segmentation fault (core dumped)

Actual behaviour: First page of PostScript file displays briefly,
then segmentation fault.

Expected behaviour: no segfault

$ lsb_release -rd
Description: Ubuntu 20.04.1 LTS
Release: 20.04
$ apt-cache policy atril
atril:
  Installed: 1.24.0-1
  Candidate: 1.24.0-1
  Version table:
 *** 1.24.0-1 500
        500 http://gb.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        100 /var/lib/dpkg/status

ProblemType: Crash
DistroRelease: Ubuntu 20.04
Package: atril 1.24.0-1
ProcVersionSignature: Ubuntu 5.4.0-58.64-generic 5.4.73
Uname: Linux 5.4.0-58-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.14
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: XFCE
Date: Wed Dec 30 11:48:42 2020
ExecutablePath: /usr/bin/atril
InstallationDate: Installed on 2020-12-21 (8 days ago)
InstallationMedia: Xubuntu 20.04.1 LTS "Focal Fossa" - Release amd64 (20200731)
ProcCmdline: atril ptc40.ps.bz2
SegvAnalysis:
 Segfault happened at: 0x7f4873caa5f4 <cairo_surface_set_device_scale+4>: mov 0x1c(%rdi),%eax
 PC (0x7f4873caa5f4) ok
 source "0x1c(%rdi)" (0x0000001c) not located in a known VMA region (needed readable region)!
 destination "%eax" ok
SegvReason: reading NULL VMA
Signal: 11
SourcePackage: atril
StacktraceTop:
 cairo_surface_set_device_scale () from /lib/x86_64-linux-gnu/libcairo.so.2
 ?? () from /lib/x86_64-linux-gnu/libatrilview.so.3
 ?? () from /lib/x86_64-linux-gnu/libatrilview.so.3
 g_closure_invoke () from /lib/x86_64-linux-gnu/libgobject-2.0.so.0
 ?? () from /lib/x86_64-linux-gnu/libgobject-2.0.so.0
Title: atril crashed with SIGSEGV in cairo_surface_set_device_scale()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: VPN adm building cdrom dialout dip ecad lpadmin lxd netos plugdev raspberrypi safety sambashare sec-grp sec-web sudo teaching techreport video wednesday wwwlogs wwwpages wwwsvn-admin
modified.conffile..etc.apport.crashdb.conf: [modified]
mtime.conffile..etc.apport.crashdb.conf: 2020-12-30T11:44:35.909585
separator:

Revision history for this message
Markus Kuhn (markus-kuhn) wrote :
Revision history for this message
Markus Kuhn (markus-kuhn) wrote :
information type: Private → Public
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 INT_cairo_surface_set_device_scale (surface=0x0, x_scale=1, y_scale=1) at ../../../../src/cairo-surface.c:1793
 set_device_scale_on_surface (device_scale=<optimized out>, surface=<optimized out>) at ev-pixbuf-cache.c:266
 copy_job_to_job_info (job_render=job_render@entry=0x55aa50112cb0, job_info=job_info@entry=0x55aa4fa92440, pixbuf_cache=pixbuf_cache@entry=0x55aa50066f30) at ev-pixbuf-cache.c:278
 job_finished_cb (job=<optimized out>, pixbuf_cache=0x55aa50066f30) at ev-pixbuf-cache.c:330
 g_closure_invoke () from /tmp/apport_sandbox_6hg0kzgh/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.6400.3

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 on opening ptc40.ps.bz2 file crashed with SIGSEGV in
- cairo_surface_set_device_scale()
+ INT_cairo_surface_set_device_scale()
tags: removed: need-amd64-retrace
Norbert (nrbrtx)
no longer affects: libcairo (Ubuntu)
Revision history for this message
Norbert (nrbrtx) wrote :

Also happens on 18.04 LTS - it is bug 1909666 .

All these "unknown VMA" stuff started to appear after Spectre and Meltdown "fixes".

So this bug came from back-end libraries and not from Atril itself.

tags: added: bionic
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
Changed in cairo (Ubuntu):
status: New → Confirmed
Changed in glib2.0 (Ubuntu):
status: New → Confirmed
Revision history for this message
Norbert (nrbrtx) wrote :

Workaround is the following:

sudo apt-get install ghostscript

bzip2 --decompress ptc40.ps.bz2
ps2pdf ptc40.ps
atril ptc40.pdf

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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