IO::InternalBuffer#fill_from crash when tab completing in "xiki" gem console #2081

Closed
sempervictus opened this Issue Dec 5, 2012 · 4 comments

Projects

None yet

3 participants

@sempervictus

While testing the Xiki gem on RBX current (as of this morning) i ran into the following when trying to tab complete "readme" (the 're' at the begining is followed by a tab and the stack trace). Will look into this a bit myself as i've seen similar errors from EventFDs and such.

Stack trace:

% xiki readme

re An exception occurred running /usr/local/rvm/gems/rbx-head@testing/bin/ruby_noexec_wrapper
execution expired (Timeout::Error)

Backtrace:
{ } in IO::InternalBuffer#fill_from at kernel/common/io.rb:72
Rubinius.synchronize at kernel/bootstrap/rubinius.rb:150
IO::InternalBuffer#fill_from at kernel/common/io.rb:64
IO::EachReader#read_to_separator at kernel/common/io19.rb:471
IO::EachReader#each at kernel/common/io19.rb:455
IO(File)#each at kernel/common/io19.rb:614
IO(File)#gets at kernel/common/io19.rb:734
{ } in XikiCommand.get_response at /usr/local/rvm/gems/rbx-head@testing/gems/xiki-0.6.5/etc/command/xiki_command.rb:128
IO.open at kernel/common/io.rb:216
Kernel(Class)#open at kernel/common/kernel19.rb:166
{ } in XikiCommand.get_response at /usr/local/rvm/gems/rbx-head@testing/gems/xiki-0.6.5/etc/command/xiki_command.rb:123
Timeout.timeout at /usr/local/rvm/rubies/rbx-head/lib/19/timeout.rb:149
Object(Class)#timeout at /usr/local/rvm/rubies/rbx-head/lib/19/timeout.rb:168
XikiCommand.get_response at /usr/local/rvm/gems/rbx-head@testing/gems/xiki-0.6.5/etc/command/xiki_command.rb:120
XikiCommand.run at /usr/local/rvm/gems/rbx-head@testing/gems/xiki-0.6.5/etc/command/xiki_command.rb:102
Object#script at /usr/local/rvm/gems/rbx-head@testing/gems/xiki-0.6.5/bin/xiki:30
Kernel(Object)#load at kernel/common/kernel.rb:597
{ } in Object#script at /usr/local/rvm/gems/rbx-head@testing/bin/xiki:19
Rubinius::BlockEnvironment#call_on_instance at kernel/common/block_environment.rb:75
Kernel(Object)#eval at kernel/common/eval.rb:75
Object#script at /usr/local/rvm/gems/rbx-head@testing/bin/ruby_noexec_wrapper:14
Rubinius::CodeLoader#load_script at kernel/delta/codeloader.rb:68
Rubinius::CodeLoader.load_script at kernel/delta/codeloader.rb:118
Rubinius::Loader#script at kernel/loader.rb:615
Rubinius::Loader#main at kernel/loader.rb:816

@stouset

Can you try and reproduce this against the latest master branch?

@sempervictus

Confirmed fixed on 6a23ed5 in 1.9 mode.

/usr/local/rvm/rubies/rbx-head/bin/rbx -S rspec ./spec/code_tree_spec.rb ./spec/diff_log_spec.rb ./spec/file_tree_spec.rb ./spec/keys_spec.rb ./spec/line_spec.rb ./spec/menu_spec.rb ./spec/ol_spec.rb ./spec/remote_spec.rb ./spec/search_spec.rb ./spec/text_util_spec.rb ./spec/tree_cursor_spec.rb ./spec/tree_spec.rb
................................................................................................................................

Finished in 0.11458 seconds
128 examples, 0 failures

EDIT: apparently not resolved on "xiki start"

xiki start
expected xiki_process.rb to respond after we started it, but it is not responding
An exception occurred running /usr/local/rvm/gems/rbx-head@testing/bin/ruby_noexec_wrapper
    Timeout::Error (Timeout::Error)

Backtrace:
                     XikiCommand.get_response at etc/command/xiki_command.rb:118
                              XikiCommand.run at etc/command/xiki_command.rb:103
                            Object#__script__ at bin/xiki:30
                          Kernel(Object)#load at kernel/common/kernel.rb:587
                     { } in Object#__script__ at /usr/local/rvm/gems/rbx-head@testing/bin/xiki:19
  Rubinius::BlockEnvironment#call_on_instance at kernel/common/block_environment.rb:75
                          Kernel(Object)#eval at kernel/common/eval.rb:75
                            Object#__script__ at /usr/local/rvm/gems/rbx-head@testing/bin/ruby_noexec_wrapper:14
             Rubinius::CodeLoader#load_script at kernel/delta/codeloader.rb:68
             Rubinius::CodeLoader.load_script at kernel/delta/codeloader.rb:118
                      Rubinius::Loader#script at kernel/loader.rb:615
                        Rubinius::Loader#main at kernel/loader.rb:816

Works in MRI.

@sempervictus sempervictus reopened this Mar 31, 2013
@stouset

Are you sure that that's the same root issue?

@YorickPeterse
Rubinius member

When running xiki start it raises a timeout error. It looks like it checks the output of ps -ef using a custom process name. Since setting the proctitle is currently not supported this will fail (though the command itself will start). See #2807 for the issue about $0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment