ileitch / hijack

Provides an irb session to a running ruby process.
Other
750 stars 22 forks source link

able to hijack 1.9? #8

Open rdp opened 14 years ago

rdp commented 14 years ago

this hijack attempt fails, either because the process is always stuck in GC, or because it's 1.9.1?


rdp       1880 32308 93 16:41 pts/0    01:46:04 ruby multiple_runs_same_setting_grapher.rb yanc_30mb_3_url_use_bittorrent_atfalse
rdp       7126 23734  0 13:26 pts/6    00:00:07 ruby /home/rdp/go/src/mongrel_dir_handler_current_dir.rb
rdp       9177  9053  0 18:35 pts/5    00:00:00 grep ruby
[27:1835][rdp@ilab1:~]$ hijack 1880
=> Hijacking...
=> 1880 doesn't appear to be a Ruby process!            
ileitch commented 14 years ago

it may well be 1.9.1 as I haven't tried 1.9 yet. Could you attach the output of the 'bt' command when you attach to the process directly with gdb? Thanks

pcboy commented 12 years ago

Is there anything new related to this issue after two years?

I'm still trying to use hijack on 1.9.3 and it doesn't work. Same issue. "XXXX doesn't appear to be a Ruby process!"

ileitch commented 12 years ago

Please try 0.2.1.

e0da commented 12 years ago

No luck with hijack 0.2.1 against ruby 1.9.3

ileitch commented 12 years ago

What kind of process are you trying to hijack?

jfirebaugh commented 12 years ago

I'm trying to hijack a sidekiq process on 1.9.3. I got the "XXXX doesn't appear to be a Ruby process" error message, but it was because the process to which I was trying to attach was running as a different user. When I ran sudo hijack, I got "WARNING: Did not detect a safe frame on which to set a breakpoint, hijack may fail." Then it just hangs.

Here's the output from --debug: https://gist.github.com/3361940

ileitch commented 12 years ago

Debug symbols for your Ruby are missing. There's not much hijack can do in this case...

jfirebaugh commented 12 years ago

I installed ubuntu's libruby1.9.1-dbg package. Now it looks like GDB is straight up crashing: https://gist.github.com/3361996

So, I think I'm going to back out of this rabbit hole.