Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
[hongli@Asuna rvm-site (master)]$ ps auxw | grep ruby
hongli 26161 0.4 0.4 2484792 33372 s000 S+ 5:26PM 0:01.59 /Users/hongli/.rvm/gems/ruby-2.0.0-p195/bin/nanoc
hongli 26304 0.0 0.0 2432768 600 s001 R+ 5:26PM 0:00.00 grep ruby
[hongli@Asuna rvm-site (master)]$ gdb
GNU gdb 6.3.50-20050815 (Apple version gdb-1824) (Wed Feb 6 22:51:23 UTC 2013)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".
(gdb) attach 26161
Attaching to process 26161.
Reading symbols for shared libraries . done
Reading symbols for shared libraries .................................................. done
Reading symbols for shared libraries + done
0x00007fff883cd322 in select$DARWIN_EXTSN ()
(gdb) c
Continuing.
Reading symbols for shared libraries . done
Reading symbols for shared libraries .. done
Reading symbols for shared libraries ........................ done
Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to process 26161 thread 0xb17]
0x00007fff86b5b2d5 in __CFInitialize ()
(gdb) thread apply all bt
Thread 4 (process 26161):
#0 0x00007fff883cd0fa in __psynch_cvwait ()
#1 0x00007fff8ae1dfe9 in _pthread_cond_wait ()
#2 0x000000010ab6fdc7 in native_sleep ()
#3 0x000000010ab7099c in sleep_timeval ()
#4 0x000000010aac4da4 in rb_f_sleep ()
#5 0x000000010ab69948 in vm_call_cfunc ()
#6 0x000000010ab69355 in vm_call_method ()
#7 0x000000010ab5482e in vm_exec_core ()
#8 0x000000010ab60628 in vm_exec ()
#9 0x000000010ab645c8 in invoke_block_from_c ()
#10 0x000000010ab5fc41 in vm_invoke_proc ()
#11 0x000000010ab5fb90 in rb_vm_invoke_proc ()
#12 0x000000010ab774a0 in thread_start_func_2 ()
#13 0x000000010ab77285 in thread_start_func_1 ()
#14 0x00007fff8ae197a2 in _pthread_start ()
#15 0x00007fff8ae061e1 in thread_start ()
Thread 3 (process 26161):
#0 0x00007fff86b5b2d5 in __CFInitialize ()
#1 0x00007fff6a629256 in __dyld__ZN16ImageLoaderMachO11doImageInitERKN11ImageLoader11LinkContextE ()
#2 0x00007fff6a629757 in __dyld__ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE ()
#3 0x00007fff6a62606e in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE ()
#4 0x00007fff6a625fc4 in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE ()
#5 0x00007fff6a625fc4 in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE ()
#6 0x00007fff6a625eba in __dyld__ZN11ImageLoader15runInitializersERKNS_11LinkContextERNS_21InitializerTimingListE ()
#7 0x00007fff6a61ae38 in __dyld__ZN4dyld15runInitializersEP11ImageLoader ()
#8 0x00007fff6a62087c in __dyld_dlopen ()
#9 0x00007fff8b021dd8 in dlopen ()
#10 0x000000010b531639 in library_initialize ()
#11 0x000000010ab69948 in vm_call_cfunc ()
#12 0x000000010ab5482e in vm_exec_core ()
#13 0x000000010ab60628 in vm_exec ()
#14 0x000000010ab645c8 in invoke_block_from_c ()
#15 0x000000010ab5db68 in rb_yield ()
#16 0x000000010aa272e9 in rb_ary_each ()
#17 0x000000010ab69948 in vm_call_cfunc ()
#18 0x000000010ab69355 in vm_call_method ()
#19 0x000000010ab546db in vm_exec_core ()
#20 0x000000010ab60628 in vm_exec ()
#21 0x000000010ab645c8 in invoke_block_from_c ()
#22 0x000000010ab5db68 in rb_yield ()
#23 0x000000010aa2c309 in rb_ary_collect ()
#24 0x000000010ab69948 in vm_call_cfunc ()
#25 0x000000010ab69355 in vm_call_method ()
#26 0x000000010ab546db in vm_exec_core ()
#27 0x000000010ab60628 in vm_exec ()
#28 0x000000010ab6057e in rb_iseq_eval ()
#29 0x000000010aa5944e in rb_load_internal ()
#30 0x000000010aa599e8 in rb_require_safe ()
#31 0x000000010ab69948 in vm_call_cfunc ()
#32 0x000000010ab69355 in vm_call_method ()
#33 0x000000010ab5482e in vm_exec_core ()
#34 0x000000010ab60628 in vm_exec ()
#35 0x000000010ab6057e in rb_iseq_eval ()
#36 0x000000010aa5944e in rb_load_internal ()
#37 0x000000010aa599e8 in rb_require_safe ()
#38 0x000000010ab69948 in vm_call_cfunc ()
#39 0x000000010ab69355 in vm_call_method ()
#40 0x000000010ab5482e in vm_exec_core ()
#41 0x000000010ab60628 in vm_exec ()
#42 0x000000010ab6057e in rb_iseq_eval ()
#43 0x000000010aa5944e in rb_load_internal ()
#44 0x000000010aa599e8 in rb_require_safe ()
#45 0x000000010ab69948 in vm_call_cfunc ()
#46 0x000000010ab69355 in vm_call_method ()
#47 0x000000010ab5482e in vm_exec_core ()
#48 0x000000010ab60628 in vm_exec ()
#49 0x000000010ab6057e in rb_iseq_eval ()
#50 0x000000010aa5944e in rb_load_internal ()
#51 0x000000010aa599e8 in rb_require_safe ()
#52 0x000000010ab69948 in vm_call_cfunc ()
#53 0x000000010ab69355 in vm_call_method ()
#54 0x000000010ab5482e in vm_exec_core ()
#55 0x000000010ab60628 in vm_exec ()
#56 0x000000010ab65bcb in eval_string_with_cref ()
#57 0x000000010ab5e5fa in rb_f_eval ()
#58 0x000000010ab69948 in vm_call_cfunc ()
#59 0x000000010ab5482e in vm_exec_core ()
#60 0x000000010ab60628 in vm_exec ()
#61 0x000000010ab645c8 in invoke_block_from_c ()
#62 0x000000010ab5db68 in rb_yield ()
#63 0x000000010aa272e9 in rb_ary_each ()
#64 0x000000010ab69948 in vm_call_cfunc ()
#65 0x000000010ab69355 in vm_call_method ()
#66 0x000000010ab546db in vm_exec_core ()
#67 0x000000010ab60628 in vm_exec ()
#68 0x000000010ab645c8 in invoke_block_from_c ()
#69 0x000000010ab5db68 in rb_yield ()
#70 0x000000010aa56bdd in rb_ensure ()
#71 0x000000010ab69948 in vm_call_cfunc ()
#72 0x000000010ab69355 in vm_call_method ()
#73 0x000000010ab546db in vm_exec_core ()
#74 0x000000010ab60628 in vm_exec ()
#75 0x000000010ab645c8 in invoke_block_from_c ()
#76 0x000000010ab5fc41 in vm_invoke_proc ()
#77 0x000000010ab5fb90 in rb_vm_invoke_proc ()
#78 0x000000010ab774a0 in thread_start_func_2 ()
#79 0x000000010ab77285 in thread_start_func_1 ()
#80 0x00007fff8ae197a2 in _pthread_start ()
#81 0x00007fff8ae061e1 in thread_start ()
Thread 2 (process 26161):
#0 0x00007fff883cdf96 in poll ()
#1 0x000000010ab76fe2 in thread_timer ()
#2 0x00007fff8ae197a2 in _pthread_start ()
#3 0x00007fff8ae061e1 in thread_start ()
Thread 1 (process 26161):
#0 0x00007fff883cd322 in select$DARWIN_EXTSN ()
#1 0x000000010ab72cba in rb_thread_fd_select ()
#2 0x000000010aa84b45 in select_call ()
#3 0x000000010aa56bdd in rb_ensure ()
#4 0x000000010aa79f73 in rb_f_select ()
#5 0x000000010ab69948 in vm_call_cfunc ()
#6 0x000000010ab5482e in vm_exec_core ()
#7 0x000000010ab60628 in vm_exec ()
#8 0x000000010ab645c8 in invoke_block_from_c ()
#9 0x000000010ab5fc41 in vm_invoke_proc ()
#10 0x000000010ab5fb90 in rb_vm_invoke_proc ()
#11 0x000000010aa5c612 in proc_call ()
#12 0x000000010ab69948 in vm_call_cfunc ()
#13 0x000000010ab69355 in vm_call_method ()
#14 0x000000010ab5482e in vm_exec_core ()
#15 0x000000010ab60628 in vm_exec ()
#16 0x000000010ab6057e in rb_iseq_eval ()
#17 0x000000010aa5944e in rb_load_internal ()
#18 0x000000010aa5a141 in rb_f_load ()
#19 0x000000010ab69948 in vm_call_cfunc ()
#20 0x000000010ab69355 in vm_call_method ()
#21 0x000000010ab5482e in vm_exec_core ()
#22 0x000000010ab60628 in vm_exec ()
#23 0x000000010ab65bcb in eval_string_with_cref ()
#24 0x000000010ab5e5fa in rb_f_eval ()
#25 0x000000010ab69948 in vm_call_cfunc ()
#26 0x000000010ab69355 in vm_call_method ()
#27 0x000000010ab5482e in vm_exec_core ()
#28 0x000000010ab60628 in vm_exec ()
#29 0x000000010ab61455 in rb_iseq_eval_main ()
#30 0x000000010aa55e1f in ruby_exec_internal ()
#31 0x000000010aa55d6e in ruby_run_node ()
#32 0x000000010aa16eef in main ()
(gdb) quit
The program is running. Quit anyway (and detach it)? (y or n) y
Detaching from process 26161.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment