Bug 87866 - Xorg crashes when opening very large images
Summary: Xorg crashes when opening very large images
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/Acceleration/glamor (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-30 15:42 UTC by Clément Guérin
Modified: 2015-01-05 09:24 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Possible glitch when the picture is loading (456.00 KB, image/png)
2014-12-30 16:34 UTC, Clément Guérin
no flags Details
Loaded picture properly displayed (1.20 MB, image/png)
2014-12-30 16:34 UTC, Clément Guérin
no flags Details

Description Clément Guérin 2014-12-30 15:42:35 UTC
Xorg is crashing immediately when opening these two images in Firefox:

http://upload.wikimedia.org/wikipedia/commons/9/9f/Systemesolaire2.jpg
http://photojournal.jpl.nasa.gov/jpeg/PIA16700.jpg

In journalctl I see this error:

Dec 30 16:31:56 udderly gdm-Xorg-:0[1093]: Xorg.bin: glamor_largepixmap.c:787: glamor_merge_clipped_regions: Assertion `temp_priv->type != GLAMOR_TEXTURE_LARGE' failed.

Here's a relevant thread: https://bbs.archlinux.org/viewtopic.php?pid=1473196

Linux 3.18.1
xorg-server 1.16.3
xf86-video-ati 1:7.5.0
HD 7950
Comment 1 Clément Guérin 2014-12-30 16:32:10 UTC
Okay, I commented out this assertion: http://cgit.freedesktop.org/xorg/xserver/tree/glamor/glamor_largepixmap.c?h=server-1.16-branch#n787

Not crashing anymore and the images seem to be displayed correctly! Is it a good idea to leave so many assertions in a production code? :/
Comment 2 Clément Guérin 2014-12-30 16:34:12 UTC
Created attachment 111525 [details]
Possible glitch when the picture is loading
Comment 3 Clément Guérin 2014-12-30 16:34:51 UTC
Created attachment 111526 [details]
Loaded picture properly displayed
Comment 4 Clément Guérin 2014-12-30 17:04:06 UTC
I found a way to crash Xorg when the assertion is disabled:
- open one of the two images
- force reloading with Ctrl + F5
- while it's reloading resize the browser window to force redrawing.

Backtrace:
#0  0x00007fb3b7ecda97 in raise () from /usr/lib/libc.so.6
(gdb) backtrace
#0  0x00007fb3b7ecda97 in raise () from /usr/lib/libc.so.6
#1  0x00007fb3b7ecee6a in abort () from /usr/lib/libc.so.6
#2  0x00007fb3b7f0d2b3 in __libc_message () from /usr/lib/libc.so.6
#3  0x00007fb3b7f1272e in malloc_printerr () from /usr/lib/libc.so.6
#4  0x00007fb3b7f142b3 in _int_malloc () from /usr/lib/libc.so.6
#5  0x00007fb3b7f16be5 in calloc () from /usr/lib/libc.so.6
#6  0x00007fb3b210f7f8 in ?? () from /usr/lib/libgbm.so.1
#7  0x00007fb3b231d0f2 in glamor_egl_create_argb8888_based_texture ()
   from /usr/lib/xorg/modules/libglamoregl.so
#8  0x00007fb3b234966c in ?? () from /usr/lib/xorg/modules/libglamoregl.so
#9  0x00007fb3b2349e04 in ?? () from /usr/lib/xorg/modules/libglamoregl.so
#10 0x00007fb3b2320ca8 in glamor_create_pixmap ()
   from /usr/lib/xorg/modules/libglamoregl.so
#11 0x00007fb3b27bd981 in ?? ()
   from /usr/lib/xorg/modules/drivers/radeon_drv.so
#12 0x0000000000433106 in ?? ()
#13 0x0000000000437807 in ?? ()
#14 0x000000000043b9a6 in ?? ()
#15 0x00007fb3b7eba040 in __libc_start_main () from /usr/lib/libc.so.6
#16 0x0000000000425dce in _start ()
Comment 5 Clément Guérin 2014-12-30 17:06:12 UTC
Another backtrace when doing the same operation:

#0  0x00007f15c9ffea97 in raise () from /usr/lib/libc.so.6
#1  0x00007f15c9fffe6a in abort () from /usr/lib/libc.so.6
#2  0x000000000059aace in OsAbort ()
#3  0x00000000004786ac in ddxGiveUp ()
#4  0x00000000005a0532 in ?? ()
#5  0x00000000005a139d in FatalError ()
#6  0x000000000059841c in ?? ()
#7  <signal handler called>
#8  0x00007f15ca05054d in __memset_sse2 () from /usr/lib/libc.so.6
#9  0x00007f15c31bfbe1 in ?? () from /usr/lib/xorg/modules/dri/radeonsi_dri.so
#10 0x00007f15c42408c1 in ?? () from /usr/lib/libgbm.so.1
#11 0x00007f15c444e0f2 in glamor_egl_create_argb8888_based_texture ()
   from /usr/lib/xorg/modules/libglamoregl.so
#12 0x00007f15c447a66c in ?? () from /usr/lib/xorg/modules/libglamoregl.so
#13 0x00007f15c447ae04 in ?? () from /usr/lib/xorg/modules/libglamoregl.so
#14 0x00007f15c4451ca8 in glamor_create_pixmap ()
   from /usr/lib/xorg/modules/libglamoregl.so
#15 0x00007f15c48ee981 in ?? ()
   from /usr/lib/xorg/modules/drivers/radeon_drv.so
#16 0x0000000000433106 in ?? ()
#17 0x0000000000437807 in ?? ()
#18 0x000000000043b9a6 in ?? ()
#19 0x00007f15c9feb040 in __libc_start_main () from /usr/lib/libc.so.6
#20 0x0000000000425dce in _start ()
Comment 6 Jason Ekstrand 2014-12-30 19:49:12 UTC
Also crashes X with glamor+modeset on intel.
Comment 7 Clément Guérin 2014-12-30 20:00:36 UTC
Comment #2 (1st attachment) is definitely a glitch, picture is displaying fine with SNA.
Comment 8 Keith Packard 2014-12-31 20:45:51 UTC
It seems like you're not testing with the master version of the X server code? We fixed a bug like this back in August, but that fix is only on master.
Comment 9 Clément Guérin 2015-01-03 19:06:45 UTC
(In reply to Keith Packard from comment #8)
> It seems like you're not testing with the master version of the X server
> code? We fixed a bug like this back in August, but that fix is only on
> master.

Yes, I've been testing with the 1.16 branch. I don't have access to my desktop pc anymore, though. Can't confim if it's fixed.
Comment 10 Michel Dänzer 2015-01-05 09:24:44 UTC
I can't reproduce the crash with xserver Git master. Reopen if you can.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.