ykjit / yklua

yk-enabled Lua interpreter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failing test - db.lua

Pavel-Durov opened this issue · comments

Issue

Error on running db.lua test with both serial and non-serial compilation:

$ YKD_SERIALISE_COMPILATION=1 ../src/lua -e"_U=true" db.lua 
testing debug library and debug information
+
testing inspection of parameters/returned values
+
+
testing traceback sizes
testing debug functions on chunk without debug info
OK
mremap_chunk(): invalid pointer
Aborted (core dumped)
$ YKD_SERIALISE_COMPILATION=0 ../src/lua -e"_U=true" db.lua 
testing debug library and debug information
+
testing inspection of parameters/returned values
+
+
testing traceback sizes
testing debug functions on chunk without debug info
OK
Segmentation fault (core dumped)

Notes

Both compilation modes are non-deterministic - sometimes it errors out and sometimes completes successfully.
When debugging with gdb, it runs successfully.

Versions:

YkLua - yk-location-allocation/056cf6ae7cb3ebd59a7e0dc89df99c03f0e8d3d9
Yk - master/a690e6eaf7253a4fa9c04bb54406c07b7efc0085

YKD_SERIALISE_COMPILATION=1 gdb -batch -ex "r" -ex "bt" --args ../src/lua -e"_U=true"  db.lua
Thread 15 "lua" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffee59d6c0 (LWP 2193499)]
__GI___libc_realloc (oldmem=0x6c60, bytes=4156192) at ./malloc/malloc.c:3420
3420    ./malloc/malloc.c: No such file or directory.
#0  __GI___libc_realloc (oldmem=0x6c60, bytes=4156192) at ./malloc/malloc.c:3420
#1  0x00007ffff7ad6c66 in read_aux (aux_buf=0x7fffe4000000, hdr=0x7ffff247e000, trace=0x6c60570, err=0x58eec98) at src/perf/collect.c:284
#2  0x00007ffff7ad6ae5 in handle_sample (aux_buf=0x7fffe4000000, hdr=0x7ffff247e000, trace=0x6c60570, data_tmp=0x7fffe8000b70, err=0x58eec98) at src/perf/collect.c:229
#3  0x00007ffff7ad688c in poll_loop (perf_fd=4, stop_fd=3, mmap_hdr=0x7ffff247e000, aux=0x7fffe4000000, trace=0x6c60570, err=0x58eec98) at src/perf/collect.c:352
#4  0x00007ffff7ad6570 in collector_thread (arg=0x7fffffffbad8) at src/perf/collect.c:479
#5  0x00007ffff78a8044 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#6  0x00007ffff79285fc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

YKD_SERIALISE_COMPILATION=0 gdb -batch -ex "r" -ex "bt" --args ../src/lua -e"_U=true"  db.lua 
Thread 20 received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffef76a6c0 (LWP 2193623)]
__memcpy_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:664
664     ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S: No such file or directory.
#0  __memcpy_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:664
Backtrace stopped: Cannot access memory at address 0x7fffef769aa8

YKLua: main/950a7ab826cdc502b91976c28f879a12a3573a3d
YK: main/4a955668d5a6647c5de8f043314983f057a5039e