Seeking feedback from people having problems with cmake snap

Hi, maintainer of the CMake snap here (also one of the maintainers of CMake itself). There are a lot of user reviews stating “Failed to start” or similar for the CMake snap. I’ve never been able to reproduce that failure and reviewers pretty much never provide any information beyond that simple statement. I’d like to help, but no-one is providing useful information that I can act on.

I would really like to hear from anyone who has observed the cmake snap failing and who is willing to have some back and forth with me to help diagnose the problem. Until I get some more information, I am unable to help improve the situation for users.

1 Like

Hello @crascit. Thank you for developing cmake, it is my favorite build tool. :wink:
I have never used the cmake snap, but when I saw your post I decided to try to help you. It looks like people are referring to to the cmake.cmake-gui tool.
When I run it on KDE Plasma on OpenSUSE Tumbleweed, I get the following error message:

$ snap run cmake.cmake-gui
Segmentation fault (core dumped)

OK. So then I try debugging it.

$ snap run --gdb cmake.cmake-gui
GNU gdb (GDB; openSUSE Tumbleweed) 8.3.1
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-suse-linux".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://bugs.opensuse.org/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/lib/snapd/snap-confine...
Reading symbols from /usr/lib/debug/usr/lib/snapd/snap-confine-2.43.3-1.3.x86_64.debug...
Starting program: /usr/lib/snapd/snap-confine --classic --base core18 snap.cmake.cmake-gui /usr/lib/snapd/snap-exec --command=gdb cmake.cmake-gui
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
process 13225 is executing new program: /usr/lib/snapd/snap-exec
Missing separate debuginfos, use: zypper install glibc-debuginfo-2.31-3.1.x86_64 libapparmor1-debuginfo-2.13.4-1.1.x86_64 libcap2-debuginfo-2.32-1.1.x86_64 libudev1-debuginfo-244-3.1.x86_64
warning: Missing auto-load script at offset 0 in section .debug_gdb_scripts
of file /usr/lib/debug/usr/lib/snapd/snap-exec-2.43.3-1.3.x86_64.debug.
Use `info auto-load python-scripts [REGEXP]' to list them.
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7f018404f700 (LWP 13229)]
[New Thread 0x7f018384e700 (LWP 13230)]
[New Thread 0x7f018304d700 (LWP 13231)]
[New Thread 0x7f018284c700 (LWP 13232)]
[New Thread 0x7f01816aa700 (LWP 13234)]
[New Thread 0x7f0181eab700 (LWP 13233)]
[Thread 0x7f01816aa700 (LWP 13234) exited]
[Thread 0x7f0181eab700 (LWP 13233) exited]
[Thread 0x7f018284c700 (LWP 13232) exited]
[Thread 0x7f018304d700 (LWP 13231) exited]
[Thread 0x7f018384e700 (LWP 13230) exited]
[Thread 0x7f018404f700 (LWP 13229) exited]
process 13225 is executing new program: /usr/bin/bash
Missing separate debuginfos, use: zypper install glibc-debuginfo-2.31-3.1.x86_64
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
process 13225 is executing new program: /usr/lib/snapd/snap-gdb-shim
Missing separate debuginfos, use: zypper install bash-debuginfo-5.0.11-4.1.x86_64
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?


Welcome to `snap run --gdb`.
You are right before your application is execed():
- set any options you may need
- use 'cont' to start



Thread 1 "snap-gdb-shim" received signal SIGTRAP, Trace/breakpoint trap.
0x00007f00d4126ea1 in raise () from /lib64/libc.so.6
Catchpoint 1 (exec)
Continuing.
process 13225 is executing new program: /usr/bin/bash
Missing separate debuginfos, use: zypper install glibc-debuginfo-2.31-3.1.x86_64

Thread 1 "desktop-launch" hit Catchpoint 1 (exec'd /usr/bin/bash), 0x00007f5d25ddc090 in _start () from /lib64/ld-linux-x86-64.so.2
Missing separate debuginfos, use: zypper install bash-debuginfo-5.0.11-4.1.x86_64
(gdb) bt
#0  0x00007f5d25ddc090 in _start () from /lib64/ld-linux-x86-64.so.2
#1  0x0000000000000003 in ?? ()
#2  0x00007ffc177b5ed7 in ?? ()
#3  0x00007ffc177b5ee1 in ?? ()
#4  0x00007ffc177b5f04 in ?? ()
#5  0x0000000000000000 in ?? ()

I don’t know how to interpret any of that, but maybe it will be helpful to you. :wink: Tell me if you need more information.

2 Likes

Also: I tried the cmake snap on Lubuntu 19.10, we found that it works! So it seems like the cmake-gui only works on Ubuntu systems…

Thanks, at least that gives me a Linux distribution to try. I can’t see anything in that backtrace that gives a meaningful hint at the crash, but let’s see if I can get an OpenSUSE VM set up and try to reproduce it myself on there.

1 Like

@abstractdevelop Sadly (or happily, I don’t know), I created a brand new openSUSE Tumbleweed VM, installed snapd as per the official instructions, installed the cmake snap and it all works perfectly for me. I cannot reproduce the segfault you saw. :cry:

OK, and sorry for making you do all that. :confused: However, I have some new leads! :smiley:
First of all, I found a link in the snapcraft forum which will interest you:

Second, I was able to get a useful backtrace:
(gdb) bt

#1  0x00007fffda628a7d in ?? () from /snap/cmake/323/usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#2  0x00007fffda656843 in ?? () from /snap/cmake/323/usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#3  0x00007fffda6c45e1 in ?? () from /snap/cmake/323/usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#4  0x00007fffe86448f7 in ?? () from /snap/cmake/323/bin/../usr/lib/x86_64-linux-gnu/libGLX_mesa.so.0
#5  0x00007fffe8630f26 in ?? () from /snap/cmake/323/bin/../usr/lib/x86_64-linux-gnu/libGLX_mesa.so.0
#6  0x00007fffe862c7d2 in ?? () from /snap/cmake/323/bin/../usr/lib/x86_64-linux-gnu/libGLX_mesa.so.0
#7  0x00007fffe862df12 in ?? () from /snap/cmake/323/bin/../usr/lib/x86_64-linux-gnu/libGLX_mesa.so.0
#8  0x00007ffff30f6651 in glXChooseFBConfig () from /snap/cmake/323/bin/../usr/lib/x86_64-linux-gnu/libGLX.so.0
#9  0x00007fffeabfd0d8 in ?? () from /snap/cmake/323/usr/lib/x86_64-linux-gnu/qt5/plugins/xcbglintegrations/libqxcb-glx-integration.so
#10 0x00007fffeabfd47d in ?? () from /snap/cmake/323/usr/lib/x86_64-linux-gnu/qt5/plugins/xcbglintegrations/libqxcb-glx-integration.so
#11 0x00007fffeabf9430 in ?? () from /snap/cmake/323/usr/lib/x86_64-linux-gnu/qt5/plugins/xcbglintegrations/libqxcb-glx-integration.so
#12 0x00007fffefae7876 in QXcbWindow::create() () from /snap/cmake/323/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/../../../libQt5XcbQpa.so.5
#13 0x00007fffefad1f3b in QXcbIntegration::createPlatformWindow(QWindow*) const () from /snap/cmake/323/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/../../../libQt5XcbQpa.so.5
#14 0x00007ffff60af2fe in QWindowPrivate::create(bool, unsigned long long) () from /snap/cmake/323/bin/../usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#15 0x00007ffff769caed in QWidgetPrivate::create_sys(unsigned long long, bool, bool) () from /snap/cmake/323/bin/../usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007ffff769d1ad in QWidget::create(unsigned long long, bool, bool) () from /snap/cmake/323/bin/../usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007ffff76a9aa6 in QWidget::setVisible(bool) () from /snap/cmake/323/bin/../usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x000055555559bf28 in main ()

I came across this post which seems to describe the same symptoms with crashing on startup and the intel graphics driver being involved. I’ve attempted to incorporate their workaround and put through a test build. Not sure if it has been done correctly, but @abstractdevelop if you could try out the latest/edge build and see if it solves the crashes for you, that would be very helpful. Only look at the amd64 architecture for now, you will see other arches there too, but that’s related to another task I’m also working on.

@abstractdevelop Actually please try the beta channel instead. I had to move the builds to the beta channel so that they were not overwritten by the nightly (edge) builds.

Sorry @crascit for taking to long to reply, I haven’t been very active recently. I’m on Manjaro now but the same computer.
Results:
Stable channel: Segmentation fault
Edge/Beta channel: works!

So I think we can say that whatever you did fixed the issue.

1 Like

Fantastic, thanks for testing. The fix will be in all releases from here, starting with the 3.18 release candidates.

1 Like