Bug 31544 - gcm-viewer often crashes at launch
Summary: gcm-viewer often crashes at launch
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: GNOME maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-13 07:57 CET by Ben McMonagle
Modified: 2023-02-17 09:34 CET (History)
3 users (show)

See Also:
Source RPM: gnome-color-manager-3.36.0-3.mga9
CVE:
Status comment:


Attachments
valgrind output (43.04 KB, text/plain)
2023-02-15 16:10 CET, papoteur
Details

Description Ben McMonagle 2023-02-13 07:57:12 CET
Description of problem:
gcm-viewer often crashes (as in 9/10 x), either from menu launcher or from terminal.

when failing from terminal output is: 

gcm-viewer
malloc(): unaligned tcache chunk detected
Aborted (core dumped)


(launchGUIs discovery, another one for Lewis, take a bow!)

install from:
Mageia-9-beta1-i586.iso
DATE.txt: Mon Feb  6 06:53:03 PM CET 20

XFCE DE only

Version-Release number of selected component (if applicable):


How reproducible: very often, 9/10 x


Steps to Reproduce:
1.install XFCE DE from above .iso
2.invoke gcm-viewer from terminal or *Colour Profile Viewer* launcher
3.
Comment 1 Ben McMonagle 2023-02-13 08:49:45 CET
Gnome (Wayland and Xorg) also
Comment 2 Marja Van Waes 2023-02-13 19:19:06 CET
(In reply to Ben McMonagle from comment #1)
> Gnome (Wayland and Xorg) also

If the summary and description of the package are correct, then only comment #1 matters

$ urpmq -i gnome-color-manager
Name        : gnome-color-manager
Version     : 3.36.0
Release     : 3.mga9
Group       : Graphical desktop/GNOME
Size        : 3493897                      Architecture: x86_64
Source RPM  : gnome-color-manager-3.36.0-3.mga9.src.rpm   Build Host: localhost
Packager    : papoteur <papoteur>
URL         : http://projects.gnome.org/gnome-color-manager/
Summary     : Color management tools for GNOME
Description :
gnome-color-manager is a session framework that makes it easy to manage,
install and generate color profiles in the GNOME desktop.
[marja@DenkBlok4 ~]$

IMHO the above implies that it isn't supposed and tested to work in another DE.

Apart from that, the URL is wrong, it should be 
https://gitlab.gnome.org/GNOME/gnome-color-manager

Assigning to the GNOME maintainers, CC'ing papoteur.

Source RPM: (none) => gnome-color-manager-3.36.0-3.mga9
Assignee: bugsquad => gnome
CC: (none) => marja11, yves.brungard_mageia

Comment 3 Lewis Smith 2023-02-13 20:33:05 CET
Trying this on an up-to-date Cauldron system (which should reflect an updated installed ISO); I am finding that several of the desktops no longer start! Gnome both ways, Mate, at least. Where the desktop does start OK, gcm-viewer also starts OK: I think at least LXDE, Xfce, LxQt, Plasma.

CC: (none) => lewyssmith

Comment 4 Ben McMonagle 2023-02-14 07:11:24 CET
installed all DE from i586 Mga9 beta CI.
on reboot changed DM from GDM to LightDM,
reboot and logged in to XFCE

updated to latest.

open a terminal and tried gcm-viewer:

[work@localhost ~]$ gcm-viewer 
[work@localhost ~]$ gcm-viewer 
malloc(): unaligned tcache chunk detected
Aborted (core dumped)
[work@localhost ~]$ gcm-viewer 
malloc(): unsorted double linked list corrupted
Aborted (core dumped)
[work@localhost ~]$ gcm-viewer 
[work@localhost ~]$ gcm-viewer 
malloc(): unaligned tcache chunk detected
Aborted (core dumped)
[work@localhost ~]$ gcm-viewer 
malloc(): unaligned tcache chunk detected
Aborted (core dumped)
[work@localhost ~]$ gcm-viewer 
[work@localhost ~]$ gcm-viewer 
[work@localhost ~]$ gcm-viewer 
[work@localhost ~]$ gcm-viewer 
malloc(): unaligned tcache chunk detected
Aborted (core dumped)
[work@localhost ~]$ gcm-viewer 
malloc(): unsorted double linked list corrupted
Aborted (core dumped)
[work@localhost ~]$ gcm-viewer 
malloc(): unsorted double linked list corrupted
Aborted (core dumped)


gcm-viewer with no core dump launch successfully.
Comment 5 Ben McMonagle 2023-02-14 07:16:06 CET
and after a reboot for new kernel:

[work@localhost ~]$ gcm-viewer 
malloc(): unaligned tcache chunk detected
Aborted (core dumped)
[work@localhost ~]$ gcm-viewer 
[work@localhost ~]$ gcm-viewer 
[work@localhost ~]$ gcm-viewer 
malloc(): unsorted double linked list corrupted
Aborted (core dumped)
[work@localhost ~]$ gcm-viewer 
malloc(): unsorted double linked list corrupted
Aborted (core dumped)
[work@localhost ~]$ gcm-viewer 
malloc(): unsorted double linked list corrupted
Aborted (core dumped)
[work@localhost ~]$ gcm-viewer 
malloc(): unaligned tcache chunk detected
Aborted (core dumped)
[work@localhost ~]$ gcm-viewer 
malloc(): unaligned tcache chunk detected
Aborted (core dumped)
[work@localhost ~]$ gcm-viewer 
malloc(): unsorted double linked list corrupted
Aborted (core dumped)
[work@localhost ~]$ gcm-viewer 
[work@localhost ~]$ gcm-viewer 
Segmentation fault (core dumped)
[work@localhost ~]$ gcm-viewer 
malloc(): unsorted double linked list corrupted
Aborted (core dumped)
[work@localhost ~]$ gcm-viewer 
malloc(): unaligned tcache chunk detected
Aborted (core dumped)
[work@localhost ~]$ gcm-viewer 
malloc(): unaligned tcache chunk detected
Aborted (core dumped)
[work@localhost ~]$ gcm-viewer
Comment 6 papoteur 2023-02-14 10:58:51 CET
Hello,
This kind of problems is of type memory overwrites. The program writes some data at a place it shouldn't. This is why the error isn't systematic.
There is no new release since 2020. This error is not reported upstream. All that I can try is to rebuild it, to be sure it use the last libraries, what I will do.
I can't try to debug it.
Comment 7 Lewis Smith 2023-02-14 20:28:05 CET
Thanks Ben for your convincing tests on Xfce.
And Yves for an explanantion & offering to rebuild it.
Note Ben's report is 32-bit. My tests were 64-bit.
After papoteur's rebuild, can you Ben please re-try this for each desktop x32. One crash per desktop suffices. Tedious, yes; but less so than re-booting between them. I will re-run the x64 desktops.
Need to wait for these results before judging what to do; at worst, drop the pkg.
Comment 8 Ben McMonagle 2023-02-14 23:02:39 CET
(In reply to Lewis Smith from comment #7)
> Thanks Ben for your convincing tests on Xfce.
> And Yves for an explanantion & offering to rebuild it.
> Note Ben's report is 32-bit. My tests were 64-bit.
> After papoteur's rebuild, can you Ben please re-try this for each desktop
> x32. One crash per desktop suffices. Tedious, yes; but less so than
> re-booting between them. I will re-run the x64 desktops.
> Need to wait for these results before judging what to do; at worst, drop the
> pkg.

Baptiste (new tester) ran a x86_64 all DE net-install ~ 9th Mar, after the beta1 rnd5 arrived for testing.
he sent me a copy of his guiApps.txt, guiResults.txt and guiFails.txt.

gcm-viewer was not listed, so it does appear to be arch specific.
Comment 9 Ben McMonagle 2023-02-15 07:02:28 CET
info;

when the application does launch successfully, attempting to select another profile type causes a:

malloc(): unsorted double linked list corrupted
Aborted (core dumped)

installed from Live-Mageia9-beta1-Xfce-i586
Comment 10 papoteur 2023-02-15 09:49:45 CET
My assumption is that the error is specific to 32bits arch. Something like the computation of the space of a structure which is different in 32bits than in 64bits. And it is not reported upstream because the usage of 32bits arch is small.
To identify the problem, the tool valgrind is the way.
https://valgrind.org/docs/manual/quick-start.html
Comment 11 papoteur 2023-02-15 16:10:02 CET
Created attachment 13701 [details]
valgrind output

I installed a 32bits VM and I reproduce the problem.
Thus I get a trace from valgrind.
Culprit seems to be in liblcms2
Should we report that upstream?
Comment 12 papoteur 2023-02-15 17:59:51 CET
I found this:
https://github.com/hughsie/colord/pull/146
but we should already have
and this:
https://github.com/mm2/Little-CMS/issues/344
We should try to backport this:
https://github.com/mm2/Little-CMS/commit/a9e4601ceb3a185d4f78cc0cfbd285cf0c399e9d
Comment 13 papoteur 2023-02-16 10:06:19 CET
I applied https://github.com/mm2/Little-CMS/commit/a9e4601ceb3a185d4f78cc0cfbd285cf0c399e9d
After updating to liblcms2_2-2.14-4.mga9.i586.rpm I get gcm-viewer running fine.
I close this report. Reopen if this is not the case for you.

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

Comment 14 Lewis Smith 2023-02-16 21:30:10 CET
Great work Yves.
Comment 15 Lewis Smith 2023-02-16 21:35:39 CET
Forgot to try it...
 $ rpm -q lib64lcms2_2
lib64lcms2_2-2.14-4.mga9
Just on Xfce, it starts fine as previously, and Ben's test comment 9 gave no trouble: all profiles could be selected.
Comment 16 Ben McMonagle 2023-02-17 08:31:28 CET
Mageia-9-beta1-i586.iso
DATE.txt: Mon Feb 13 12:37:07 PM CET 2023

single DE Xfce install.

at initial desktop presentation:
  
[work@localhost ~]$ gcm-viewer 
malloc(): unaligned tcache chunk detected
Aborted (core dumped)


update to system includes:

liblcms2_2-2.14-4.mga9.i586 

after updates applied:

[work@localhost ~]$ gcm-viewer 
[work@localhost ~]$ 

manually closed application.

selecting all profile types and tabs no longer crashes application.

yet to check Gnome but looks good.

Thanks
Comment 17 Ben McMonagle 2023-02-17 09:34:55 CET
Mageia-9-beta1-i586.iso
DATE.txt: Mon Feb 13 12:37:07 PM CET 2023

single DE Gnome install.

at initial desktop presentation:
  
[work@localhost ~]$ gcm-viewer 
malloc(): unaligned tcache chunk detected
Aborted (core dumped)


update to system includes:

liblcms2_2-2.14-4.mga9.i586 

after updates applied:

[work@localhost ~]$ gcm-viewer 
[work@localhost ~]$ 

manually closed application.

selecting all profile types and tabs no longer crashes application.

all good,

thanks

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