MVM instability
Reported by Tony Arcieri | March 17th, 2008 @ 01:54 PM | in 1.0 preview
I'm encountering some pretty severe instability attempting to use MVM. After creating a new VM, attempting to perform any sort of operations on the VM object crashes Rubinius. I've encountered this on both Linux 2.6 and MacOS X 10.5.
I've encountered multiple different behaviors, and the one that occurs seems to be completely sporadic. Those behaviors are:
1) Complete VM crash. Examples:
Linux:
irb(main):001:0> vm = Rubinius::VM.spawn
=> # @stdout=# @stderr=#>
irb(main):002:0> Rubinius::VM.send_message(2, 'hi')
An error has occured: Segmentation fault (SIGSEGV) (11)
Ruby backtrace:
0xb742c884 #perform_readline+73 in readline.c:0
0xb742c814 Class#readline+40 in /home/tony/rbx/lib/readline.rb:10
0xb742c7a8 IRB::ReadlineInputMethod#gets+12 in /home/tony/rbx/lib/irb/input-method.rb:97
0xb742c73c #+7 in /home/tony/rbx/lib/irb.rb:138
0xb742c6cc IRB::Irb#signal_status+34 in /home/tony/rbx/lib/irb.rb:269
0xb742c674 #+20 in /home/tony/rbx/lib/irb.rb:137
0xb742c608 Proc#call+22 in kernel/core/proc.rb:84
0xb7429ec4 RubyLex#buf_input+13 in /home/tony/rbx/lib/irb/ruby-lex.rb:189
0xb7429e58 RubyLex#getc+14 in /home/tony/rbx/lib/irb/ruby-lex.rb:104
0xb7429dd8 IRB::SLex::Node#match_io+33 in /home/tony/rbx/lib/irb/slex.rb:206
0xb7429d64 IRB::SLex#match+68 in /home/tony/rbx/lib/irb/slex.rb:74
0xb7429cf8 RubyLex#token+24 in /home/tony/rbx/lib/irb/ruby-lex.rb:287
0xb7429c88 RubyLex#lex+10 in /home/tony/rbx/lib/irb/ruby-lex.rb:263
0xb740761c #+16 in /home/tony/rbx/lib/irb/ruby-lex.rb:234
0xb74075c4 #+4 in kernel/core/throw_catch.rb:63
0xb7407554 Class#register+57 in kernel/core/throw_catch.rb:46
0xb74074e0 Kernel#catch+24 in kernel/core/throw_catch.rb:62
0xb7404d44 RubyLex#each_top_level_statement+28 in /home/tony/rbx/lib/irb/ruby-lex.rb:229
0xb7404cd8 IRB::IrbRubinius#process_statements+19 in /home/tony/rbx/lib/irb/rubinius.rb:4
0xb7404c6c IRB::Irb#eval_input+88 in /home/tony/rbx/lib/irb.rb:152
0xb7404c14 #+5 in /home/tony/rbx/lib/irb.rb:76
0xb7404bbc #+4 in kernel/core/throw_catch.rb:63
0xb7404b4c Class#register+57 in kernel/core/throw_catch.rb:46
0xb7404ad8 Kernel#catch+24 in kernel/core/throw_catch.rb:62
0xb78cb6f0 Class#start+209 in /home/tony/rbx/lib/irb.rb:75
0xb78cbd34 #__script__+28 in /home/tony/rbx/lib/bin/irb.rb:13
0xb78cc2a0 CompiledMethod#as_script+80 in kernel/core/compiled_method.rb:210
0xb78cc7d4 Class#single_load+466 in kernel/core/compile.rb:235
0xb78ccdfc #+320 in kernel/core/compile.rb:149
0xb78cd2d0 Array#each+25 in kernel/core/array.rb:573
0xb78cd358 Class#unified_load+189 in kernel/core/compile.rb:120
0xb78cd3b0 Kernel#require+193 in kernel/core/compile.rb:449
0xb78c8730 #__script__+1447 in kernel/loader.rb:225
VM Registers:
IP: 0073
SP: 0236
Exception: none
OS X:
irb(main):001:0> vm = Rubinius::VM.spawn
=> # @stdout=# @stderr=#>
irb(main):002:0> Rubinius::VM.send_message(2, 'hi')
Trace/BPT trap
The same exception occurs if I pass the VM object to Rubinius::VM.send_message, although I don't believe that's the correct usage.
However, even more trivial things seem to crash it (on both Linux and OS X):
irb(main):001:0> vm = Rubinius::VM.spawn
=> # @stdout=# @stderr=#>
irb(main):002:0> vm.object_id
Trace/BPT trap
Rubinius::VM#inspect is the only method I'm aware of that doesn't instantly crash the VM.
2) VM stuck in an infinite loop?
I've experienced this behavior on OS X exclusively, but sometimes, repeating the same examples above, the VM appears to go into an infinite loop, e.g.:
irb(main):001:0> vm = Rubinius::VM.spawn
=> # @stdout=# @stderr=#>
irb(main):002:0> Rubinius::VM.send_message(2, 'hi')
(... hangs forever ...)
3) It works?
For whatever reason, this usage doesn't immediately crash the VM on either OS X or Linux:
irb(main):001:0> p Rubinius::VM.spawn; Rubinius::VM.send_message 2, 'hi'
# @stdout=# @stderr=#>
=> true
irb(main):002:0>
However, it appears attempting to do anything after making this call crashes the VM:
irb(main):001:0> p Rubinius::VM.spawn; Rubinius::VM.send_message 2, 'hi'
# @stdout=# @stderr=#>
=> true
irb(main):002:0> puts 'hi'
An error has occured: Segmentation fault (SIGSEGV) (11)
Ruby backtrace:
0xb73c62d8 #perform_readline+73 in readline.c:0
0xb73c6268 Class#readline+40 in /home/tony/rbx/lib/readline.rb:10
0xb73c61fc IRB::ReadlineInputMethod#gets+12 in /home/tony/rbx/lib/irb/input-method.rb:97
Comments and changes to this ticket
-
Ryan Davis March 17th, 2008 @ 03:08 PM
- → State changed from new to open
- → Assigned user changed from to Eero Saynatkari
-
Ryan Davis March 17th, 2008 @ 03:10 PM
- → Assigned user changed from Eero Saynatkari to Evan Phoenix
oops. prolly should go to evan. sorry rue.
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
