Bug 26774 - Gimp fail to start on real hw - segment violation - 32 bit mga8 alpha
Summary: Gimp fail to start on real hw - segment violation - 32 bit mga8 alpha
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: i586 Linux
Priority: High major
Target Milestone: ---
Assignee: All Packagers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-11 21:16 CEST by Jose Manuel López
Modified: 2020-06-19 15:35 CEST (History)
6 users (show)

See Also:
Source RPM: pango-1.45.2-2
CVE:
Status comment:


Attachments
install from 32 bit real h/w (173.44 KB, application/x-xz)
2020-06-12 09:58 CEST, Ben McMonagle
Details
gdb backtrace from segfault after clicking on "About" in gimp (5.27 KB, text/plain)
2020-06-14 22:26 CEST, Martin Whitaker
Details
gdb backtrace from segfault after clicking on "About" in gimp (11.73 KB, text/plain)
2020-06-16 00:31 CEST, Martin Whitaker
Details

Description Jose Manuel López 2020-06-11 21:16:15 CEST
Description of problem:I installed with the classic ISO of 32Bits LXDE, the whole installation has been done correctly. The apps work, but I found a bug in running Gimp once installed: 

[jose@localhost]$ gimp
Warning: Unknown input_id: -1 for input: surfacemap_x
Warning: Unknown input_id: -1 for input: surfacemap_x
Warning: Unknown input_id: -1 for input: surfacemap_x
Warning: Unknown input_id: -1 for input: surfacemap_x
Warning: Unknown input_id: -1 for input: surfacemap_x
Warning: Unknown input_id: -1 for input: surfacemap_x
Warning: Unknown input_id: -1 for input: surfacemap_x
Warning: Unknown input_id: -1 for input: surfacemap_x
Warning: Unknown input_id: -1 for input: surfacemap_x
Warning: Unknown input_id: -1 for input: surfacemap_x
Warning: Unknown input_id: -1 for input: surfacemap_x
Warning: Unknown input_id: -1 for input: surfacemap_x
gimp: fatal error: Segment violation
[jose@localhost]$

The "Customize Appearance and Behavior" application does not start. In terminal appears: Segment violation "core generated"


Version-Release number of selected component (if applicable): Mageia 8 Alpha LXDE 32 Bits


How reproducible: Instal Mageia 8 Alpha LXDE 32 Bits


Steps to Reproduce:
1. Install Mageia 8 Alpha LXDE 32 Bits
2. Install and run Gimp and lxappearance
3. The apps broken no start.
Comment 1 Ben McMonagle 2020-06-12 09:58:28 CEST
Created attachment 11690 [details]
install from 32 bit real h/w

confirm that gimp fails to run with:
illegal instruction (core dumped)

$ lscpu
Architecture:                    i686
CPU op-mode(s):                  32-bit
Byte Order:                      Little Endian
Address sizes:                   34 bits physical, 32 bits virtual
CPU(s):                          1
On-line CPU(s) list:             0
Thread(s) per core:              1
Core(s) per socket:              1
Socket(s):                       1
Vendor ID:                       AuthenticAMD
CPU family:                      6
Model:                           8
Model name:                      AMD Athlon(tm) XP 2400+
Stepping:                        1
CPU MHz:                         1998.250
BogoMIPS:                        3996.50
L1d cache:                       64 KiB
L1i cache:                       64 KiB
L2 cache:                        256 KiB
Vulnerability Itlb multihit:     Not affected
Vulnerability L1tf:              Not affected
Vulnerability Mds:               Not affected
Vulnerability Meltdown:          Not affected
Vulnerability Spec store bypass: Vulnerable
Vulnerabi[home@localhost ~]$ lity Spectre v1:        Mitigation; usercopy/swapgs barriers and __user
                                  pointer sanitization
Vulnerability Spectre v2:        Mitigation; Full generic retpoline, STIBP disab
                                 led, RSB filling
Vulnerability Tsx async abort:   Not affected
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtr
                                 r pge mca cmov pat pse36 mmx fxsr sse syscall m
                                 mxext 3dnowext 3dnow cpuid 3dnowprefetch vmmcal
                                 l

CC: (none) => westel

Comment 2 Chris B 2020-06-12 10:47:12 CEST
On the xfce M8 32b alpha iso in vbox: gimp starts, from the menu, no issues.
First screen is a big info window.
Starting from terminal, I get the warnings, but it starts no problem. 

On an installed (initially without Gimp) 32b system in vbox, urpmi gimp, installs 32 packages. Starting from the menu, I get a small (non-gimp) error screen. gimp crashes. From a terminal: gimp crashes.

CC: (none) => shybluenight

Morgan Leijström 2020-06-12 10:49:01 CEST

Summary: There apps that not works => Gimp fail to start on real hw - segment violation - 32 bit lxde mga8 alpha
CC: (none) => fri

Comment 3 Lewis Smith 2020-06-12 21:14:53 CEST
Thanks for the confirmatory tests. Chris's comment 2 is weird: Gimp installed with the system works; added afterwards, does not.

@Jose: can you raise a separate bug for 'lxappearance' (and others try that).

Assigning this globally, Gimp is maintained by different people. This is a rare 32-bit bug (I suppose; others would have complained by now about Gimp not working on 64-bit).

Summary: Gimp fail to start on real hw - segment violation - 32 bit lxde mga8 alpha => Gimp fail to start on real hw - segment violation - 32 bit mga8 alpha
Assignee: bugsquad => pkg-bugs
Hardware: All => i586
Source RPM: Mageia 8 alpha classical ISO 32Bits => gimp

Comment 4 Ben McMonagle 2020-06-12 22:12:39 CEST
is it just that Gimp has not been compiled for 32bit?
Comment 5 Ben McMonagle 2020-06-12 22:14:34 CEST
meant to add,

or rather, it requires a "sse2" processor
Comment 6 Chris B 2020-06-12 22:53:22 CEST
the working gimp was on the older alpha LIVE 32b xfce iso in live mode, the broken gimp on an updated install in virtualbox 32b xfce, with all the new packages from gnome 3 beta, gtk, pango and what more. I lost the VM, at the end it was a complete mess, so can´t test if the dev´ers and packagers have fixed it meanwhile.

lxappearances - crashed
almost all graphical text editors - crashed
gimp, filezilla - crashed
Comment 7 Martin Whitaker 2020-06-13 11:52:55 CEST
I have tried to reproduce the bug Jose and Chris are seeing in a VM without success (before and after updates).

I can reproduce the bug Ben is seeing using qemu. dmesg tells me the invalid instruction is in /usr/lib/libbabl-0.1.so.0. Checking that library, it does indeed contain SSE2 (and  CMOV) instructions. So does /usr/bin/gimp.

CC: (none) => mageia

Comment 8 Martin Whitaker 2020-06-13 13:09:27 CEST
A quick look suggests both gimp and libbabl should detect and adapt to the CPU capabilities, but if so, that's not working.
Comment 9 Jose Manuel López 2020-06-13 23:40:56 CEST
Well, I have installed again Mageia 8 Alpha Lxde 32 Bits. After update, I have opened Gimp and works fine, I supose that the bug is fixed.

If nobody can't reproduce it, the bug can close.

Greetings!!
Comment 10 Jose Manuel López 2020-06-13 23:59:15 CEST
Wow, I correct myself. Gimp now starts, but closes when you open an image or just hit "about". This appears in konsole:

[jose@localhost]$ gimp
Warning: Unknown input_id: -1 for input: surfacemap_x
Warning: Unknown input_id: -1 for input: surfacemap_x
Warning: Unknown input_id: -1 for input: surfacemap_x
Warning: Unknown input_id: -1 for input: surfacemap_x
Warning: Unknown input_id: -1 for input: surfacemap_x
Warning: Unknown input_id: -1 for input: surfacemap_x
Warning: Unknown input_id: -1 for input: surfacemap_x
Warning: Unknown input_id: -1 for input: surfacemap_x
Warning: Unknown input_id: -1 for input: surfacemap_x
Warning: Unknown input_id: -1 for input: surfacemap_x
Warning: Unknown input_id: -1 for input: surfacemap_x
Warning: Unknown input_id: -1 for input: surfacemap_x
gimp: fatal error: Segment violation

(script-fu:12761): LibGimpBase-WARNING **: 23:49:01.329: script-fu: gimp_wire_read(): error
[jose@localhost]$
Comment 11 Martin Whitaker 2020-06-14 22:26:52 CEST
Created attachment 11702 [details]
gdb backtrace from segfault after clicking on "About" in gimp

I can confirm the fault when clicking on "About". With a fresh install from the round1 Mageia-8-alpha1-Live-Xfce-i586 ISO in VirtualBox and applying all updates except for pango and its dependent libraries, there was no fault. Updating pango to 1.45.2-2 caused the fault to appear.
Martin Whitaker 2020-06-14 22:27:52 CEST

CC: (none) => olav
Source RPM: gimp => pango-1.45.2-2

Comment 12 Olav Vitters 2020-06-15 15:47:04 CEST
Could anyone test with: pango-1.45.2-1 (before the dropped patch).

Also the installation of debug packages would be highly appreciated (gtk+, gimp, pango, glib). I cannot get to my Mageia desktop machine for a while
Comment 13 GG HH 2020-06-15 22:26:34 CEST
where to get pango-1.45.2-1 ?

CC: (none) => boulshet

Comment 14 Martin Whitaker 2020-06-16 00:31:25 CEST
Created attachment 11704 [details]
gdb backtrace from segfault after clicking on "About" in gimp

Backtrace after installing debug info.

Attachment 11702 is obsolete: 0 => 1

Comment 15 Martin Whitaker 2020-06-16 00:32:42 CEST
I rebuilt pango-1.45.2-1 locally and installed it, but got the same fault.
Comment 16 Olav Vitters 2020-06-16 11:28:48 CEST
Crash really seems to be in gtk+3.0. I checked for any missing crash fixes, found the following: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1746

I've added that patch to gtk+3.0. Not sure if above patch would fix these crashes, the function names are different. So please try out, though probably this wouldn't fix it. I'm going afk for 2.5 weeks, so seems best to raise this upstream https://gitlab.gnome.org/GNOME/gtk and I'll check it once I'm back.
Olav Vitters 2020-06-16 11:29:09 CEST

Priority: Normal => High

Comment 17 Martin Whitaker 2020-06-16 19:05:37 CEST
I installed all updates, but as you suspected, the crash persists. It could still be pango to blame, if it passes a bad pointer or handle into the GTK library. Also, I only see this fault on a 32-bit system, so it's just possible it's a compiler bug.
Comment 18 Martin Whitaker 2020-06-18 13:25:20 CEST
Using git bisect, I've identified the commit in pango that causes the fault. It is:

From de0ab09cdbf5bdfa0caa365a22ac864e41838e48 Mon Sep 17 00:00:00 2001
From: Matthias Clasen <mclasen@redhat.com>
Date: Thu, 22 Aug 2019 11:46:07 +0200
Subject: [PATCH] renderer: Implement overlines

Reversing that one commit prevents the fault.

That doesn't necessarily mean that commit is at fault - it could be exposing a bug elsewhere.
Comment 19 Martin Whitaker 2020-06-18 16:55:41 CEST
Reported upstream: https://gitlab.gnome.org/GNOME/pango/-/issues/486
Comment 20 Morgan Leijström 2020-06-18 16:57:18 CEST
Good work
Comment 21 Martin Whitaker 2020-06-19 12:55:40 CEST
Well, turns out this was really due to our gtk+2.0 package not being rebuilt against the new version of pango. I've rectified that. Now gimp works fine, as do the other applications (leafpad, lxappearance, tint2) that Chris B. reported failing on qa-discuss.

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 22 Morgan Leijström 2020-06-19 15:26:11 CEST
Even better work :)
Now have a nice midsummer party !
Comment 23 Jose Manuel López 2020-06-19 15:35:22 CEST
Hi, 

I have tested in lxde vbox 32bits after updates, and works fine, now, I can save image, edit, export.

Greetings.

Note You need to log in before you can comment on or make changes to this bug.