SIGILL caused by libcairo when running gnome-terminal

Bug #21315 reported by Marek Sieradzki
26
Affects Status Importance Assigned to Milestone
libcairo (Ubuntu)
Fix Released
Medium
Sebastien Bacher

Bug Description

Overview Description:

Gnome-terminal crashes and its probably error in libcairo2 package.

Steps to reproduce:

Open gnome-terminal, Click on Edit->Current profile in main menu.

Actual results:

It crashes.
Running in gdb it produces this:

Program received signal SIGILL, Illegal instruction.
---Type <return> to continue, or q <return> to quit---
[Switching to Thread -1224223040 (LWP 17469)]
0xb7640254 in _cairo_pixman_have_mmx () from /usr/lib/libcairo.so.2

Build Date & Platform:
Most recent gnome-terminal and libcairo.
AMD K6-2 (i586) kernel package: linux-image-2.6.12.8-386

https://bugs.freedesktop.org/show_bug.cgi?id=4414: https://bugs.freedesktop.org/show_bug.cgi?id=4414

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for your bug. Could you get a backtrace with "thread apply all bt" from gdb?

Revision history for this message
Marek Sieradzki (mootant) wrote :
Download full text (5.1 KiB)

(In reply to comment #1)
> Thanks for your bug. Could you get a backtrace with "thread apply all bt" from
gdb?]

Looks like it's the same:

(gdb) exec-file gnome-terminal
(gdb) thread apply all bt
(gdb) run
Starting program: /usr/bin/gnome-terminal
Using host libthread_db library "/lib/tls/libthread_db.so.1".
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1225095488 (LWP 18677)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)...

Read more...

Revision history for this message
Sebastien Bacher (seb128) wrote :

no, you have to enter than after the crash to get the backtrace of it

Revision history for this message
Marek Sieradzki (mootant) wrote :
Download full text (14.6 KiB)

(In reply to comment #3)
> no, you have to enter than after the crash to get the backtrace of it

(gdb) thread apply all bt

Thread 2 (Thread -1236739152 (LWP 19944)):
#0 0xb779f231 in __read_nocancel () from /lib/tls/libpthread.so.0
#1 0xb773a2ad in g_timeout_add () from /usr/lib/libglib-2.0.so.0
#2 0xb7754844 in g_static_private_free () from /usr/lib/libglib-2.0.so.0
#3 0xb779a1ee in start_thread () from /lib/tls/libpthread.so.0
#4 0xb76af03e in clone () from /lib/tls/libc.so.6

Thread 1 (Thread -1225021760 (LWP 19930)):
#0 0xb757d254 in _cairo_pixman_have_mmx () from /usr/lib/libcairo.so.2
#1 0xb757d2ee in _cairo_pixman_compose_setup_mmx () from /usr/lib/libcairo.so.2
#2 0xb756be0f in _cairo_pixman_region_intersect () from /usr/lib/libcairo.so.2
#3 0xb75519ea in cairo_image_surface_get_height () from /usr/lib/libcairo.so.2
#4 0xb75566f9 in cairo_surface_set_device_offset () from /usr/lib/libcairo.so.2
#5 0xb75604fb in cairo_ft_scaled_font_lock_face () from /usr/lib/libcairo.so.2
#6 0xb754d55a in cairo_scaled_font_glyph_extents () from /usr/lib/libcairo.so.2
#7 0xb754b5b4 in cairo_status_to_string () from /usr/lib/libcairo.so.2
#8 0xb755e54f in cairo_ft_scaled_font_unlock_face () from /usr/lib/libcairo.so.2
#9 0xb754cdb3 in cairo_scaled_font_destroy () from /usr/lib/libcairo.so.2
#10 0xb754d2fc in cairo_scaled_font_glyph_extents () from /usr/lib/libcairo.so.2
#11 0xb75e3eba in pango_cairo_fc_font_get_type () from
/usr/lib/libpangocairo-1.0.so.0
#12 0xb78fffb5 in pango_font_get_glyph_extents () from /usr/lib/libpango-1.0.so.0
#13 0xb6559cc0 in ?? () from /usr/lib/pango/1.4.0/modules/pango-basic-fc.so
#14 0x0839fc90 in ?? ()
#15 0x000001e3 in ?? ()
#16 0x00000000 in ?? ()
#17 0xbff1470c in ?? ()
#18 0x084e8780 in ?? ()
#19 0x00000000 in ?? ()
#20 0x084e7d88 in ?? ()
#21 0xb7349bca in pango_fc_font_lock_face () from /usr/lib/libpangoft2-1.0.so.0
#22 0xb6559e6c in ?? () from /usr/lib/pango/1.4.0/modules/pango-basic-fc.so
#23 0x00000000 in ?? ()
#24 0x000001e3 in ?? ()
#25 0xb77037ef in in6addr_any () from /lib/tls/libc.so.6
#26 0xb7904bd7 in pango_context_get_base_dir () from /usr/lib/libpango-1.0.so.0
---Type <return> to continue, or q <return> to quit---
#27 0xb7906bc7 in pango_engine_shape_get_type () from /usr/lib/libpango-1.0.so.0
#28 0xb79159d9 in pango_shape () from /usr/lib/libpango-1.0.so.0
#29 0xb790a3c4 in pango_layout_set_width () from /usr/lib/libpango-1.0.so.0
#30 0xb790c6fb in pango_layout_iter_get_char_extents () from
/usr/lib/libpango-1.0.so.0
#31 0xb790cf58 in pango_layout_iter_get_char_extents () from
/usr/lib/libpango-1.0.so.0
#32 0xb790d887 in pango_layout_iter_get_char_extents () from
/usr/lib/libpango-1.0.so.0
#33 0xb7ba8b97 in gtk_label_get_use_underline () from /usr/lib/libgtk-x11-2.0.so.0
#34 0xb77de315 in g_cclosure_marshal_VOID__BOXED () from
/usr/lib/libgobject-2.0.so.0
#35 0xb77d1d75 in g_cclosure_new_swap () from /usr/lib/libgobject-2.0.so.0
#36 0xb77d23a8 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#37 0xb77e0769 in g_signal_stop_emission () from /usr/lib/libgobject-2.0.so.0
#38 0xb77e2150 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#39 0xb77e54f0 in g_signal_emit_by_n...

Revision history for this message
Sebastien Bacher (seb128) wrote :

I've forwarded the issue upstream: https://bugs.freedesktop.org/show_bug.cgi?id=4414

Revision history for this message
Billy Biggs (vektor) wrote :

SIGILL is illegal instruction, caused by using an instruction
not supported by the CPU. What kind of CPU do you have? Can
you post the output of /proc/cpuinfo?

Revision history for this message
Marek Sieradzki (mootant) wrote :

(In reply to comment #6)
> SIGILL is illegal instruction, caused by using an instruction
> not supported by the CPU. What kind of CPU do you have? Can
> you post the output of /proc/cpuinfo?

marek@k5m10marek:~$ cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 5
model : 8
model name : AMD-K6(tm) 3D processor
stepping : 12
cpu MHz : 350.882
cache size : 64 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr mce cx8 pge mmx syscall 3dnow k6_mtrr
bogomips : 694.27

Revision history for this message
Marek Sieradzki (mootant) wrote :

(In reply to comment #7)
> (In reply to comment #6)
> > SIGILL is illegal instruction, caused by using an instruction
> > not supported by the CPU. What kind of CPU do you have? Can
> > you post the output of /proc/cpuinfo?

I forgot that I had SIGILL when running app using libcairo2
(Mono-System.Windows.Forms)
Mono has bundled libcairo2. This patch made it work: (the same with libpixman)

Index: configure.in
===================================================================
--- configure.in (wersja 49854)
+++ configure.in (kopia robocza)
@@ -476,7 +476,7 @@
 dnl ===========================================================================
 dnl Check for MMX

-MMX_CFLAGS="-mmmx -msse -Winline --param inline-unit-growth=10000 --param
large-function-growth=10000"
+MMX_CFLAGS="-mmmx -Winline --param inline-unit-growth=10000 --param
large-function-growth=10000"

 have_mmx_intrinsics=no
 AC_MSG_CHECKING(For MMX/SSE intrinsics in the compiler)

I think that libcairo is build with -msse even if target CPU doesn't support SSE.

Revision history for this message
Billy Biggs (vektor) wrote :

Thanks, that clarifies it. The gcc documentation is rather misleading
on this point. The current documentation states that these options
(-mmmx, -msse) enable use of the compiler built-ins, and not that it
allows gcc to generate MMX/SSE code. I have filed this bug upstream
with gcc and will fix our code.

  http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23809

Unfortunately, the fix is not as simple as removing the -msse. We need
to isolate the MMX/SSE code in a separate file from the runtime detection
code if we intend to keep using the compiler intrinsics.

Revision history for this message
Sebastien Bacher (seb128) wrote :

*** Bug 21690 has been marked as a duplicate of this bug. ***

Revision history for this message
Jonathon Conte (thesicktwist) wrote :

I'm running Breezy Badger Preview and have experienced a similiar bug
(originally bug #21690) when utilising the GTK+ color picker with gnome-terminal
or gnome-background-properties. Here are my CPU specs:

jconte@ubuntu:~$ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 5
model : 4
model name : Pentium MMX
stepping : 3
cpu MHz : 232.673
fdiv_bug : no
hlt_bug : no
f00f_bug : yes
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr mce cx8 mmx
bogomips : 459.77

Revision history for this message
Sebastien Bacher (seb128) wrote :

*** Bug 21611 has been marked as a duplicate of this bug. ***

Revision history for this message
Sebastien Bacher (seb128) wrote :

This upload fixes the issue:

 libcairo (1.0.2-0ubuntu1) breezy; urgency=low
 .
   * New upstream version:
     - Add support for dashing of stroked curves
     - Fix dashing so that each dash is capped on both ends
     - Prevent SIGILL failures (proper use of -mmmx and -msse flags)
       (Ubuntu: #15091)
     - Fix crashes with text display in multi-threaded program
     - Do not use sincos function since it is buggy on some platforms)
     - Fix several bugs in the test suite exposed by amd64 systems
     - Add missing byteswapping on GetImage/PutImage
     - Make the check for rectangular trapezoids simpler and more accurate
     - Add missing channel-order swapping for antialised fonts
     - Fix compilation failure with aggressive inlining (gcc -O3)
     - Fix some warnings from sparse
     - Fix to not crash when compiled with -fomit-frame-pointer
     - Improve performance for vertical gradients

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.