Repository navigation
Closed
Description
During the process of ruby cleanup, it cannot exit for some reasons that may related with mini racer but not sure.
Below are some info that I collect when the issue appears.
Could you please suggest what might be the cause?
(gdb) info stacks
#0 0x00007f9ff7f6c9f3 in futex_wait_cancelable (private=<optimized out>,
expected=0, futex_word=0x7f9fd6f819e0)
at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1 __pthread_cond_wait_common (abstime=0x0, mutex=0x7f9fd6f81990,
cond=0x7f9fd6f819b8) at pthread_cond_wait.c:502
#2 __pthread_cond_wait (cond=0x7f9fd6f819b8, mutex=0x7f9fd6f81990)
at pthread_cond_wait.c:655
#3 0x00007f9ff1ab151b in v8::internal::OptimizingCompileDispatcher::Stop() ()
from /var/www/app/shared/bundle/ruby/2.3.0/gems/mini_racer-0.2.4/lib/mini_racer_extension.so
#4 0x00007f9ff17dee5f in v8::internal::Isolate::Deinit() ()
from /var/www/app/shared/bundle/ruby/2.3.0/gems/mini_racer-0.2.4/lib/mini_racer_extension.so
#5 0x00007f9ff17dec7d in v8::internal::Isolate::TearDown() ()
from /var/www/app/shared/bundle/ruby/2.3.0/gems/mini_racer-0.2.4/lib/mini_racer_extension.so
#6 0x00007f9ff15a6b40 in free_isolate (
isolate_info=isolate_info@entry=0x7f9fdd12a2e0)
at mini_racer_extension.cc:1064
#7 0x00007f9ff15a46cb in IsolateInfo::~IsolateInfo (this=<optimized out>,
__in_chrg=<optimized out>) at mini_racer_extension.cc:50
#8 IsolateInfo::release (this=<optimized out>) at mini_racer_extension.cc:69
#9 free_context_raw (arg=0x562335045560) at mini_racer_extension.cc:1091
#10 free_context (context_info=<optimized out>) at mini_racer_extension.cc:1114
#11 deallocate (data=0x7f9fd49b5860) at mini_racer_extension.cc:1141
#12 0x00007f9ff860e0f1 in run_final (objspace=0x56232dda1060,
zombie=140324439081120) at gc.c:2691
#13 finalize_list (objspace=objspace@entry=0x56232dda1060,
zombie=140324439081120) at gc.c:2707
#14 0x00007f9ff861a770 in rb_objspace_call_finalizer (objspace=0x56232dda1060)
at gc.c:2855
#15 rb_gc_call_finalizer_at_exit () at gc.c:2780
#16 0x00007f9ff85f7666 in ruby_finalize_1 () at eval.c:131
#17 ruby_cleanup (ex=<optimized out>) at eval.c:222
#18 0x00007f9ff85f78d5 in ruby_run_node (n=0x56232e238f50) at eval.c:302
#19 0x000056232c3a78eb in main (argc=<optimized out>, argv=<optimized out>)
at main.c:36
(gdb) info registers
rax 0xfffffffffffffe00 -512
rbx 0x7f9fd6f819b8 140324483111352
rcx 0x7f9ff7f6c9f3 140325036673523
rdx 0x0 0
rsi 0x80 128
rdi 0x7f9fd6f819e0 140324483111392
rbp 0x7f9fd6f819dc 0x7f9fd6f819dc
rsp 0x7ffeae5bf430 0x7ffeae5bf430
r8 0x0 0
r9 0x0 0
r10 0x0 0
r11 0x246 582
r12 0x7f9fd6f819e0 140324483111392
r13 0x0 0
r14 0x7f9fd6f81990 140324483111312
r15 0x0 0
rip 0x7f9ff7f6c9f3 0x7f9ff7f6c9f3 <__pthread_cond_wait+579>
eflags 0x246 [ PF ZF IF ]
cs 0x33 51
ss 0x2b 43
ds 0x0 0
es 0x0 0
fs 0x0 0
gs 0x0 0
(gdb) info threads
Id Target Id Frame
* 1 Thread 0x7f9ff8c7a740 (LWP 13114) "ruby" 0x00007f9ff7f6c9f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7f9fd6f819e0)
at ../sysdeps/unix/sysv/linux/futex-internal.h:88
2 Thread 0x7f9ff8aad700 (LWP 13116) "ruby-timer-thr" 0x00007f9ff8292bf9 in __GI___poll (fds=fds@entry=0x7f9ff8aaceb0, nfds=nfds@entry=2,
timeout=timeout@entry=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
Metadata
Metadata
Assignees
Labels
No labels
Activity
SamSaffron commentedon Jan 10, 2022
Very likely a result of running MiniRacer in a forking environment. It is only fork safe from version 0.6.1 and up provided you specify
MiniRacer::Platform.set_flags! :single_threaded