Skip to content

Instantly share code, notes, and snippets.

@snltd
Last active January 17, 2019 12:53
Show Gist options
  • Save snltd/abb45854b1511e46fcc941f807804734 to your computer and use it in GitHub Desktop.
Save snltd/abb45854b1511e46fcc941f807804734 to your computer and use it in GitHub Desktop.
Crystal does not run in an LX zone
$ uname -a
Linux 02fe7059-dc4d-4fea-d227-b846741ee4b3 4.3.0 BrandZ virtual linux x86_64 x86_64 x86_64 GNU/Linux
$ curl -sL "https://keybase.io/crystal/pgp_keys.asc" | sudo apt-key add -
$ echo "deb https://dist.crystal-lang.org/apt crystal main" | sudo tee /etc/apt/sources.list.d/crystal.list
$ sudo apt update
$ sudo apt install crystal
...
$ crystal
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Aborted (core dumped)
$ strace crystal
execve("/usr/bin/crystal", ["crystal"], [/* 17 vars */]) = 0
brk(NULL) = 0x1000
uname({sysname="Linux", nodename="02fe7059-dc4d-4fea-d227-b846741ee4b3", ...}) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=18096, ...}) = 0
mmap(NULL, 18096, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fffef070000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\t\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1868984, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fffef060000
mmap(NULL, 3971488, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fffeea00000
mprotect(0x7fffeebc0000, 2097152, PROT_NONE) = 0
mmap(0x7fffeedc0000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1c0000) = 0x7fffeedc0000
mmap(0x7fffeedc6000, 14752, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fffeedc6000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fffef050000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fffef040000
arch_prctl(ARCH_SET_FS, 0x7fffef050700) = 0
mprotect(0x7fffeedc0000, 16384, PROT_READ) = 0
mprotect(0x7fffef423000, 8192, PROT_READ) = 0
mprotect(0x7fffef025000, 4096, PROT_READ) = 0
munmap(0x7fffef070000, 18096) = 0
getuid() = 0
getgid() = 0
getpid() = 71834
rt_sigaction(SIGCHLD, {0x7fffef217540, ~[RTMIN RT_1], SA_RESTORER, 0x7fffeea354b0}, NULL, 8) = 0
geteuid() = 0
brk(NULL) = 0x1000
brk(0x22000) = 0x22000
getppid() = 71832
stat("/root", {st_mode=S_IFDIR|0700, st_size=7, ...}) = 0
stat(".", {st_mode=S_IFDIR|0700, st_size=7, ...}) = 0
open("/usr/bin/crystal", O_RDONLY) = 3
fcntl(3, F_DUPFD, 10) = 10
close(3) = 0
fcntl(10, F_SETFD, FD_CLOEXEC) = 0
geteuid() = 0
getegid() = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x7fffef217540, ~[RTMIN RT_1], SA_RESTORER, 0x7fffeea354b0}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL, ~[RTMIN RT_1], SA_RESTORER, 0x7fffeea354b0}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {SIG_DFL, ~[RTMIN RT_1], SA_RESTORER, 0x7fffeea354b0}, NULL, 8) = 0
read(10, "#!/bin/sh\n\n################## ht"..., 8192) = 2924
pipe([3, 4]) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fffef0509d0) = 71835
close(4) = 0
read(3, "/usr/bin\n", 128) = 9
read(3, "", 128) = 0
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 71835
execve("/usr/bin/../lib/crystal/bin/crystal", ["/usr/bin/../lib/crystal/bin/crys"...], [/* 19 vars */]) = 0
arch_prctl(ARCH_SET_FS, 0x7fffef2abf48) = 0
set_tid_address(0x7fffef2abf80) = 71834
brk(NULL) = 0
brk(0x1000) = 0x1000
brk(0x2000) = 0x2000
mmap(NULL, 311296, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fffec6b2000
mmap(NULL, 311296, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fffec665000
munmap(0x7fffec665000, 311296) = 0
writev(2, [{"", 0}, {"terminate called after throwing "..., 48}], 2terminate called after throwing an instance of ') = 48
writev(2, [{"", 0}, {"std::bad_alloc", 14}], 2std::bad_alloc) = 14
writev(2, [{"", 0}, {"'\n", 2}], 2'
) = 2
writev(2, [{"", 0}, {" what(): ", 11}], 2 what(): ) = 11
writev(2, [{"", 0}, {"std::bad_alloc", 14}], 2std::bad_alloc) = 14
writev(2, [{"", 0}, {"\n", 1}], 2
) = 1
rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1 RT_2], [], 8) = 0
gettid() = 71834
tkill(71834, SIGABRT) = 0
rt_sigprocmask(SIG_SETMASK, [], <unfinished ...>
+++ killed by SIGABRT (core dumped) +++
Aborted (core dumped)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment