ykjit / yklua

yk-enabled Lua interpreter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failing test - errors.lua

Pavel-Durov opened this issue · comments

Issue

Error when running errors.lua.

Steps to reproduce

$ try_repeat 1000 ../src/lua ./errors.lua
lua: /yk-fork/ykllvm/llvm/lib/IR/Value.cpp:286: llvm::ValueName *llvm::Value::getValueName() const: Assertion `I != Ctx.pImpl->ValueNames.end() && "No name entry found!"' failed.
Aborted (core dumped)

$ YKD_SERIALISE_COMPILATION=0 try_repeat 1000 ../src/lua ./errors.lua

lua: yk-fork/ykllvm/llvm/lib/IR/Value.cpp:286: llvm::ValueName *llvm::Value::getValueName() const: Assertion `I != Ctx.pImpl->ValueNames.end() && "No name entry found!"' failed.
Aborted (core dumped)

Backtrace

lua: yk-fork/ykllvm/llvm/lib/IR/Value.cpp:286: llvm::ValueName *llvm::Value::getValueName() const: Assertion `I != Ctx.pImpl->ValueNames.end() && "No name entry found!"' failed.

Thread 5 "lua" received signal SIGABRT, Aborted.
[Switching to Thread 0x7ffff292b640 (LWP 142110)]
__pthread_kill_implementation (no_tid=0, signo=6, threadid=140737263089216) at ./nptl/pthread_kill.c:44
44	./nptl/pthread_kill.c: No such file or directory.
(gdb) bt
#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140737263089216) at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=140737263089216) at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=140737263089216, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3  0x00007ffff7642476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4  0x00007ffff76287f3 in __GI_abort () at ./stdlib/abort.c:79
#5  0x00007ffff762871b in __assert_fail_base (fmt=0x7ffff77dd150 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x7ffff5c64f83 "I != Ctx.pImpl->ValueNames.end() && \"No name entry found!\"", 
    file=0x7ffff5c64cee "yk-fork/ykllvm/llvm/lib/IR/Value.cpp", line=286, function=<optimised out>) at ./assert/assert.c:92
#6  0x00007ffff7639e96 in __GI___assert_fail (assertion=0x7ffff5c64f83 "I != Ctx.pImpl->ValueNames.end() && \"No name entry found!\"", 
    file=0x7ffff5c64cee "yk-fork/ykllvm/llvm/lib/IR/Value.cpp", line=286, function=0x7ffff5c64fbe "llvm::ValueName *llvm::Value::getValueName() const")
    at ./assert/assert.c:101
#7  0x00007ffff5abf277 in llvm::Value::getValueName() const () from yk-fork/target/debug/ykllvm/lib/libLLVMCore.so.16git
#8  0x00007ffff5abf09c in llvm::Value::~Value() () from yk-fork/target/debug/ykllvm/lib/libLLVMCore.so.16git
#9  0x00007ffff5abeba7 in llvm::Value::deleteValue() () from yk-fork/target/debug/ykllvm/lib/libLLVMCore.so.16git
#10 0x00007ffff5a1cecb in llvm::Instruction::eraseFromParent() () from yk-fork/target/debug/ykllvm/lib/libLLVMCore.so.16git
#11 0x00007ffff5f13668 in llvm::RecursivelyDeleteTriviallyDeadInstructions(llvm::SmallVectorImpl<llvm::WeakTrackingVH>&, llvm::TargetLibraryInfo const*, llvm::MemorySSAUpdater*, std::function<void (llvm::Value*)>) () from yk-fork/target/debug/ykllvm/lib/libLLVMTransformUtils.so.16git
#12 0x00007ffff333b374 in runImpl(llvm::Function&, llvm::SimplifyQuery const&, llvm::OptimizationRemarkEmitter*) ()
   from yk-fork/target/debug/ykllvm/lib/../lib/libLLVMScalarOpts.so.16git
#13 0x00007ffff333be1a in (anonymous namespace)::InstSimplifyLegacyPass::runOnFunction(llvm::Function&) ()
   from yk-fork/target/debug/ykllvm/lib/../lib/libLLVMScalarOpts.so.16git
#14 0x00007ffff5a50b18 in llvm::FPPassManager::runOnFunction(llvm::Function&) () from yk-fork/target/debug/ykllvm/lib/libLLVMCore.so.16git
#15 0x00007ffff5a58bd1 in llvm::FPPassManager::runOnModule(llvm::Module&) () from yk-fork/target/debug/ykllvm/lib/libLLVMCore.so.16git
#16 0x00007ffff5a5152c in llvm::legacy::PassManagerImpl::run(llvm::Module&) () from yk-fork/target/debug/ykllvm/lib/libLLVMCore.so.16git
#17 0x00007ffff7c0e6c8 in compileIRTrace<std::tuple<llvm::Module*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::map<llvm::GlobalValue*, void*, std::less<llvm::GlobalValue*>, std::allocator<std::pair<llvm::GlobalValue* const, void*> > >, void*, unsigned long> (*)(llvm::Module*, char**, unsigned long*, unsigned long, char**, void**, unsigned long)> (
    Func=0x7ffff7c18ab0 <createModule[abi:cxx11](llvm::Module*, char**, unsigned long*, unsigned long, char**, void**, unsigned long)>, FuncNames=0x7fffdc0116c0, BBs=0x7fffdc011f90, TraceLen=280, 
    FAddrKeys=0x7fffdc012860, FAddrVals=0x7fffdc0128f0, FAddrLen=16, BitcodeData=0x2580f0 <llvm.embedded[module]+8>, BitcodeLen=3619736, DebugInfoFD=-1, DebugInfoPath=0x0) at src/ykllvmwrap.cc:432
#18 0x00007ffff7c0e4de in __yktracec_irtrace_compile (FuncNames=0x7fffdc0116c0, BBs=0x7fffdc011f90, TraceLen=280, FAddrKeys=0x7fffdc012860, FAddrVals=0x7fffdc0128f0, FAddrLen=16, 
    BitcodeData=0x2580f0 <llvm.embedded[module]+8>, BitcodeLen=3619736, DebugInfoFD=-1, DebugInfoPath=0x0) at src/ykllvmwrap.cc:450
#19 0x00007ffff7a666e8 in ykrt::trace::IRTrace::compile (self=0x7ffff292a670) at ykrt/src/trace/mod.rs:178
#20 0x00007ffff7a7c447 in ykrt::mt::{impl#0}::queue_compile_job::{closure#0} () at ykrt/src/mt.rs:389
#21 0x00007ffff7a711be in core::ops::function::FnOnce::call_once<ykrt::mt::{impl#0}::queue_compile_job::{closure_env#0}, ()> ()
    at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library/core/src/ops/function.rs:250
#22 0x00007ffff7a96358 in alloc::boxed::{impl#47}::call_once<(), (dyn core::ops::function::FnOnce<(), Output=()> + core::marker::Send), alloc::alloc::Global> (self=..., args=())
    at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library/alloc/src/boxed.rs:2010
#23 0x00007ffff7a8dadb in lock_api::mutex::MutexGuard<parking_lot::raw_mutex::RawMutex, alloc::collections::vec_deque::VecDeque<alloc::boxed::Box<(dyn core::ops::function::FnOnce<(), Output=()> + core::marker::Send), alloc::alloc::Global>, alloc::alloc::Global>>::unlocked<parking_lot::raw_mutex::RawMutex, alloc::collections::vec_deque::VecDeque<alloc::boxed::Box<(dyn core::ops::function::FnOnce<(), Output=()> + core::marker::Send), alloc::alloc::Global>, alloc::alloc::Global>, alloc::boxed::Box<(dyn core::ops::function::FnOnce<(), Output=()> + core::marker::Send), alloc::alloc::Global>, ()> (s=0x7ffff292a910, f=...)
    at /home/kimchi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lock_api-0.4.10/src/mutex.rs:567
#24 0x00007ffff7a7ab31 in ykrt::mt::{impl#0}::queue_job::{closure#0} () at ykrt/src/mt.rs:161
#25 0x00007ffff7a96ac3 in std::sys_common::backtrace::__rust_begin_short_backtrace<ykrt::mt::{impl#0}::queue_job::{closure_env#0}, ()> (f=...)
    at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library/std/src/sys_common/backtrace.rs:135
#26 0x00007ffff7a79244 in std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure#0}<ykrt::mt::{impl#0}::queue_job::{closure_env#0}, ()> ()
    at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library/std/src/thread/mod.rs:529
#27 0x00007ffff7a95f74 in core::panic::unwind_safe::{impl#23}::call_once<(), std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<ykrt::mt::{impl#0}::queue_job::{closure_env#0}, ()>> (self=...)
    at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library/core/src/panic/unwind_safe.rs:271
#28 0x00007ffff7a65527 in std::panicking::try::do_call<core::panic::unwind_safe::AssertUnwindSafe<std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<ykrt::mt::{impl#0}::queue_job::{closure_env#0}, ()>>, ()> (data=0x7ffff292aa60) at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library/std/src/panicking.rs:500
#29 0x00007ffff7a657eb in __rust_try () from yk-fork/bin/../target/debug/deps/libykcapi.so
#30 0x00007ffff7a653fe in std::panicking::try<(), core::panic::unwind_safe::AssertUnwindSafe<std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<ykrt::mt::{impl#0}::queue_job::{closure_env#0}, ()>>> (f=...) at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library/std/src/panicking.rs:464
#31 0x00007ffff7a7906e in std::panic::catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<ykrt::mt::{impl#0}::queue_job::{closure_env#0}, ()>>, ()> (f=...) at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library/std/src/panic.rs:142
#32 std::thread::{impl#0}::spawn_unchecked_::{closure#1}<ykrt::mt::{impl#0}::queue_job::{closure_env#0}, ()> () at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library/std/src/thread/mod.rs:528
#33 0x00007ffff7a7113f in core::ops::function::FnOnce::call_once<std::thread::{impl#0}::spawn_unchecked_::{closure_env#1}<ykrt::mt::{impl#0}::queue_job::{closure_env#0}, ()>, ()> ()
    at /rustc/85bf07972a1041b9e25393b803d0e006bec3eaaf/library/core/src/ops/function.rs:250
#34 0x00007ffff7c8f465 in alloc::boxed::{impl#47}::call_once<(), dyn core::ops::function::FnOnce<(), Output=()>, alloc::alloc::Global> () at library/alloc/src/boxed.rs:2010
#35 alloc::boxed::{impl#47}::call_once<(), alloc::boxed::Box<dyn core::ops::function::FnOnce<(), Output=()>, alloc::alloc::Global>, alloc::alloc::Global> () at library/alloc/src/boxed.rs:2010
#36 std::sys::unix::thread::{impl#2}::new::thread_start () at library/std/src/sys/unix/thread.rs:108
--Type <RET> for more, q to quit, c to continue without paging--
#37 0x00007ffff7694b43 in start_thread (arg=<optimised out>) at ./nptl/pthread_create.c:442
#38 0x00007ffff7726a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Versions

YkLua - lua-tests/fac6e7e244d3a30366bb06b01c00d2462e901fbd
Yk - master/a690e6eaf7253a4fa9c04bb54406c07b7efc0085

Stacktrace
YkLua: main/950a7ab826cdc502b91976c28f879a12a3573a3d
Yk: main/4a955668d5a6647c5de8f043314983f057a5039e

YKD_SERIALISE_COMPILATION=0 gdb -batch --ex 'r' --ex 'bt' --args  ../src/lua errors.lua

lua: /home/pd/yk-fork/target/debug/ykllvm/include/llvm/ExecutionEngine/Orc/ThreadSafeModule.h:134: decltype(auto) llvm::orc::ThreadSafeModule::withModuleDo(Func &&) [Func = (lambda at src/ykllvmwrap.cc:408:30)]: Assertion `M && "Can not call on null module"' failed.

Thread 9 "lua" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffecd9a6c0 (LWP 2241344)]
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
44      ./nptl/pthread_kill.c: No such file or directory.
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
#1  0x00007ffff78a9d9f in __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
#2  0x00007ffff785af32 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007ffff7845472 in __GI_abort () at ./stdlib/abort.c:79
#4  0x00007ffff7845395 in __assert_fail_base (fmt=0x7ffff79b9a90 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x7ffff7cdfd08 "M && \"Can not call on null module\"", file=file@entry=0x7ffff7cdf124 "/home/pd/yk-fork/target/debug/ykllvm/include/llvm/ExecutionEngine/Orc/ThreadSafeModule.h", line=line@entry=134, function=function@entry=0x7ffff7cdfd2b "decltype(auto) llvm::orc::ThreadSafeModule::withModuleDo(Func &&) [Func = (lambda at src/ykllvmwrap.cc:408:30)]") at ./assert/assert.c:92
#5  0x00007ffff7853e32 in __GI___assert_fail (assertion=0x7ffff7cdfd08 "M && \"Can not call on null module\"", file=0x7ffff7cdf124 "/home/pd/yk-fork/target/debug/ykllvm/include/llvm/ExecutionEngine/Orc/ThreadSafeModule.h", line=134, function=0x7ffff7cdfd2b "decltype(auto) llvm::orc::ThreadSafeModule::withModuleDo(Func &&) [Func = (lambda at src/ykllvmwrap.cc:408:30)]") at ./assert/assert.c:101
#6  0x00007ffff7bf7580 in llvm::orc::ThreadSafeModule::withModuleDo<compileIRTrace<std::tuple<llvm::Module*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::map<llvm::GlobalValue*, void*, std::less<llvm::GlobalValue*>, std::allocator<std::pair<llvm::GlobalValue* const, void*> > >, void*, unsigned long> (*)(llvm::Module*, char**, unsigned long*, unsigned long, char**, void**, unsigned long)>(std::tuple<llvm::Module*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::map<llvm::GlobalValue*, void*, std::less<llvm::GlobalValue*>, std::allocator<std::pair<llvm::GlobalValue* const, void*> > >, void*, unsigned long> (*)(llvm::Module*, char**, unsigned long*, unsigned long, char**, void**, unsigned long), char**, unsigned long*, unsigned long, char**, void**, unsigned long, void*, unsigned long, int, char*)::{lambda(llvm::Module&)#1}>(compileIRTrace<std::tuple<llvm::Module*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::map<llvm::GlobalValue*, void*, std::less<llvm::GlobalValue*>, std::allocator<std::pair<llvm::GlobalValue* const, void*> > >, void*, unsigned long> (*)(llvm::Module*, char**, unsigned long*, unsigned long, char**, void**, unsigned long)>(std::tuple<llvm::Module*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::map<llvm::GlobalValue*, void*, std::less<llvm::GlobalValue*>, std::allocator<std::pair<llvm::GlobalValue* const, void*> > >, void*, unsigned long> (*)(llvm::Module*, char**, unsigned long*, unsigned long, char**, void**, unsigned long), char**, unsigned long*, unsigned long, char**, void**, unsigned long, void*, unsigned long, int, char*)::{lambda(llvm::Module&)#1}&&) (this=0x7ffff7d9c300 <GlobalAOTMod>, F=...) at /home/pd/yk-fork/target/debug/ykllvm/include/llvm/ExecutionEngine/Orc/ThreadSafeModule.h:134
#7  0x00007ffff7bef609 in compileIRTrace<std::tuple<llvm::Module*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::map<llvm::GlobalValue*, void*, std::less<llvm::GlobalValue*>, std::allocator<std::pair<llvm::GlobalValue* const, void*> > >, void*, unsigned long> (*)(llvm::Module*, char**, unsigned long*, unsigned long, char**, void**, unsigned long)> (Func=0x7ffff7bf9b00 <createModule[abi:cxx11](llvm::Module*, char**, unsigned long*, unsigned long, char**, void**, unsigned long)>, FuncNames=0x7fffd8004150, BBs=0x7fffd8008850, TraceLen=301, FAddrKeys=0x7fffd8004b60, FAddrVals=0x7fffd8004bf0, FAddrLen=16, BitcodeData=0x256f40 <llvm.embedded[module]+8>, BitcodeLen=3618920, DebugInfoFD=-1, DebugInfoPath=0x0) at src/ykllvmwrap.cc:408
#8  0x00007ffff7bef4de in __yktracec_irtrace_compile (FuncNames=0x7fffd8004150, BBs=0x7fffd8008850, TraceLen=301, FAddrKeys=0x7fffd8004b60, FAddrVals=0x7fffd8004bf0, FAddrLen=16, BitcodeData=0x256f40 <llvm.embedded[module]+8>, BitcodeLen=3618920, DebugInfoFD=-1, DebugInfoPath=0x0) at src/ykllvmwrap.cc:450
#9  0x00007ffff7a7a0f8 in ykrt::compile::jitc_llvm::{impl#0}::compile (self=0x91b720, mt=..., irtrace=...) at ykrt/src/compile/jitc_llvm.rs:38
#10 0x00007ffff7a7ccad in ykrt::mt::{impl#0}::queue_compile_job::{closure#0} () at ykrt/src/mt.rs:397
#11 0x00007ffff7a63bce in core::ops::function::FnOnce::call_once<ykrt::mt::{impl#0}::queue_compile_job::{closure_env#0}, ()> () at /rustc/8142a319ed5c1d1f96e5a1881a6546e463b77c8f/library/core/src/ops/function.rs:250
#12 0x00007ffff7a63928 in alloc::boxed::{impl#47}::call_once<(), (dyn core::ops::function::FnOnce<(), Output=()> + core::marker::Send), alloc::alloc::Global> (self=..., args=()) at /rustc/8142a319ed5c1d1f96e5a1881a6546e463b77c8f/library/alloc/src/boxed.rs:2007
#13 0x00007ffff7a830ab in lock_api::mutex::MutexGuard<parking_lot::raw_mutex::RawMutex, alloc::collections::vec_deque::VecDeque<alloc::boxed::Box<(dyn core::ops::function::FnOnce<(), Output=()> + core::marker::Send), alloc::alloc::Global>, alloc::alloc::Global>>::unlocked<parking_lot::raw_mutex::RawMutex, alloc::collections::vec_deque::VecDeque<alloc::boxed::Box<(dyn core::ops::function::FnOnce<(), Output=()> + core::marker::Send), alloc::alloc::Global>, alloc::alloc::Global>, alloc::boxed::Box<(dyn core::ops::function::FnOnce<(), Output=()> + core::marker::Send), alloc::alloc::Global>, ()> (s=0x7fffecd999e0, f=...) at /home/pd/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lock_api-0.4.10/src/mutex.rs:567
#14 0x00007ffff7a7b4d1 in ykrt::mt::{impl#0}::queue_job::{closure#0} () at ykrt/src/mt.rs:168
#15 0x00007ffff7a7d3b3 in std::sys_common::backtrace::__rust_begin_short_backtrace<ykrt::mt::{impl#0}::queue_job::{closure_env#0}, ()> (f=...) at /rustc/8142a319ed5c1d1f96e5a1881a6546e463b77c8f/library/std/src/sys_common/backtrace.rs:154
#16 0x00007ffff7a6a254 in std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure#0}<ykrt::mt::{impl#0}::queue_job::{closure_env#0}, ()> () at /rustc/8142a319ed5c1d1f96e5a1881a6546e463b77c8f/library/std/src/thread/mod.rs:529
#17 0x00007ffff7a6f424 in core::panic::unwind_safe::{impl#23}::call_once<(), std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<ykrt::mt::{impl#0}::queue_job::{closure_env#0}, ()>> (self=...) at /rustc/8142a319ed5c1d1f96e5a1881a6546e463b77c8f/library/core/src/panic/unwind_safe.rs:271
#18 0x00007ffff7a6ea77 in std::panicking::try::do_call<core::panic::unwind_safe::AssertUnwindSafe<std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<ykrt::mt::{impl#0}::queue_job::{closure_env#0}, ()>>, ()> (data=0x7fffecd99b00) at /rustc/8142a319ed5c1d1f96e5a1881a6546e463b77c8f/library/std/src/panicking.rs:526
#19 0x00007ffff7a6ecdb in __rust_try () from /home/pd/yk-fork/bin/../target/debug/deps/libykcapi.so
#20 0x00007ffff7a6e97e in std::panicking::try<(), core::panic::unwind_safe::AssertUnwindSafe<std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<ykrt::mt::{impl#0}::queue_job::{closure_env#0}, ()>>> (f=...) at /rustc/8142a319ed5c1d1f96e5a1881a6546e463b77c8f/library/std/src/panicking.rs:490
#21 0x00007ffff7a6a096 in std::panic::catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<ykrt::mt::{impl#0}::queue_job::{closure_env#0}, ()>>, ()> (f=...) at /rustc/8142a319ed5c1d1f96e5a1881a6546e463b77c8f/library/std/src/panic.rs:142
#22 std::thread::{impl#0}::spawn_unchecked_::{closure#1}<ykrt::mt::{impl#0}::queue_job::{closure_env#0}, ()> () at /rustc/8142a319ed5c1d1f96e5a1881a6546e463b77c8f/library/std/src/thread/mod.rs:528
#23 0x00007ffff7a63caf in core::ops::function::FnOnce::call_once<std::thread::{impl#0}::spawn_unchecked_::{closure_env#1}<ykrt::mt::{impl#0}::queue_job::{closure_env#0}, ()>, ()> () at /rustc/8142a319ed5c1d1f96e5a1881a6546e463b77c8f/library/core/src/ops/function.rs:250
#24 0x00007ffff7c801e5 in alloc::boxed::{impl#47}::call_once<(), dyn core::ops::function::FnOnce<(), Output=()>, alloc::alloc::Global> () at library/alloc/src/boxed.rs:2007
#25 alloc::boxed::{impl#47}::call_once<(), alloc::boxed::Box<dyn core::ops::function::FnOnce<(), Output=()>, alloc::alloc::Global>, alloc::alloc::Global> () at library/alloc/src/boxed.rs:2007
#26 std::sys::unix::thread::{impl#2}::new::thread_start () at library/std/src/sys/unix/thread.rs:108
#27 0x00007ffff78a8044 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#28 0x00007ffff79285fc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Update

ERROR - YKD_SERIALISE_COMPILATION=1
ERROR - YKD_SERIALISE_COMPILATION=0

Versions

YKLUA - main/810108764e996d727442d6984f7a8318155a08c8
YK - master/a6613631e8e13cfe3ba4cc8ee24df6517831fd6c

Backtrace

$ YKD_SERIALISE_COMPILATION=0 gdb -batch -ex r -ex bt -args ../src/lua -e"_U=true" errors.lua

[New Thread 0x7ffff1afe6c0 (LWP 1659378)]
[Thread 0x7ffff1afe6c0 (LWP 1659378) exited]
[New Thread 0x7ffff1afe6c0 (LWP 1659379)]
[Thread 0x7ffff26346c0 (LWP 1659377) exited]
+
[New Thread 0x7ffff23f26c0 (LWP 1659380)]
[Thread 0x7ffff23f26c0 (LWP 1659380) exited]
[New Thread 0x7ffff26346c0 (LWP 1659381)]
testing stack overflow
(expected stack overflow after 999964 calls)
(expected stack overflow after 999964 calls)
(expected stack overflow after 999964 calls)
+
+
[New Thread 0x7ffff23f26c0 (LWP 1659391)]
[Thread 0x7ffff23f26c0 (LWP 1659391) exited]
thread '<unnamed>' panicked at ykrt/src/trace/hwt/mod.rs:39:23:
not yet implemented: Unrecoverable("c set errnor 12")
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5

Thread 1 "lua" received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
44	./nptl/pthread_kill.c: No such file or directory.
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
#1  0x00007ffff78a9d9f in __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
#2  0x00007ffff785af32 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007ffff7845472 in __GI_abort () at ./stdlib/abort.c:79
#4  0x00007ffff7cfb817 in std::sys::unix::abort_internal () at library/std/src/sys/unix/mod.rs:370
#5  0x00007ffff7cf8f22 in std::panicking::rust_panic () at library/std/src/panicking.rs:804
#6  0x00007ffff7cf8e17 in std::panicking::rust_panic_with_hook () at library/std/src/panicking.rs:775
#7  0x00007ffff7cf8b51 in std::panicking::begin_panic_handler::{closure#0} () at library/std/src/panicking.rs:631
#8  0x00007ffff7cf7516 in std::sys_common::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic_handler::{closure_env#0}, !> () at library/std/src/sys_common/backtrace.rs:170
#9  0x00007ffff7cf8892 in std::panicking::begin_panic_handler () at library/std/src/panicking.rs:619
#10 0x00007ffff7a62eb5 in core::panicking::panic_fmt () at library/core/src/panicking.rs:72
#11 0x00007ffff7ad8a18 in ykrt::trace::hwt::{impl#2}::stop_collector (self=0x93db60) at ykrt/src/trace/hwt/mod.rs:39
#12 0x00007ffff7a6960f in ykrt::mt::MT::control_point (self=0x7fffffffb7a8, loc=0x931e00, ctrlp_vars=0x7fffffffbc18, frameaddr=0x7fffffffca80) at ykrt/src/mt.rs:261
#13 0x00007ffff7a63db7 in ykcapi::__ykrt_control_point (mt=0x91b7e0, loc=0x931e00, ctrlp_vars=0x7fffffffbc18, frameaddr=0x7fffffffca80) at ykcapi/src/lib.rs:67
#14 0x0000000000870ef3 in luaV_execute (L=<optimized out>, ci=<optimized out>) at lvm.c:1186
#15 0x000000000080246b in ccall (L=0x91ae28, func=<optimized out>, nResults=<optimized out>, inc=<optimized out>) at ldo.c:609
#16 0x0000000000802591 in luaD_callnoyield (L=0x91ae28, func=0x946a40, nResults=-1) at ldo.c:627
#17 0x00000000007ee823 in f_call (L=0x91ae28, ud=<optimized out>) at lapi.c:1041
#18 0x00000000007fc517 in luaD_rawrunprotected (L=0x91ae28, f=0x7ee760 <f_call>, ud=0x7ffff2635bd8) at ldo.c:144
#19 0x0000000000804d36 in luaD_pcall (L=0x91ae28, func=0x7ee760 <f_call>, u=0x7ffff2635bd8, old_top=<optimized out>, ef=<optimized out>) at ldo.c:926
#20 0x00000000007ee30c in lua_pcallk (L=0x91ae28, nargs=<optimized out>, nresults=<optimized out>, errfunc=<optimized out>, ctx=<optimized out>, k=<optimized out>) at lapi.c:1067
#21 0x000000000089d7f5 in luaB_pcall (L=0x91ae28) at lbaselib.c:477
#22 0x00000000008013a5 in precallC (L=0x91ae28, func=<optimized out>, nresults=<optimized out>, f=0x89d660 <luaB_pcall>) at ldo.c:506
#23 0x00000000008019f8 in luaD_precall (L=0x91ae28, func=0x946a20, nresults=2) at ldo.c:572
#24 0x00000000008878b8 in luaV_execute (L=0x91ae28, ci=<optimized out>) at lvm.c:1655
#25 0x000000000080246b in ccall (L=0x91ae28, func=<optimized out>, nResults=<optimized out>, inc=<optimized out>) at ldo.c:609
#26 0x0000000000802591 in luaD_callnoyield (L=0x91ae28, func=0x91b940, nResults=-1) at ldo.c:627
#27 0x00000000007ee823 in f_call (L=0x91ae28, ud=<optimized out>) at lapi.c:1041
#28 0x00000000007fc517 in luaD_rawrunprotected (L=0x91ae28, f=0x7ee760 <f_call>, ud=0x7ffff2635308) at ldo.c:144
#29 0x0000000000804d36 in luaD_pcall (L=0x91ae28, func=0x7ee760 <f_call>, u=0x7ffff2635308, old_top=<optimized out>, ef=<optimized out>) at ldo.c:926
#30 0x00000000007ee30c in lua_pcallk (L=0x91ae28, nargs=<optimized out>, nresults=<optimized out>, errfunc=<optimized out>, ctx=<optimized out>, k=<optimized out>) at lapi.c:1067
#31 0x00000000007dff43 in docall (L=0x91ae28, narg=0, nres=-1) at lua.c:160
#32 0x00000000007df644 in handle_script (L=0x91ae28, argv=<optimized out>) at lua.c:255
#33 0x00000000007dd903 in pmain (L=0x91ae28) at lua.c:634
#34 0x00000000008013a5 in precallC (L=0x91ae28, func=<optimized out>, nresults=<optimized out>, f=0x7dd110 <pmain>) at ldo.c:506
#35 0x00000000008019f8 in luaD_precall (L=0x91ae28, func=0x91b900, nresults=1) at ldo.c:572
#36 0x00000000008023af in ccall (L=0x91ae28, func=0x91b900, nResults=1, inc=<optimized out>) at ldo.c:607
#37 0x0000000000802591 in luaD_callnoyield (L=0x91ae28, func=0x91b900, nResults=1) at ldo.c:627
#38 0x00000000007ee823 in f_call (L=0x91ae28, ud=<optimized out>) at lapi.c:1041
#39 0x00000000007fc517 in luaD_rawrunprotected (L=0x91ae28, f=0x7ee760 <f_call>, ud=0x7ffff2635058) at ldo.c:144
#40 0x0000000000804d36 in luaD_pcall (L=0x91ae28, func=0x7ee760 <f_call>, u=0x7ffff2635058, old_top=<optimized out>, ef=<optimized out>) at ldo.c:926
#41 0x00000000007ee30c in lua_pcallk (L=0x91ae28, nargs=<optimized out>, nresults=<optimized out>, errfunc=<optimized out>, ctx=<optimized out>, k=<optimized out>) at lapi.c:1067
#42 0x00000000007dcdd0 in main (argc=<optimized out>, argv=<optimized out>) at lua.c:660
$ YKD_SERIALISE_COMPILATION=1 gdb -batch -ex r -ex bt -args ../src/lua -e"_U=true" errors.lua
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff26346c0 (LWP 1659451)]
testing errors

 >>> testC not active: skipping memory message test <<<

[New Thread 0x7ffff1afe6c0 (LWP 1659452)]
[Thread 0x7ffff1afe6c0 (LWP 1659452) exited]
[Thread 0x7ffff26346c0 (LWP 1659451) exited]
[New Thread 0x7ffff1afe6c0 (LWP 1659453)]
[Thread 0x7ffff1afe6c0 (LWP 1659453) exited]
+
[New Thread 0x7ffff1afe6c0 (LWP 1659454)]
[Thread 0x7ffff1afe6c0 (LWP 1659454) exited]
[New Thread 0x7ffff1afe6c0 (LWP 1659455)]
[Thread 0x7ffff1afe6c0 (LWP 1659455) exited]
[New Thread 0x7ffff1afe6c0 (LWP 1659456)]
[Thread 0x7ffff1afe6c0 (LWP 1659456) exited]
testing stack overflow
(expected stack overflow after 999964 calls)
(expected stack overflow after 999964 calls)
(expected stack overflow after 999964 calls)
+
+
[New Thread 0x7ffff1afe6c0 (LWP 1659463)]
[Thread 0x7ffff1afe6c0 (LWP 1659463) exited]
thread '<unnamed>' panicked at ykrt/src/trace/hwt/mod.rs:39:23:
not yet implemented: Unrecoverable("c set errnor 12")
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5

Thread 1 "lua" received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
44	./nptl/pthread_kill.c: No such file or directory.
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
#1  0x00007ffff78a9d9f in __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
#2  0x00007ffff785af32 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007ffff7845472 in __GI_abort () at ./stdlib/abort.c:79
#4  0x00007ffff7cfb817 in std::sys::unix::abort_internal () at library/std/src/sys/unix/mod.rs:370
#5  0x00007ffff7cf8f22 in std::panicking::rust_panic () at library/std/src/panicking.rs:804
#6  0x00007ffff7cf8e17 in std::panicking::rust_panic_with_hook () at library/std/src/panicking.rs:775
#7  0x00007ffff7cf8b51 in std::panicking::begin_panic_handler::{closure#0} () at library/std/src/panicking.rs:631
#8  0x00007ffff7cf7516 in std::sys_common::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic_handler::{closure_env#0}, !> () at library/std/src/sys_common/backtrace.rs:170
#9  0x00007ffff7cf8892 in std::panicking::begin_panic_handler () at library/std/src/panicking.rs:619
#10 0x00007ffff7a62eb5 in core::panicking::panic_fmt () at library/core/src/panicking.rs:72
#11 0x00007ffff7ad8a18 in ykrt::trace::hwt::{impl#2}::stop_collector (self=0x34b3590) at ykrt/src/trace/hwt/mod.rs:39
#12 0x00007ffff7a6960f in ykrt::mt::MT::control_point (self=0x7fffffffb7a8, loc=0x931e00, ctrlp_vars=0x7fffffffbc18, frameaddr=0x7fffffffca80) at ykrt/src/mt.rs:261
#13 0x00007ffff7a63db7 in ykcapi::__ykrt_control_point (mt=0x91b7e0, loc=0x931e00, ctrlp_vars=0x7fffffffbc18, frameaddr=0x7fffffffca80) at ykcapi/src/lib.rs:67
#14 0x0000000000870ef3 in luaV_execute (L=<optimized out>, ci=<optimized out>) at lvm.c:1186
#15 0x000000000080246b in ccall (L=0x91ae28, func=<optimized out>, nResults=<optimized out>, inc=<optimized out>) at ldo.c:609
#16 0x0000000000802591 in luaD_callnoyield (L=0x91ae28, func=0x27e9fe0, nResults=-1) at ldo.c:627
#17 0x00000000007ee823 in f_call (L=0x91ae28, ud=<optimized out>) at lapi.c:1041
#18 0x00000000007fc517 in luaD_rawrunprotected (L=0x91ae28, f=0x7ee760 <f_call>, ud=0x7ffff2635bd8) at ldo.c:144
#19 0x0000000000804d36 in luaD_pcall (L=0x91ae28, func=0x7ee760 <f_call>, u=0x7ffff2635bd8, old_top=<optimized out>, ef=<optimized out>) at ldo.c:926
#20 0x00000000007ee30c in lua_pcallk (L=0x91ae28, nargs=<optimized out>, nresults=<optimized out>, errfunc=<optimized out>, ctx=<optimized out>, k=<optimized out>) at lapi.c:1067
#21 0x000000000089d7f5 in luaB_pcall (L=0x91ae28) at lbaselib.c:477
#22 0x00000000008013a5 in precallC (L=0x91ae28, func=<optimized out>, nresults=<optimized out>, f=0x89d660 <luaB_pcall>) at ldo.c:506
#23 0x00000000008019f8 in luaD_precall (L=0x91ae28, func=0x27e9fc0, nresults=2) at ldo.c:572
#24 0x00000000008878b8 in luaV_execute (L=0x91ae28, ci=<optimized out>) at lvm.c:1655
#25 0x000000000080246b in ccall (L=0x91ae28, func=<optimized out>, nResults=<optimized out>, inc=<optimized out>) at ldo.c:609
#26 0x0000000000802591 in luaD_callnoyield (L=0x91ae28, func=0x91b940, nResults=-1) at ldo.c:627
#27 0x00000000007ee823 in f_call (L=0x91ae28, ud=<optimized out>) at lapi.c:1041
#28 0x00000000007fc517 in luaD_rawrunprotected (L=0x91ae28, f=0x7ee760 <f_call>, ud=0x7ffff2635308) at ldo.c:144
#29 0x0000000000804d36 in luaD_pcall (L=0x91ae28, func=0x7ee760 <f_call>, u=0x7ffff2635308, old_top=<optimized out>, ef=<optimized out>) at ldo.c:926
#30 0x00000000007ee30c in lua_pcallk (L=0x91ae28, nargs=<optimized out>, nresults=<optimized out>, errfunc=<optimized out>, ctx=<optimized out>, k=<optimized out>) at lapi.c:1067
#31 0x00000000007dff43 in docall (L=0x91ae28, narg=0, nres=-1) at lua.c:160
#32 0x00000000007df644 in handle_script (L=0x91ae28, argv=<optimized out>) at lua.c:255
#33 0x00000000007dd903 in pmain (L=0x91ae28) at lua.c:634
#34 0x00000000008013a5 in precallC (L=0x91ae28, func=<optimized out>, nresults=<optimized out>, f=0x7dd110 <pmain>) at ldo.c:506
#35 0x00000000008019f8 in luaD_precall (L=0x91ae28, func=0x91b900, nresults=1) at ldo.c:572
#36 0x00000000008023af in ccall (L=0x91ae28, func=0x91b900, nResults=1, inc=<optimized out>) at ldo.c:607
#37 0x0000000000802591 in luaD_callnoyield (L=0x91ae28, func=0x91b900, nResults=1) at ldo.c:627
#38 0x00000000007ee823 in f_call (L=0x91ae28, ud=<optimized out>) at lapi.c:1041
#39 0x00000000007fc517 in luaD_rawrunprotected (L=0x91ae28, f=0x7ee760 <f_call>, ud=0x7ffff2635058) at ldo.c:144
#40 0x0000000000804d36 in luaD_pcall (L=0x91ae28, func=0x7ee760 <f_call>, u=0x7ffff2635058, old_top=<optimized out>, ef=<optimized out>) at ldo.c:926
#41 0x00000000007ee30c in lua_pcallk (L=0x91ae28, nargs=<optimized out>, nresults=<optimized out>, errfunc=<optimized out>, ctx=<optimized out>, k=<optimized out>) at lapi.c:1067
#42 0x00000000007dcdd0 in main (argc=<optimized out>, argv=<optimized out>) at lua.c:660