alexmurray / emacs-snap

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

beta crashes when not run as root #19

Closed egh closed 3 years ago

egh commented 3 years ago

I have no idea why this is happening, but it seems to have just started. os: debian testing emacs: beta via snap

$ which emacs
/snap/bin/emacs

$ snap list emacs
Name   Version  Rev  Tracking     Publisher   Notes
emacs  27.1     776  latest/beta  alexmurray  classic

$ emacs -Q
[...]
Fatal error 11: Segmentation fault
Backtrace:
Segmentation fault

$ sudo /snap/bin/emacs -Q
[works]

$ gdb emacs
GNU gdb (Debian 9.2-1) 9.2
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 -Q
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 0x7fffd1144700 (LWP 3352477)]
[New Thread 0x7fffd0943700 (LWP 3352478)]
[New Thread 0x7fffcbfff700 (LWP 3352479)]
[New Thread 0x7fffcb7fe700 (LWP 3352480)]
[New Thread 0x7fffcaffd700 (LWP 3352481)]
[New Thread 0x7fffca7fc700 (LWP 3352482)]
[Thread 0x7fffca7fc700 (LWP 3352482) exited]
[Thread 0x7fffcaffd700 (LWP 3352481) exited]
[Thread 0x7fffcb7fe700 (LWP 3352480) exited]
[Thread 0x7fffcbfff700 (LWP 3352479) exited]
[Thread 0x7fffd0943700 (LWP 3352478) exited]
[Thread 0x7fffd1144700 (LWP 3352477) exited]
process 3352473 is executing new program: /snap/snapd/8790/usr/bin/snap
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff7d75700 (LWP 3352483)]
[New Thread 0x7fffef574700 (LWP 3352484)]
[New Thread 0x7ffff7574700 (LWP 3352485)]
[New Thread 0x7ffff6d73700 (LWP 3352486)]
[New Thread 0x7ffff6572700 (LWP 3352487)]
[New Thread 0x7ffff5d71700 (LWP 3352488)]
[Detaching after vfork from child process 3352489]
[Thread 0x7ffff5d71700 (LWP 3352488) exited]
[Thread 0x7ffff6572700 (LWP 3352487) exited]
[Thread 0x7ffff6d73700 (LWP 3352486) exited]
[Thread 0x7ffff7574700 (LWP 3352485) exited]
[Thread 0x7fffef574700 (LWP 3352484) exited]
[Thread 0x7ffff7d75700 (LWP 3352483) exited]
process 3352473 is executing new program: /snap/snapd/8790/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".
need to run as root or suid
[Inferior 1 (process 3352473) exited with code 01]
egh commented 3 years ago

Seeing the same problem with --edge. Not sure what's going on, but I haven't seen it before.

alexmurray commented 3 years ago

I recently made a change to fix a crash on manjaro - issue #17 - so I suspect this is causing now a crash on Debian testing :/

Could you try running the following and see if then emacs is able to run without crashing:

rm ~/snap/emacs/common/fonts.conf
rm -rf ~/snap/emacs/common/.cache/fontconfig

If this still persists let me know and we'll see if there is some other things to try.

alexmurray commented 3 years ago

I tried reproducing this in a fresh debian testing install but couldn't - however I am hoping this is similar to the previous issue #17 and so I believe I have a more robust version of that fix - this was just committed and so a new build of emacs 27.1 should be in the beta channel with this improved fix within an hour or so (and the same for 28.0.50 in the edge channel). Please let me know if this does not fix the issue and we can try keep debugging it.

egh commented 3 years ago

It's not crashing for me now. Thank you!

alexmurray commented 3 years ago

Thanks for letting me know. Sounds like it should be okay to promote this version to stable with any luck then. 🤞