Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Software] emacs elisp trouble

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
Artim
Posts: 46
Joined: 2022-12-15 10:26

[Software] emacs elisp trouble

#1 Post by Artim »

For some time I have trouble using emacs in my normal user account. Running emacs as root is no problem, but when I'm in my user account, upon opening emacs I get the error message

Code: Select all

Native elisp load failed: "/home/user/.emacs.d/eln-cache/28.2-8532cd27/debian-startup-709b84bb-734d0b9f.eln", "/home/rrosner/.emacs.d/eln-cache/\
28.2-8532cd27/debian-startup-709b84bb-734d0b9f.eln: failed to map segment from shared object"
even deleting .emacs and .emacs.d doesn't help. What else could I delete to fix that strange error? The error seems to stem from some user specific configuration as root can run it without errors.

User avatar
fabien
Forum Helper
Forum Helper
Posts: 604
Joined: 2019-12-03 12:51
Location: Anarres (Toulouse, France actually)
Has thanked: 60 times
Been thanked: 141 times

Re: [Software] emacs elisp trouble

#2 Post by fabien »

No idea (I don't use emacs), but have you try creating a new user account and seeing if it works with it? If it works, compare file by file what could be the difference.
Comparing strace output might also help.

Code: Select all

Package: strace
Version: 5.10-1
Installed-Size: 2367
Maintainer: Steve McIntyre <93sam@debian.org>
Architecture: amd64
Depends: libc6 (>= 2.28), libunwind8
Description-en: System call tracer
 strace is a system call tracer: i.e. a debugging tool which prints out
 a trace of all the system calls made by another process/program.
 The program to be traced need not be recompiled for this, so you can
 use it on binaries for which you don't have source.
 .
 System calls and signals are events that happen at the user/kernel
 interface. A close examination of this boundary is very useful for bug
 isolation, sanity checking and attempting to capture race conditions.
Description-md5: a6e8380fce2adad855bb56e32092b29f
Homepage: https://strace.io
Tag: admin::monitoring, devel::debugger, implemented-in::c,
 interface::commandline, role::program, scope::utility, use::monitor,
 works-with::software:running
Section: utils

User avatar
None1975
df -h | participant
df -h | participant
Posts: 1387
Joined: 2015-11-29 18:23
Location: Russia, Kaliningrad
Has thanked: 45 times
Been thanked: 64 times

Re: [Software] emacs elisp trouble

#3 Post by None1975 »

Hello. Try reinstall emacs.

Code: Select all

apt autoremove --purge emacs
It should help.
OS: Debian 12.4 Bookworm / DE: Enlightenment
Debian Wiki | DontBreakDebian, My config files on github

Artim
Posts: 46
Joined: 2022-12-15 10:26

Re: [Software] emacs elisp trouble

#4 Post by Artim »

Purging emacs sadly doesn't help. Not even

Code: Select all

apt purge --autoremove emacs*

Artim
Posts: 46
Joined: 2022-12-15 10:26

Re: [Software] emacs elisp trouble

#5 Post by Artim »

fabien wrote: 2023-01-25 13:46 No idea (I don't use emacs), but have you try creating a new user account and seeing if it works with it? If it works, compare file by file what could be the difference.
Comparing strace output might also help.

Code: Select all

Package: strace
Version: 5.10-1
Installed-Size: 2367
Maintainer: Steve McIntyre <93sam@debian.org>
Architecture: amd64
Depends: libc6 (>= 2.28), libunwind8
Description-en: System call tracer
 strace is a system call tracer: i.e. a debugging tool which prints out
 a trace of all the system calls made by another process/program.
 The program to be traced need not be recompiled for this, so you can
 use it on binaries for which you don't have source.
 .
 System calls and signals are events that happen at the user/kernel
 interface. A close examination of this boundary is very useful for bug
 isolation, sanity checking and attempting to capture race conditions.
Description-md5: a6e8380fce2adad855bb56e32092b29f
Homepage: https://strace.io
Tag: admin::monitoring, devel::debugger, implemented-in::c,
 interface::commandline, role::program, scope::utility, use::monitor,
 works-with::software:running
Section: utils
Our accounts are managed over LDAP, so I'd have to create a new local user. But in the end it would come down to the same question I initially posted: what directories belong to emacs? Simply deleting them to be recreated when necessary should have the same effect as copying over from another account.

I have never worked with strace, what exactly would I need to do to get some usable log?

User avatar
fabien
Forum Helper
Forum Helper
Posts: 604
Joined: 2019-12-03 12:51
Location: Anarres (Toulouse, France actually)
Has thanked: 60 times
Been thanked: 141 times

Re: [Software] emacs elisp trouble

#6 Post by fabien »

Artim wrote: 2023-01-30 09:37But in the end it would come down to the same question I initially posted: what directories belong to emacs?
So I guess you could list all the files in your newly created account

Code: Select all

ls -RlA /home/newuser/
then run emacs and rerun ls -RlA /home/newuser/ in a new terminal and compare the two listings.
Artim wrote: 2023-01-30 09:37I have never worked with strace, what exactly would I need to do to get some usable log?
Nothing special, just run something like

Code: Select all

strace emacs /tmp/myFile
and see if you find any relevant error.

Artim
Posts: 46
Joined: 2022-12-15 10:26

Re: [Software] emacs elisp trouble

#7 Post by Artim »

I'll look into it.
In the meantime, here the strace output. I can't see any errors, but I'm also absolutely unfamiliar with that format: https://pastes.io/cigyqu8tar

User avatar
fabien
Forum Helper
Forum Helper
Posts: 604
Joined: 2019-12-03 12:51
Location: Anarres (Toulouse, France actually)
Has thanked: 60 times
Been thanked: 141 times

Re: [Software] emacs elisp trouble

#8 Post by fabien »

There's something fishy in line 2443

Code: Select all

faccessat2(AT_FDCWD, "/home/user/.emacs.d/eln-cache/28.2-8532cd27/debian-startup-709b84bb-734d0b9f.eln", F_OK, AT_EACCESS) = 0
openat(AT_FDCWD, "/home/user/.emacs.d/eln-cache/28.2-8532cd27/debian-startup-709b84bb-734d0b9f.eln", O_RDONLY|O_CLOEXEC) = 5
read(5, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(5, "", {st_mode=S_IFREG|0755, st_size=23632, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 24264, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) = 0x7f2452480000
mmap(0x7f2452481000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x1000) = -1 EPERM (Operation not permitted)
Any insight from a wise commenter?

vza
Posts: 1
Joined: 2024-02-17 01:43
Been thanked: 1 time

Re: [Software] emacs elisp trouble

#9 Post by vza »

Most likely the problem is related to a home directory mounted with noexec option, you may wish to try to remove it by

Code: Select all

sudo mount -o remount,exec /home
Also you may want to get a closer look at eln-cache.

Hope it helps.

Artim
Posts: 46
Joined: 2022-12-15 10:26

Re: [Software] emacs elisp trouble

#10 Post by Artim »

@vza that might be the issue, but has there been any big changes in emacs that made this a problem? Because /home has been noexec for many years now, but beforehand emacs never had this issue.

Post Reply