alexmurray / emacs-snap

GNU Emacs in a snap
https://snapcraft.io/emacs
71 stars 13 forks source link

Segmentation fault when running M-x list-package #12

Closed arussel closed 4 years ago

arussel commented 4 years ago
Thread 15 "emacs" received signal SIGSEGV, Segmentation fault.
[Switching to LWP 56924]
0x00007f3cdff09ac8 in ?? () from /snap/core18/current/lib64/ld-linux-x86-64.so.2

I'll be happy to provide more info if you tell me what to do :-) Latest unbuntu 20.04 GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2019-12-03 snap-id: 4gE2S31SnK2LeqsZF8XTPuHOlqlzbqsW tracking: latest/stable refresh-date: 2019-12-10

Open emacs, run M-x list-package -> crash with segmentation-fault

alexmurray commented 4 years ago

What Linux distribution and release are you using?

arussel commented 4 years ago

ubuntu 20.04, everything was working perfect before upgrade from previous LTS.

On Sun, 3 May 2020 at 05:45, Alex Murray notifications@github.com wrote:

What Linux distribution and release are you using?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/alexmurray/emacs-snap/issues/12#issuecomment-623049483, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIBFHSJUSTYWDBLH7WDKI3RPTSE5ANCNFSM4MXWWKMA .

alexmurray commented 4 years ago

I can't reproduce this on an up-to-date Ubuntu 20.04 install with emacs -Q - perhaps there is something in your emacs config causing this?

amurray@sec-focal-amd64:~$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04 LTS"
amurray@sec-focal-amd64:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04 LTS
Release:    20.04
Codename:   focal
amurray@sec-focal-amd64:~$ snap info emacs
name:      emacs
summary:   GNU Emacs is the extensible self-documenting text editor
publisher: Alex Murray (alexmurray)
store-url: https://snapcraft.io/emacs
contact:   https://github.com/alexmurray/emacs-snap/issues
license:   GPL-3.0+
description: |
  Emacs is the extensible, customizable, self-documenting real-time display
  editor.

  Features include:
    * Content-aware editing modes, including syntax coloring, for many file
    types.
    * Complete built-in documentation, including a tutorial for new users.
    * Full Unicode support for nearly all human scripts.
    * Highly customizable, using Emacs Lisp code or a graphical interface.
    * An entire ecosystem of functionality beyond text editing, including a
    project planner, mail and news reader, debugger interface, calendar, and
    more.
    * A packaging system for downloading and installing extensions.

  Stable releases of Emacs are published to the `latest/stable` channel.
  These are built by Launchpad using this recipe
  https://launchpad.net/~alexmurray/+snap/emacs/ which provides full build
  logs for build transparency.

  Snapshot builds of Emacs git are published daily to the `latest/edge`
  channel. These are built by Launchpad using this recipe
  https://launchpad.net/~alexmurray/+snap/emacs-snapshot/ which provides full
  build logs for build transparency.
commands:
  - emacs.ctags
  - emacs.ebrowse
  - emacs
  - emacs.emacsclient
  - emacs.etags
snap-id:      4gE2S31SnK2LeqsZF8XTPuHOlqlzbqsW
tracking:     latest/stable
refresh-date: today at 09:38 ACST
channels:
  latest/stable:    26.3            2019-12-10 (296) 120MB classic
  latest/candidate: 26.3            2019-12-10 (296) 120MB classic
  latest/beta:      27.0.91-1d477a0 2020-05-01 (532) 152MB classic
  latest/edge:      28.0.50-763df4b 2020-04-27 (518) 142MB classic
installed:          26.3                       (296) 120MB classic
arussel commented 4 years ago

emacs -Q also gives me a seg fault.

arussel@arussel-XPS-8700:~$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04 LTS"
arussel@arussel-XPS-8700:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04 LTS
Release:    20.04
Codename:   focal
arussel@arussel-XPS-8700:~$ snap info emacs
name:      emacs
summary:   GNU Emacs is the extensible self-documenting text editor
publisher: Alex Murray (alexmurray)
store-url: https://snapcraft.io/emacs
contact:   https://github.com/alexmurray/emacs-snap/issues
license:   GPL-3.0+
description: |
  Emacs is the extensible, customizable, self-documenting real-time display editor.

  Features include:
    * Content-aware editing modes, including syntax coloring, for many file types.
    * Complete built-in documentation, including a tutorial for new users.
    * Full Unicode support for nearly all human scripts.
    * Highly customizable, using Emacs Lisp code or a graphical interface.
    * An entire ecosystem of functionality beyond text editing, including a project planner, mail
    and news reader, debugger interface, calendar, and more.
    * A packaging system for downloading and installing extensions.

  Stable releases of Emacs are published to the `latest/stable` channel. These are built by
  Launchpad using this recipe https://launchpad.net/~alexmurray/+snap/emacs/ which provides full
  build logs for build transparency.

  Snapshot builds of Emacs git are published daily to the `latest/edge` channel. These are built by
  Launchpad using this recipe https://launchpad.net/~alexmurray/+snap/emacs-snapshot/ which provides
  full build logs for build transparency.
commands:
  - emacs.ctags
  - emacs.ebrowse
  - emacs
  - emacs.emacsclient
  - emacs.etags
snap-id:      4gE2S31SnK2LeqsZF8XTPuHOlqlzbqsW
tracking:     latest/stable
refresh-date: 2019-12-10
channels:
  latest/stable:    26.3            2019-12-10 (296) 120MB classic
  latest/candidate: 26.3            2019-12-10 (296) 120MB classic
  latest/beta:      27.0.91-1d477a0 2020-05-01 (532) 152MB classic
  latest/edge:      28.0.50-763df4b 2020-04-27 (518) 142MB classic
installed:          26.3                       (296) 120MB classic
arussel commented 4 years ago
arussel@arussel-XPS-8700:~$ gdb --args emacs -Q
GNU gdb (Ubuntu 9.1-0ubuntu1) 9.1
Copyright (C) 2020 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-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
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 emacs...
(No debugging symbols found in emacs)
(gdb) run
Starting program: /snap/bin/emacs -Q
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff5b38700 (LWP 6911)]
[New Thread 0x7ffff5337700 (LWP 6912)]
[New Thread 0x7ffff4b36700 (LWP 6913)]
[New Thread 0x7fffeffff700 (LWP 6914)]
[New Thread 0x7fffef7fe700 (LWP 6915)]
[Detaching after vfork from child process 6916]
[Detaching after vfork from child process 6918]
[Thread 0x7fffef7fe700 (LWP 6915) exited]
[Thread 0x7fffeffff700 (LWP 6914) exited]
[Thread 0x7ffff4b36700 (LWP 6913) exited]
[Thread 0x7ffff5337700 (LWP 6912) exited]
[Thread 0x7ffff5b38700 (LWP 6911) exited]
process 6907 is executing new program: /usr/lib/snapd/snap-confine
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
process 6907 is executing new program: /usr/lib/snapd/snap-exec
[New LWP 6924]
[New LWP 6925]
[New LWP 6926]
[New LWP 6927]
[New LWP 6928]
[LWP 6928 exited]
[LWP 6927 exited]
[LWP 6926 exited]
[LWP 6925 exited]
[LWP 6924 exited]
process 6907 is executing new program: /bin/dash
[Detaching after fork from child process 6929]
[Detaching after fork from child process 6930]
process 6907 is executing new program: /snap/emacs/296/usr/bin/emacs-26.3
warning: Loadable section ".dynstr" outside of ELF segments
warning: File "/snap/core18/1754/lib/x86_64-linux-gnu/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
    add-auto-load-safe-path /snap/core18/1754/lib/x86_64-linux-gnu/libthread_db-1.0.so
line to your configuration file "/root/.gdbinit".
To completely disable this security protection add
    set auto-load safe-path /
line to your configuration file "/root/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
    info "(gdb)Auto-loading safe path"
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
[New LWP 6931]
[Detaching after fork from child process 6932]
/usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so: undefined symbol: g_date_time_format_iso8601
Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so
Fontconfig warning: "/etc/fonts/fonts.conf", line 5: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/fonts.conf", line 6: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/fonts.conf", line 6: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/fonts.conf", line 6: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/fonts.conf", line 7: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/fonts.conf", line 7: invalid attribute 'version'
Fontconfig warning: "/etc/fonts/fonts.conf", line 9: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/10-hinting-slight.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/10-hinting-slight.conf", line 5: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/conf.d/10-hinting-slight.conf", line 5: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/conf.d/10-hinting-slight.conf", line 5: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/conf.d/10-hinting-slight.conf", line 6: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/conf.d/10-hinting-slight.conf", line 6: invalid attribute 'version'
Fontconfig warning: "/etc/fonts/conf.d/10-hinting-slight.conf", line 8: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 5: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 5: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 5: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 6: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 6: invalid attribute 'version'
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 8: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/11-lcdfilter-default.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/11-lcdfilter-default.conf", line 5: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/conf.d/11-lcdfilter-default.conf", line 5: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/conf.d/11-lcdfilter-default.conf", line 5: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/conf.d/11-lcdfilter-default.conf", line 6: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/conf.d/11-lcdfilter-default.conf", line 6: invalid attribute 'version'
Fontconfig warning: "/etc/fonts/conf.d/11-lcdfilter-default.conf", line 8: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/20-unhint-small-vera.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/20-unhint-small-vera.conf", line 5: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/conf.d/20-unhint-small-vera.conf", line 5: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/conf.d/20-unhint-small-vera.conf", line 5: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/conf.d/20-unhint-small-vera.conf", line 6: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/conf.d/20-unhint-small-vera.conf", line 6: invalid attribute 'version'
Fontconfig warning: "/etc/fonts/conf.d/20-unhint-small-vera.conf", line 8: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/30-metric-aliases.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/30-metric-aliases.conf", line 5: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/conf.d/30-metric-aliases.conf", line 5: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/conf.d/30-metric-aliases.conf", line 5: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/conf.d/30-metric-aliases.conf", line 6: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/conf.d/30-metric-aliases.conf", line 6: invalid attribute 'version'
Fontconfig warning: "/etc/fonts/conf.d/30-metric-aliases.conf", line 8: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 5: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/conf.d/40-nonlatin.conf", line 5: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/conf.d/40-nonlatin.conf", line 5: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/conf.d/40-nonlatin.conf", line 6: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/conf.d/40-nonlatin.conf", line 6: invalid attribute 'version'
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 8: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/45-generic.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/45-generic.conf", line 5: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/conf.d/45-generic.conf", line 5: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/conf.d/45-generic.conf", line 5: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/conf.d/45-generic.conf", line 6: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/conf.d/45-generic.conf", line 6: invalid attribute 'version'
Fontconfig warning: "/etc/fonts/conf.d/45-generic.conf", line 8: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 5: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/conf.d/45-latin.conf", line 5: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/conf.d/45-latin.conf", line 5: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/conf.d/45-latin.conf", line 6: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/conf.d/45-latin.conf", line 6: invalid attribute 'version'
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 8: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/49-sansserif.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/49-sansserif.conf", line 5: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/conf.d/49-sansserif.conf", line 5: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/conf.d/49-sansserif.conf", line 5: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/conf.d/49-sansserif.conf", line 6: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/conf.d/49-sansserif.conf", line 6: invalid attribute 'version'
Fontconfig warning: "/etc/fonts/conf.d/49-sansserif.conf", line 8: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 5: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/conf.d/50-user.conf", line 5: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/conf.d/50-user.conf", line 5: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/conf.d/50-user.conf", line 6: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/conf.d/50-user.conf", line 6: invalid attribute 'version'
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 8: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/51-local.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/51-local.conf", line 5: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/conf.d/51-local.conf", line 5: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/conf.d/51-local.conf", line 5: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/conf.d/51-local.conf", line 6: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/conf.d/51-local.conf", line 6: invalid attribute 'version'
Fontconfig warning: "/etc/fonts/conf.d/51-local.conf", line 8: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/60-generic.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/60-generic.conf", line 5: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/conf.d/60-generic.conf", line 5: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/conf.d/60-generic.conf", line 5: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/conf.d/60-generic.conf", line 6: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/conf.d/60-generic.conf", line 6: invalid attribute 'version'
Fontconfig warning: "/etc/fonts/conf.d/60-generic.conf", line 8: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/60-latin.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/60-latin.conf", line 5: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/conf.d/60-latin.conf", line 5: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/conf.d/60-latin.conf", line 5: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/conf.d/60-latin.conf", line 6: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/conf.d/60-latin.conf", line 6: invalid attribute 'version'
Fontconfig warning: "/etc/fonts/conf.d/60-latin.conf", line 8: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/65-fonts-persian.conf", line 34: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/65-fonts-persian.conf", line 35: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/conf.d/65-fonts-persian.conf", line 35: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/conf.d/65-fonts-persian.conf", line 35: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/conf.d/65-fonts-persian.conf", line 36: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/conf.d/65-fonts-persian.conf", line 36: invalid attribute 'version'
Fontconfig warning: "/etc/fonts/conf.d/65-nonlatin.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/65-nonlatin.conf", line 5: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/conf.d/65-nonlatin.conf", line 5: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/conf.d/65-nonlatin.conf", line 5: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/conf.d/65-nonlatin.conf", line 6: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/conf.d/65-nonlatin.conf", line 6: invalid attribute 'version'
Fontconfig warning: "/etc/fonts/conf.d/65-nonlatin.conf", line 8: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/69-unifont.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/69-unifont.conf", line 5: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/conf.d/69-unifont.conf", line 5: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/conf.d/69-unifont.conf", line 5: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/conf.d/69-unifont.conf", line 6: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/conf.d/69-unifont.conf", line 6: invalid attribute 'version'
Fontconfig warning: "/etc/fonts/conf.d/70-no-bitmaps.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/70-no-bitmaps.conf", line 5: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/conf.d/70-no-bitmaps.conf", line 5: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/conf.d/70-no-bitmaps.conf", line 5: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/conf.d/70-no-bitmaps.conf", line 6: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/conf.d/70-no-bitmaps.conf", line 6: invalid attribute 'version'
Fontconfig warning: "/etc/fonts/conf.d/70-no-bitmaps.conf", line 8: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/80-delicious.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/80-delicious.conf", line 5: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/conf.d/80-delicious.conf", line 5: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/conf.d/80-delicious.conf", line 5: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/conf.d/80-delicious.conf", line 6: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/conf.d/80-delicious.conf", line 6: invalid attribute 'version'
Fontconfig warning: "/etc/fonts/conf.d/90-synthetic.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/90-synthetic.conf", line 5: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/conf.d/90-synthetic.conf", line 5: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/conf.d/90-synthetic.conf", line 5: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/conf.d/90-synthetic.conf", line 6: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/conf.d/90-synthetic.conf", line 6: invalid attribute 'version'
Fontconfig error: Cannot load config file from /etc/fonts/fonts.conf
[New LWP 6951]
[Detaching after fork from child process 6952]
[New LWP 6953]
[Detaching after vfork from child process 6955]
[Detaching after vfork from child process 6956]
[Detaching after vfork from child process 6957]
[New LWP 6958]

Thread 15 "emacs" received signal SIGSEGV, Segmentation fault.
[Switching to LWP 6958]
0x00007febfd6e6ac8 in ?? () from /snap/core18/current/lib64/ld-linux-x86-64.so.2
arussel commented 4 years ago

after running bt:

Switching to LWP 7523]
0x00007fc25b57dac8 in ?? () from /snap/core18/current/lib64/ld-linux-x86-64.so.2
(gdb) bt
#0  0x00007fc25b57dac8 in ?? () from /snap/core18/current/lib64/ld-linux-x86-64.so.2
#1  0x00007fc25b5860bd in ?? () from /snap/core18/current/lib64/ld-linux-x86-64.so.2
#2  0x00007fc253b882df in _dl_catch_exception () from /snap/core18/current/lib/x86_64-linux-gnu/libc.so.6
#3  0x00007fc25b5857ca in ?? () from /snap/core18/current/lib64/ld-linux-x86-64.so.2
#4  0x00007fc253b873ad in ?? () from /snap/core18/current/lib/x86_64-linux-gnu/libc.so.6
#5  0x00007fc253b882df in _dl_catch_exception () from /snap/core18/current/lib/x86_64-linux-gnu/libc.so.6
#6  0x00007fc253b8836f in _dl_catch_error () from /snap/core18/current/lib/x86_64-linux-gnu/libc.so.6
#7  0x00007fc253b874d9 in __libc_dlopen_mode () from /snap/core18/current/lib/x86_64-linux-gnu/libc.so.6
#8  0x00007fc253b69886 in ?? () from /snap/core18/current/lib/x86_64-linux-gnu/libc.so.6
#9  0x00007fc253b6a088 in __nss_lookup_function () from /snap/core18/current/lib/x86_64-linux-gnu/libc.so.6
#10 0x00007fc253b26cf3 in ?? () from /snap/core18/current/lib/x86_64-linux-gnu/libc.so.6
#11 0x00007fc253b28ce4 in getaddrinfo () from /snap/core18/current/lib/x86_64-linux-gnu/libc.so.6
#12 0x00007fc25450f058 in ?? () from /snap/core18/current/lib/x86_64-linux-gnu/libanl.so.1
#13 0x00007fc2547196db in start_thread () from /snap/core18/current/lib/x86_64-linux-gnu/libpthread.so.0
#14 0x00007fc253b4288f in clone () from /snap/core18/current/lib/x86_64-linux-gnu/libc.so.6

there are some mention of issues: https://forum.snapcraft.io/t/segmentation-fault-running-snapcraft-on-arch-linux/12142/4 that are looking into issues that seem related, but I couldn't find a work around yet.

steve-lorimer commented 4 years ago

I am encountering the same crash on ubuntu 20.04 using the latest/stable 26.3 snap.

It does not crash when running emacs 26.3 built from source.

I have distilled my init.el file down to the following bare minimum:

(require 'package)
(setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/"))) 
(package-initialize)
(package-refresh-contents)

Starting emacs with this init.el file results in a crash

Fatal error 11: Segmentation fault
Backtrace:
/snap/emacs/296/usr/bin/emacs[0x58f0c7]
...

Loading the core file in gdb I get the following stack trace:

#0  0x00007f8ce2e65727 in raise () from /snap/core18/current/lib/x86_64-linux-gnu/libpthread.so.0
#1  0x0000000000567d08 in terminate_due_to_signal ()
#2  0x000000000058e802 in handle_fatal_signal ()
#3  0x000000000058e7d3 in deliver_thread_signal ()
#4  0x000000000058e83d in deliver_fatal_thread_signal ()
#5  0x000000000058e9f9 in handle_sigsegv ()
#6  <signal handler called>
#7  0x00007f8ce9cbeac8 in ?? () from /snap/core18/current/lib64/ld-linux-x86-64.so.2
#8  0x00007f8ce9cc70bd in ?? () from /snap/core18/current/lib64/ld-linux-x86-64.so.2
#9  0x00007f8ce22c92df in _dl_catch_exception () from /snap/core18/current/lib/x86_64-linux-gnu/libc.so.6
#10 0x00007f8ce9cc67ca in ?? () from /snap/core18/current/lib64/ld-linux-x86-64.so.2
#11 0x00007f8ce22c83ad in ?? () from /snap/core18/current/lib/x86_64-linux-gnu/libc.so.6
#12 0x00007f8ce22c92df in _dl_catch_exception () from /snap/core18/current/lib/x86_64-linux-gnu/libc.so.6
#13 0x00007f8ce22c936f in _dl_catch_error () from /snap/core18/current/lib/x86_64-linux-gnu/libc.so.6
#14 0x00007f8ce22c84d9 in __libc_dlopen_mode () from /snap/core18/current/lib/x86_64-linux-gnu/libc.so.6
#15 0x00007f8ce22aa886 in ?? () from /snap/core18/current/lib/x86_64-linux-gnu/libc.so.6
#16 0x00007f8ce22ab088 in __nss_lookup_function () from /snap/core18/current/lib/x86_64-linux-gnu/libc.so.6
#17 0x00007f8ce2267cf3 in ?? () from /snap/core18/current/lib/x86_64-linux-gnu/libc.so.6
#18 0x00007f8ce2269ce4 in getaddrinfo () from /snap/core18/current/lib/x86_64-linux-gnu/libc.so.6
#19 0x0000000000671b31 in Fmake_network_process ()
#20 0x0000000000619809 in funcall_subr ()
#21 0x00000000006194e5 in Ffuncall ()
#22 0x0000000000664a8f in exec_byte_code ()
...

I tried starting it under strace to get a better idea of what was failing, and got the following:

readlinkat(AT_FDCWD, "/snap/emacs/296/usr/share/emacs/26.3/lisp/net/starttls.elc", 0x7fff04576570, 1024) = -1 EINVAL (Invalid argument)
read(13, "li\" \"Name of GnuTLS command line"..., 1024) = 1024
read(13, "on-type' to use when starting ST"..., 1024) = 1024
faccessat(AT_FDCWD, "/usr/local/sbin/starttls", X_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/usr/local/bin/starttls", X_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/usr/sbin/starttls", X_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/usr/bin/starttls", X_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/sbin/starttls", X_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/bin/starttls", X_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/snap/bin/starttls", X_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/snap/emacs/current/usr/libexec/emacs/26.3/x86_64-pc-linux-gnu/starttls", X_OK) = -1 ENOENT (No such file or directory)
lseek(13, -284, SEEK_CUR)               = 2788
read(13, "\n(defalias 'starttls-negotiate-g"..., 1024) = 1024
read(13, "16\16!\\310\\\"\\210\\317\16!!\\203e\0\\320\16"..., 1024) = 1024
lseek(13, 5120, SEEK_SET)               = 5120
read(13, "h arg PORT is an integer specify"..., 1024) = 1024
lseek(13, 6144, SEEK_SET)               = 6144
read(13, "ke-obsolete \"2011-08-02\" provide"..., 1024) = 46
read(13, "", 1024)                      = 0
close(13)                               = 0
lseek(12, 3976, SEEK_CUR)               = 5000
read(12, "\n(defalias 'open-network-stream "..., 1024) = 1024
read(12, " connection type %s\" nil make-by"..., 1024) = 1024
lseek(12, 7048, SEEK_SET)               = 7048
lseek(12, 7048, SEEK_SET)               = 7048
read(12, "nless-encrypted nsm-verify-conne"..., 1024) = 1024
lseek(12, 8072, SEEK_SET)               = 8072
read(12, "360\6\7!\\204\\227\1\\361\\362\6\22\6\22#\\210"..., 1024) = 1024
read(12, "able to negotiate a TLS connecti"..., 1024) = 1024
lseek(12, 10120, SEEK_SET)              = 10120
lseek(12, 10120, SEEK_SET)              = 10120
lseek(12, 10120, SEEK_SET)              = 10120
read(12, "4W\0\\306\\211\\211\\311F\\202\\230\0\\30"..., 1024) = 1023
lseek(12, 11143, SEEK_SET)              = 11143
read(12, "", 1024)                      = 0
close(12)                               = 0
rt_sigprocmask(SIG_BLOCK, [INT ALRM], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 12
connect(12, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(12)                               = 0
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 12
connect(12, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(12)                               = 0
stat("/etc/resolv.conf", {st_mode=S_IFREG|0644, st_size=707, ...}) = 0
openat(AT_FDCWD, "/etc/host.conf", O_RDONLY|O_CLOEXEC) = 12
fstat(12, {st_mode=S_IFREG|0644, st_size=92, ...}) = 0
read(12, "# The \"order\" line is only used "..., 4096) = 92
read(12, "", 4096)                      = 0
close(12)                               = 0
futex(0x7f1b19be7ba4, FUTEX_WAKE_PRIVATE, 2147483647) = 0
openat(AT_FDCWD, "/etc/resolv.conf", O_RDONLY|O_CLOEXEC) = 12
fstat(12, {st_mode=S_IFREG|0644, st_size=707, ...}) = 0
read(12, "# This file is managed by man:sy"..., 4096) = 707
read(12, "", 4096)                      = 0
close(12)                               = 0
uname({sysname="Linux", nodename="steve-work", ...}) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x50} ---
rt_sigaction(SIGSEGV, {sa_handler=SIG_DFL, sa_mask=[SEGV], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f1b19836f20}, {sa_handler=0x58e97b, sa_mask=~[KILL STOP RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_SIGINFO, sa_restorer=0x7f1b1a4fb890}, 8) = 0
getpgrp()                               = 1271053
ioctl(0, TIOCGPGRP, [1271053])          = 0
write(2, "Fatal error 11: ", 16Fatal error 11: )        = 16
write(2, "Segmentation fault", 18Segmentation fault)      = 18
alexmurray commented 4 years ago

Thanks for the detailed instructions but I still cannot reproduce this locally (either in a VM or an LXD container). I am wondering if you have a particular nss module installed which might be causing this - are you able to reproduce it in a freshly installed Ubuntu 20.04 machine / container?

Also it would be interesting to know if you can reproduce this using the emacs 27 build on the latest/beta channel:

sudo snap refresh --beta emacs

alexmurray commented 4 years ago

Ok whilst I can't reproduce this myself I believe we can still get it resolved - can someone who is experiencing this crash please install the classic-snap-analyzer snap package and when emacs is running launch it so we can see what libraries are being used from the host:

sudo snap install --classic classic-snap-analyzer
classic-snap-analyzer emacs
alexmurray commented 4 years ago

Also this seems to be a bit of a known problem with nss and classic snaps - https://forum.snapcraft.io/t/segmentation-fault-running-snapcraft-on-arch-linux/12142/6 - can anyone who is experiencing this please see if their /etc/nsswitch.conf is similar to the one mentioned in that link and if changing it as per that link resolves this issue for them?

steve-lorimer commented 4 years ago

If it helps, I was on Ubuntu 18.04 and upgraded to 20.04, so not a fresh install. Perhaps that could be the issue?

As mentioned, after the crash I built from source and the crash disappeared

alexmurray commented 4 years ago

The issue is that the core18 snap provides some of the libraries used by the snap - so for instance on my machine I can see the following:

cat /proc/$(pidof emacs)/maps  | grep libnss
7f296c834000-7f296c839000 r-xp 00000000 07:02 1453                       /snap/core18/1754/lib/x86_64-linux-gnu/libnss_dns-2.27.so
7f296c839000-7f296ca39000 ---p 00005000 07:02 1453                       /snap/core18/1754/lib/x86_64-linux-gnu/libnss_dns-2.27.so
7f296ca39000-7f296ca3a000 r--p 00005000 07:02 1453                       /snap/core18/1754/lib/x86_64-linux-gnu/libnss_dns-2.27.so
7f296ca3a000-7f296ca3b000 rw-p 00006000 07:02 1453                       /snap/core18/1754/lib/x86_64-linux-gnu/libnss_dns-2.27.so
7f296ffdf000-7f296ffe0000 r--p 00000000 fc:05 926250                     /usr/lib/x86_64-linux-gnu/libnss_mdns4_minimal.so.2
7f296ffe0000-7f296ffe2000 r-xp 00001000 fc:05 926250                     /usr/lib/x86_64-linux-gnu/libnss_mdns4_minimal.so.2
7f296ffe2000-7f296ffe3000 r--p 00003000 fc:05 926250                     /usr/lib/x86_64-linux-gnu/libnss_mdns4_minimal.so.2
7f296ffe3000-7f296ffe4000 r--p 00003000 fc:05 926250                     /usr/lib/x86_64-linux-gnu/libnss_mdns4_minimal.so.2
7f296ffe4000-7f296ffe5000 rw-p 00004000 fc:05 926250                     /usr/lib/x86_64-linux-gnu/libnss_mdns4_minimal.so.2
7f2975a4e000-7f2975a59000 r-xp 00000000 07:02 1455                       /snap/core18/1754/lib/x86_64-linux-gnu/libnss_files-2.27.so
7f2975a59000-7f2975c58000 ---p 0000b000 07:02 1455                       /snap/core18/1754/lib/x86_64-linux-gnu/libnss_files-2.27.so
7f2975c58000-7f2975c59000 r--p 0000a000 07:02 1455                       /snap/core18/1754/lib/x86_64-linux-gnu/libnss_files-2.27.so
7f2975c59000-7f2975c5a000 rw-p 0000b000 07:02 1455                       /snap/core18/1754/lib/x86_64-linux-gnu/libnss_files-2.27.so

Which means the core18 snap is providing part of libnss (dns, files) whereas the host is provide the other (mdns) - so if there is some incompatibility in the versions between Ubuntu 18.04 (which is what core18 is based on) and Ubuntu 20.04 (the host) then it is conceivable this will result in issues. Probably the easiest thing is for the snap to stage all the libnss modules in case any of them are in use via the host /etc/nsswitch.conf.

In the case where you build emacs from scratch, it will only ever use libraries on your host machine so there is no chance of incompatibility. Hence why that works without crashing.

alexmurray commented 4 years ago

Although there are a lot of possible libnss modules in Ubuntu 18.04 so this is suboptimal:

https://packages.ubuntu.com/search?suite=bionic&keywords=libnss

@skebanga can you please attach your /etc/nsswitch.conf file so I can see which modules are in use?

alexmurray commented 4 years ago

@arussel if you are still experiencing this, could you also please attach your /etc/nssswitch.conf file then we can see which nss modules should be included by the emacs snap to avoid this crash?

steve-lorimer commented 4 years ago
$ cat /etc/nsswitch.conf 
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         compat systemd
group:          compat systemd
shadow:         compat
gshadow:        files

hosts:          files mdns4_minimal [NOTFOUND=return] dns myhostname
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis
alexmurray commented 4 years ago

@skebanga thanks for providing that but I still can't seem to reproduce this which is quite frustrating - out of interest, could you please try running emacs from the beta channel (this is a pre-release build of emacs 27.0.91) and see if this also crashes for you?

snap refresh --beta emacs

steve-lorimer commented 4 years ago

That works. Note I had uninstalled the snap and had instead built from source, so I instead ran the following command (not sure it matters, but worth mentioning nonetheless)

sudo snap install --classic --beta emacs 
arussel commented 4 years ago

@alexmurray the link you provided is the same I provided in my 4th comment. I tried to investigate that but coudn't find anything. I have a latop running the exact same ubuntu version with the exact same emacs version and the exact same nsswitch.conf file, but one is working properly and the other seg fault.

I have run: sudo snap refresh --beta emacs and this fixes the issue, so I consider the issue fixed.

for info my nsswitch.conf (that work on laptop and breaks on desktop):

# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         compat systemd
group:          compat systemd
shadow:         compat
gshadow:        files

#hosts:          files mdns4_minimal [NOTFOUND=return] dns myhostname
hosts:          files mdns4_minimal [NOTFOUND=return] dns
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis

The commented out line is the original on desktop, the new line is to match the laptop version, but this didn't fix the issue.

alexmurray commented 4 years ago

Ok I'll close this for now since emacs 27.1 is due any day now so this will be released as stable when it is officially released upstream.