Bug 1077870 - librsvg-2-2-2.42.0-1.1.i586 contains SSE2 instructions
librsvg-2-2-2.42.0-1.1.i586 contains SSE2 instructions
Status: CONFIRMED
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: GNOME
Current
i686 Other
: P5 - None : Major (vote)
: ---
Assigned To: Federico Mena Quintero
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-01-28 12:50 UTC by Jan Kiszka
Modified: 2020-01-30 18:20 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Kiszka 2018-01-28 12:50:31 UTC
Since that revision, the library will crash on old i686 machines (Athlon XP) with illegal opcode because it tries to use SSE2. Regression over 2.40.20-1.1. Currently running 2.40.18-1.3 again because that's the only one I found in some archive.
Comment 1 Federico Mena Quintero 2018-01-29 22:59:19 UTC
Could you please get a stack trace where this happens?  We don't explicitly use SIMD, but maybe one of the crates uses it...
Comment 2 Jan Kiszka 2018-02-10 16:57:13 UTC
(gdb) bt
#0  0xb3ab2d86 in cssparser::tokenizer::consume_numeric () from /usr/lib/librsvg-2.so.2
#1  0xb3ab1f7b in cssparser::tokenizer::next_token () from /usr/lib/librsvg-2.so.2
#2  0xb3ab1518 in cssparser::parser::Parser::next_including_whitespace_and_comments () from /usr/lib/librsvg-2.so.2
#3  0xb3a93663 in <rsvg_internals::length::RsvgLength as rsvg_internals::parsers::Parse>::parse () from /usr/lib/librsvg-2.so.2
#4  0xb3aab687 in rsvg_node_svg_new () from /usr/lib/librsvg-2.so.2
#5  0xb3a6c805 in rsvg_standard_element_start (ctx=ctx@entry=0x1340880, name=name@entry=0x1343a63 "svg", atts=atts@entry=0x11ac728) at rsvg-base.c:425
#6  0xb3a6e703 in rsvg_start_element (data=0x1340880, name=<optimized out>, atts=0x115c190) at rsvg-base.c:841
#7  0xb38d35b0 in xmlParseStartTag () from /usr/lib/libxml2.so.2
#8  0xb38daaa9 in ?? () from /usr/lib/libxml2.so.2
#9  0xb38db60b in xmlParseChunk () from /usr/lib/libxml2.so.2
#10 0xb3a6d6cf in write_impl (handle=0x1340880, buf=<optimized out>, count=<optimized out>, error=0x12f47ac) at rsvg-base.c:1213
#11 0xb50139fb in ?? () from /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so
#12 0xb748d91e in ?? () from /usr/lib/libgdk_pixbuf-2.0.so.0
#13 0xb748e47d in gdk_pixbuf_loader_write () from /usr/lib/libgdk_pixbuf-2.0.so.0
#14 0xb748a90b in ?? () from /usr/lib/libgdk_pixbuf-2.0.so.0
#15 0xb748ba8e in gdk_pixbuf_new_from_stream_at_scale () from /usr/lib/libgdk_pixbuf-2.0.so.0
#16 0xb77dd9aa in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#17 0xb77e0c99 in gtk_icon_info_load_icon () from /usr/lib/libgtk-x11-2.0.so.0
#18 0x0047f648 in xfdesktop_file_utils_get_icon ()
#19 0x004843b3 in ?? ()
#20 0x00467f97 in xfdesktop_icon_peek_pixbuf ()
#21 0x00469c74 in ?? ()
#22 0x0046a465 in ?? ()
#23 0x0046af19 in ?? ()
#24 0x0046eb50 in xfdesktop_icon_view_add_item ()
#25 0x00475f98 in ?? ()
#26 0x00477ada in ?? ()
#27 0xb7072cc4 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#28 0xb70730d9 in ?? () from /usr/lib/libglib-2.0.so.0
#29 0xb7073489 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#30 0xb780d28d in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#31 0x00464907 in ?? ()
#32 0x00464dfe in ?? ()
#33 0xb706f418 in ?? () from /usr/lib/libglib-2.0.so.0
#34 0xb706fefa in ?? () from /usr/lib/libglib-2.0.so.0
#35 0xb7072d4f in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#36 0xb70730d9 in ?? () from /usr/lib/libglib-2.0.so.0
#37 0xb7073184 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#38 0xb72e2fb3 in g_application_run () from /usr/lib/libgio-2.0.so.0
#39 0x00465ee2 in xfdesktop_application_run ()
#40 0x0045924b in main ()
(gdb) disassemble $pc
Dump of assembler code for function _ZN9cssparser9tokenizer15consume_numeric17hb083bc22f79f8abcE:
   0xb3ab2d60 <+0>:     push   %ebp
   0xb3ab2d61 <+1>:     push   %ebx
   0xb3ab2d62 <+2>:     push   %edi
   0xb3ab2d63 <+3>:     push   %esi
   0xb3ab2d64 <+4>:     sub    $0x3c,%esp
   0xb3ab2d67 <+7>:     mov    %edx,%ebp
   0xb3ab2d69 <+9>:     call   0xb3ab2d6e <_ZN9cssparser9tokenizer15consume_numeric17hb083bc22f79f8abcE+14>
   0xb3ab2d6e <+14>:    pop    %ebx
   0xb3ab2d6f <+15>:    mov    0x4(%ebp),%esi
   0xb3ab2d72 <+18>:    mov    0x8(%ebp),%edi
   0xb3ab2d75 <+21>:    add    $0xac292,%ebx
   0xb3ab2d7b <+27>:    cmp    %esi,%edi
   0xb3ab2d7d <+29>:    jae    0xb3ab3125 <_ZN9cssparser9tokenizer15consume_numeric17hb083bc22f79f8abcE+965>
   0xb3ab2d83 <+35>:    mov    0x0(%ebp),%eax
=> 0xb3ab2d86 <+38>:    movsd  -0x4bc88(%ebx),%xmm6
   0xb3ab2d8e <+46>:    mov    (%eax,%edi,1),%dl
   0xb3ab2d91 <+49>:    cmp    $0x2b,%dl
   0xb3ab2d94 <+52>:    je     0xb3ab2da3 <_ZN9cssparser9tokenizer15consume_numeric17hb083bc22f79f8abcE+67>
...
Comment 3 Jan Kiszka 2018-02-25 10:36:47 UTC
Any further information needed from me? Just checked 2.42.2-1.1, but the problem persists.
Comment 4 Federico Mena Quintero 2018-03-22 19:10:58 UTC
Mmmm, I wonder if rustc is emitting code for the latest CPU in the i386 line.

The idea is to pass RUSTFLAGS="-C target-cpu=athlon-xp" and see if it works on your machine.

I'll try to build such a custom package in the build service for you to test.
Comment 5 Federico Mena Quintero 2018-03-22 20:15:49 UTC
This is the upstream pull request with the discussion about i586/i686 for rustc - https://github.com/rust-lang/rust/pull/31110
Comment 6 Federico Mena Quintero 2018-03-22 20:48:13 UTC
Could you please try:

zypper addrepo https://download.opensuse.org/repositories/home:/federico-mena:/branches:/GNOME:/Factory/openSUSE_Factory federico-librsvg
zypper install -r federico-librsvg librsvg

and see if it works?  This is built with RUSTFLAGS='-Ctarget-cpu=athlon-xp'.
Comment 7 Jan Kiszka 2018-05-05 14:38:36 UTC
Sorry, forgot about this, and now the test build you provided is no longer available. Could you push it again?

I've also checked the new librsvg-2-2-2.42.3-1.1.i586, but the issue persists there.
Comment 8 Thomas Zimmermann 2020-01-30 18:20:09 UTC
Posting this here before the info gets lost. It's not only librsvg. I got the following errors. Maybe some of them can be fixed.

 [  630.370899] traps: evolution-sourc[2962] trap invalid opcode
	ip:ae285db9 sp:bfd6fa00 error:0 in libjavascriptcoregtk-
	4.0.so.18.14.8[ad937000+ca8000]
 [  631.149280] traps: goa-daemon[3006] trap invalid opcode ip:b454cdb9
	sp:bfa6d8f0 error:0 in libjavascriptcoregtk-
	4.0.so.18.14.8[b3bfe000+ca8000]
 [  632.868196] traps: goa-daemon[3039] trap invalid opcode ip:b453fdb9
	sp:bf814b60 error:0 in libjavascriptcoregtk-
	4.0.so.18.14.8[b3bf1000+ca8000]
 [  637.998523] traps: pool-gnome-shel[3052] trap invalid opcode
	ip:a01f80dd sp:b163fb90 error:0 in librsvg-
	2.so.2.46.0[a0027000+1e8000]
 [  638.011551] traps: pool-gnome-shel[2994] trap invalid opcode
	ip:a01dacef sp:a232bbb0 error:0 in librsvg-
	2.so.2.46.0[a0027000+1e8000]
 [  653.946106] traps: pool-gnome-shel[3060] trap invalid opcode
	ip:a19f60dd sp:b16ebb90 error:0 in librsvg-
	2.so.2.46.0[a1825000+1e8000]
 [  653.967114] traps: pool-gnome-shel[3072] trap invalid opcode
	ip:a19d8cef sp:a17f9bb0 error:0 in librsvg-2.so.2.46.0[a1825000+1e8000]
 [  658.790216] traps: gnome-session-f[3075] trap invalid opcode
	ip:b4a620dd sp:bfb96f50 error:0 in librsvg-
	2.so.2.46.0[b4891000+1e8000]

 [  134.757646] traps: opensuse-welcom[1807] trap invalid opcode
	ip:af0a7d89 sp:bf9ca0dc error:0 in
	libQt5WebEngineCore.so.5.14.0[af047000+61b8000]
 [  172.001956] traps: gst-plugin-scan[2058] trap invalid opcode
	ip:b5c7a412 sp:bfdabca4 error:0 in
	libgstopengl.so[b5c54000+2a000]
 [  172.205344] traps: gst-plugin-scan[2057] trap invalid opcode
	ip:b5bd2412 sp:bfc6f8a4 error:0 in
	libgstopengl.so[b5bac000+2a000]
 [  172.315414] traps: gst-plugin-scan[2064] trap invalid opcode
	ip:b73e2412 sp:bf964bd4 error:0 in
	libgstopengl.so[b73bc000+2a000]
 [  172.442156] traps: gst-plugin-scan[2068] trap invalid opcode
	ip:b7441412 sp:bfb27f34 error:0 in
	libgstopengl.so[b741b000+2a000]