Skip to content

Instantly share code, notes, and snippets.

@cheald
Created December 8, 2012 00:58
Show Gist options
  • Save cheald/4237901 to your computer and use it in GitHub Desktop.
Save cheald/4237901 to your computer and use it in GitHub Desktop.
0x00000037eeabb187 in sched_yield () from /lib64/libc.so.6
(gdb) backtrace
#0 0x00000037eeabb187 in sched_yield () from /lib64/libc.so.6
#1 0x00002b96ebe39ba3 in gvl_yield (vm=0x55f8f20, th=<value optimized out>) at thread_pthread.c:123
#2 0x00002b96ebe39f39 in rb_thread_schedule_limits () at thread.c:1025
#3 rb_thread_schedule () at thread.c:1035
#4 0x00002b96ebe3a136 in rb_thread_terminate_all () at thread.c:375
#5 0x00002b96ebd1af8e in ruby_cleanup (ex=6) at eval.c:140
#6 0x00002b96ebd1b0d6 in ruby_run_node (n=0x5ba9910) at eval.c:244
#7 0x00000000004008bf in main (argc=8, argv=0x7fffb6cb9078) at main.c:38
(gdb) bt full
#0 0x00000037eeabb187 in sched_yield () from /lib64/libc.so.6
No symbol table info available.
#1 0x00002b96ebe39ba3 in gvl_yield (vm=0x55f8f20, th=<value optimized out>) at thread_pthread.c:123
No locals.
#2 0x00002b96ebe39f39 in rb_thread_schedule_limits () at thread.c:1025
No locals.
#3 rb_thread_schedule () at thread.c:1035
No locals.
#4 0x00002b96ebe3a136 in rb_thread_terminate_all () at thread.c:375
_th = 0x55f9520
_tag = {buf = {{__jmpbuf = {0, 7509665241996969646, 0, 140736260182128, 0, 90150176, 7509698779018709598, 7509641504071116675}, __mask_was_saved = 0, __saved_mask = {__val = {140736260182128, 0, 0, 7509698779018709902,
7509641504068102843, 140733193388032, 240243474669, 0, 47927202636682, 0, 8, 0, 140736260186112, 10485760, 301905312, 32}}}}, tag = 0, retval = 91278704, prev = 0x7fffb6cb8e50}
th = <value optimized out>
vm = 0x55f8f20
#5 0x00002b96ebd1af8e in ruby_cleanup (ex=6) at eval.c:140
_th = 0x55f9520
_tag = {buf = {{__jmpbuf = {90150176, 7509665241996969646, 0, 140736260182128, 0, 0, 7509698779018709134, 7509641504068103008}, __mask_was_saved = 0, __saved_mask = {__val = {140736260182128, 0, 0, 47927201075200, 240222523141,
5, 0, 10485760, 100700896, 47927201105296, 96114960, 0, 240222546306, 6, 0, 90150176}}}}, tag = 0, retval = 6, prev = 0x0}
state = <value optimized out>
errs = {161115400, 161115400}
th = 0x55f9520
#6 0x00002b96ebd1b0d6 in ruby_run_node (n=0x5ba9910) at eval.c:244
status = <value optimized out>
#7 0x00000000004008bf in main (argc=8, argv=0x7fffb6cb9078) at main.c:38
variable_in_this_stack_frame = 240224684992
(gdb) info threads
6 Thread 0x40b93940 (LWP 15361) 0x00000037efa0aee9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
5 Thread 0x42755940 (LWP 15431) 0x00000037efa0cd01 in sem_wait () from /lib64/libpthread.so.0
4 Thread 0x413b7940 (LWP 15771) 0x00000037efa0aee9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
3 Thread 0x41c0d940 (LWP 15772) 0x00000037efa0aee9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
2 Thread 0x4011d940 (LWP 19424) 0x00000037eeacd722 in select () from /lib64/libc.so.6
* 1 Thread 0x2b96ec0facc0 (LWP 15167) 0x00000037eeabb187 in sched_yield () from /lib64/libc.so.6
(gdb) step
Single stepping until exit from function sched_yield,
which has no line number information.
gvl_yield (vm=0x55f8f20, th=<value optimized out>) at thread_pthread.c:124
124 native_mutex_lock(&vm->gvl.lock);
(gdb)
native_mutex_lock (vm=0x55f8f20, th=<value optimized out>) at thread_pthread.c:181
181 if ((r = pthread_mutex_lock(lock)) != 0) {
(gdb)
gvl_yield (vm=0x55f8f20, th=<value optimized out>) at thread_pthread.c:127
127 native_cond_broadcast(&vm->gvl.switch_wait_cond);
(gdb)
native_cond_broadcast (vm=0x55f8f20, th=<value optimized out>) at thread_pthread.c:295
295 r = pthread_cond_broadcast(&cond->cond);
(gdb)
st296 } while (r == EAGAIN);
(gdb)
297 if (r != 0) {
(gdb)
gvl_yield (vm=0x55f8f20, th=<value optimized out>) at thread_pthread.c:129
129 gvl_acquire_common(vm);
(gdb)
gvl_acquire_common (vm=0x55f8f20, th=<value optimized out>) at thread_pthread.c:52
52 if (vm->gvl.acquired) {
(gdb)
72 vm->gvl.acquired = 1;
(gdb)
gvl_yield (vm=0x55f8f20, th=<value optimized out>) at thread_pthread.c:130
130 native_mutex_unlock(&vm->gvl.lock);
(gdb)
native_mutex_unlock (vm=0x55f8f20, th=<value optimized out>) at thread_pthread.c:191
191 if ((r = pthread_mutex_unlock(lock)) != 0) {
(gdb)
gvl_yield (vm=0x55f8f20, th=<value optimized out>) at thread_pthread.c:131
131 }
(gdb)
rb_thread_schedule_limits () at thread.c:1026
1026 rb_thread_set_current(th);
(gdb)
rb_thread_schedule () at thread.c:1037
1037 if (UNLIKELY(GET_THREAD()->interrupt_flag)) {
(gdb)
1040 }
(gdb)
rb_thread_terminate_all () at thread.c:380
380 POP_TAG();
(gdb)
372 while (!rb_thread_alone()) {
(gdb)
rb_thread_alone () at thread.c:2171
2171 if (GET_THREAD()->vm->living_threads) {
(gdb)
2176 }
(gdb)
rb_thread_terminate_all () at thread.c:373
373 PUSH_TAG();
(gdb)
374 if (EXEC_TAG() == 0) {
(gdb)
375 rb_thread_schedule();
(gdb)
rb_thread_schedule () at thread.c:1034
1034 {
(gdb)
1035 rb_thread_schedule_limits(0);
(gdb)
rb_thread_schedule_limits () at thread.c:1019
1019 if (!rb_thread_alone()) {
(gdb)
rb_thread_alone () at thread.c:2171
2171 if (GET_THREAD()->vm->living_threads) {
(gdb)
2176 }
(gdb)
rb_thread_schedule () at thread.c:1035
1035 rb_thread_schedule_limits(0);
(gdb)
rb_thread_schedule_limits () at thread.c:1020
1020 rb_thread_t *th = GET_THREAD();
(gdb)
1024 RB_GC_SAVE_MACHINE_CONTEXT(th);
(gdb)
rb_gc_save_machine_context (th=0x55f9520) at thread.c:2986
2986 {
(gdb)
2991 setjmp(th->machine_regs);
(gdb)
2992 }
(gdb)
rb_thread_schedule_limits () at thread.c:1025
1025 gvl_yield(th->vm, th);
(gdb)
1024 RB_GC_SAVE_MACHINE_CONTEXT(th);
(gdb)
1025 gvl_yield(th->vm, th);
(gdb)
gvl_yield (vm=0x55f8f20, th=0x55f9520) at thread_pthread.c:101
101 {
(gdb)
102 native_mutex_lock(&vm->gvl.lock);
(gdb)
101 {
(gdb)
102 native_mutex_lock(&vm->gvl.lock);
(gdb)
native_mutex_lock (vm=0x55f8f20, th=0x55f9520) at thread_pthread.c:181
181 if ((r = pthread_mutex_lock(lock)) != 0) {
(gdb)
gvl_yield (vm=0x55f8f20, th=0x55f9520) at thread_pthread.c:101
101 {
(gdb)
102 native_mutex_lock(&vm->gvl.lock);
(gdb)
native_mutex_lock (vm=0x55f8f20, th=0x55f9520) at thread_pthread.c:181
181 if ((r = pthread_mutex_lock(lock)) != 0) {
(gdb)
gvl_yield (vm=0x55f8f20, th=<value optimized out>) at thread_pthread.c:104
104 gvl_release_common(vm);
(gdb)
gvl_release_common (vm=0x55f8f20, th=<value optimized out>) at thread_pthread.c:87
87 if (vm->gvl.waiting > 0)
(gdb)
86 vm->gvl.acquired = 0;
(gdb)
87 if (vm->gvl.waiting > 0)
(gdb)
gvl_yield (vm=0x55f8f20, th=<value optimized out>) at thread_pthread.c:107
107 if (UNLIKELY(vm->gvl.wait_yield)) {
(gdb)
113 if (vm->gvl.waiting > 0) {
(gdb)
122 native_mutex_unlock(&vm->gvl.lock);
(gdb)
native_mutex_unlock (vm=0x55f8f20, th=<value optimized out>) at thread_pthread.c:191
191 if ((r = pthread_mutex_unlock(lock)) != 0) {
(gdb)
gvl_yield (vm=0x55f8f20, th=<value optimized out>) at thread_pthread.c:123
123 sched_yield();
(gdb)
124 native_mutex_lock(&vm->gvl.lock);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment