segfault on freebsd 11
Closed this issue · 5 comments
Hi! This is really exciting work and I look forward to trying it out.
I followed the instructions on https://nuxi.nl/cloudabi/freebsd/ but I get segfault when running helloworld..
Running ./_obj/cloudlibc-unittests also gives segfault..
FreeBSD PC1 11.0-CURRENT FreeBSD 11.0-CURRENT #0 5a410d3(HEAD): Wed Apr 6 11:14:22 PDT 2016 root@PC1:/usr/obj/usr/home/johannes/dev/freebsd/sys/GENERIC-NODEBUG amd64
Hi there!
I just did some grepping through SVN logs and I think I know what's causing the segfaults for you. I recently had to rework the way we do thread-local storage in order to make userspace emulation of CloudABI executables easier:
Cloudlibc: b5cfa35
FreeBSD: https://svnweb.freebsd.org/base?view=revision&revision=297613
Unfortunately, this change had to break the existing ABI in the sense that older applications still work with recent kernels, but new applications don't work with older kernels. Looking at the commit hash in your uname, you're running r297591, which is 22 revisions older than r297613. Be sure to let me know whether upgrading to >=r297613 fixes these segfaults.
(As a side-note: please also make sure that you're using cloudabi-utils>=0.11, as I messed up the 0.10 release)
I will update the kernel and try again. As for the cloudabi-utils, I am install from cloudabi-ports which provices version 0.9. Do you have plans to update the port or can I install from source?
Thanks! I'll also update the installation docs to mention that r297613 is required.
FreeBSD Ports has already been updated to version 0.11: https://www.freshports.org/sysutils/cloudabi-utils
pkg install gives me 0.9 as latest version... I will try install from ports.
Hello world and unit tests works fine now with newer kernel and utils 0.11 from ports tree.