Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASLR Leads to Emacs Crash on Build #36

Closed
xsgb opened this issue Apr 17, 2017 · 7 comments
Closed

ASLR Leads to Emacs Crash on Build #36

xsgb opened this issue Apr 17, 2017 · 7 comments
Labels
build Problems related to Portacle's build system

Comments

@xsgb
Copy link

xsgb commented Apr 17, 2017

Hi, I'm getting a segfault when building emacs from portacle. Didn't took time to investigate. On Debian unstable, gcc (Debian 6.3.0-13) 6.3.0 20170415

make -C lib all
[...]
Loading /home/xs/brx/portacle/build/emacs/lisp/tooltip.el (source)...
Finding pointers to doc strings...
Finding pointers to doc strings...done
Dumping under the name emacs
Makefile:736: recipe for target 'bootstrap-emacs' failed
make[1]: *** [bootstrap-emacs] Segmentation fault
make[1]: Leaving directory '/home/xs/brx/portacle/build/emacs/src'
Makefile:398: recipe for target 'src' failed
make: *** [src] Error 2

@Shinmera
Copy link
Member

What exactly did you do to arrive at that? Did you follow the instructions in the build readme exactly?

@xsgb
Copy link
Author

xsgb commented Apr 17, 2017

Of course, from build/README.md, with all dependencies installed.
Let me know if I can produce some gcc output by increasing the verbosity.

Edit: there's what's the kernel said and it seems not good at all, however seems not coming from emacs

[10851.403755] temacs[5825]: segfault at 73dfc4 ip 00007ffff2c14e31 sp 00007fffffffcfb8 error 4 in libc-2.24.so[7ffff2aec000+195000]

I'm going to upgrade right now and let you informed if it resolves the problem :)

@xsgb
Copy link
Author

xsgb commented Apr 17, 2017

Okay, it did exacly the same segfault after upgrading Debian, rebooting, "./build.sh clean" and "./build".

@Shinmera
Copy link
Member

Shinmera commented Apr 17, 2017

I'm not sure that this is a problem related to Portacle per se. It looks much more like a bug in Emacs itself. Unfortunately I'm not familiar with its inner workings, so I'm pretty much as much in the dark about this problem as you are.

If you do want to dive into this, you'll have to google around and see if you can dig up anything.

@xsgb
Copy link
Author

xsgb commented Apr 17, 2017

I'll take a look tomorrow if I can find the time! It will be the opportunity to test on my work machine (Debian 8). There's effectively something faulty between emacs and the installed libc, I'll check with another emacs tag too then.

@xsgb
Copy link
Author

xsgb commented Apr 18, 2017

It's a bug related to emacs concerning a strange syscall named "personality" The workaround would be to disable « randomize_va_space » feature by doing:

echo 0 > /proc/sys/kernel/randomize_va_space

(even if it's not successful on each try..., It worked at least once for obscure reasons)
https://lists.gnu.org/archive/html/bug-gnu-emacs/2016-05/msg00707.html

More explanations can be found there:
https://lists.gnu.org/archive/html/bug-gnu-emacs/2016-05/msg00893.html

I'm closing the ticket since it's not related to portacle! Thanks for your work and sharing your passion. See you o/

xs

@Shinmera
Copy link
Member

That's interesting. Can you see whether changing the kernel parameter circumvents #18 as well?

@Shinmera Shinmera added the build Problems related to Portacle's build system label Apr 18, 2017
@Shinmera Shinmera changed the title Segfault while building emacs on Debian 9 ASLR Leads to Emacs Crash on Build Apr 18, 2017
@Shinmera Shinmera closed this as completed Jul 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Problems related to Portacle's build system
Projects
None yet
Development

No branches or pull requests

2 participants