ykjit/yklua

Failing test - strings.lua

Opened this issue · 2 comments

Issue

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

$ YKD_SERIALISE_COMPILATION=0 try_repeat 1000 ../src/lua -e"_U=true" strings.lua
.....
testing strings and string library
testing 'format %a %A'
'collate' locale not found
'ctype' locale not found

 >>> testC not active: skipping 'pushfstring' tests <<<

OK
Segmentation fault (core dumped)
$ YKD_SERIALISE_COMPILATION=1 try_repeat 1000 ../src/lua -e"_U=true" strings.lua
testing strings and string library
testing 'format %a %A'
'collate' locale not found
'ctype' locale not found

 >>> testC not active: skipping 'pushfstring' tests <<<

OK
realloc(): invalid pointer
Aborted (core dumped)

Notes

Both compilation modes are non-deterministic - sometimes it errors out and sometimes completes successfully.

Versions:

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

Error update:

YKLUA - 950a7ab
YK - c6a0b9ca333408693a0c904bd502b1cdf0dc8d3f

$ YKD_SERIALISE_COMPILATION=1 gdb -batch -ex r -ex bt --args  ../src/lua strings.lua

 >>> testC not active: skipping 'pushfstring' tests <<<

OK

Thread 6 "lua" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff1afe6c0 (LWP 1328069)]
__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
#1  0x00007ffff7b122e5 in read_aux (aux_buf=0x7fffe8000000, hdr=0x7ffff243f000, trace=0x38f1900, err=0x36ab938) at src/perf/collect.c:296
#2  0x00007ffff7b12165 in handle_sample (aux_buf=0x7fffe8000000, hdr=0x7ffff243f000, trace=0x38f1900, data_tmp=0x7fffed033440, err=0x36ab938) at src/perf/collect.c:241
#3  0x00007ffff7b11f0c in poll_loop (perf_fd=5, stop_fd=3, mmap_hdr=0x7ffff243f000, aux=0x7fffe8000000, trace=0x38f1900, err=0x36ab938) at src/perf/collect.c:353
#4  0x00007ffff7b11bf0 in collector_thread (arg=0x7fffffffb9e8) at src/perf/collect.c:480
#5  0x00007ffff78a8044 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#6  0x00007ffff792861c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

The YKD_SERIALISE_COMPILATION=0 runtime error is non-deterministic, also I couldn't reproduce it with gdb attached therefore I can't provide a backtrace.

Update

ERROR - YKD_SERIALISE_COMPILATION=1
ERROR - YKD_SERIALISE_COMPILATION=0

Versions

YKLUA - main/810108764e996d727442d6984f7a8318155a08c8
YK - master/a6613631e8e13cfe3ba4cc8ee24df6517831fd6c

Backtrace

YKD_SERIALISE_COMPILATION=0 try_repeat -v 1000  ../src/lua -e"_U=true" ./strings.lua
...
testing strings and string library
testing 'format %a %A'
'collate' locale not found
'ctype' locale not found

 >>> testC not active: skipping 'pushfstring' tests <<<

OK
double free or corruption (!prev)
Aborted
YKD_SERIALISE_COMPILATION=1 try_repeat -v 1000  ../src/lua -e"_U=true" ./strings.lua
===> 1: ../src/lua -e_U=true ./strings.lua
testing strings and string library
testing 'format %a %A'
'collate' locale not found
'ctype' locale not found

 >>> testC not active: skipping 'pushfstring' tests <<<

OK
Segmentation fault