WEBrick crashing


#1

ruby 1.8.2 (2004-12-25) [i386-mswin32]
latest version of edge rails - patched to make the server work with
win32 (http://dev.rubyonrails.org/ticket/4139)

On some pages WEBrick is crashing with the following:

d:/programming/ruby/lib/ruby/1.8/profiler.rb:27: You have a nil object
when you
didn’t expect it! (NoMethodError)
You might have expected an instance of Array.
The error occured while evaluating nil.[] from
d:/programming/ruby/lib/rub
y/1.8/profiler.rb:5:in require' from script/server:7:inrequire’
from script/server:7

Any ideas on what’s happening, or tips on tracking this down would be
great.

Here’s the full output (not especially pretty formatted I’m afraid due
to wrap):

[2006-03-10 11:51:37] INFO WEBrick 1.3.1
[2006-03-10 11:51:37] INFO ruby 1.8.2 (2004-12-25) [i386-mswin32]
[2006-03-10 11:51:37] INFO WEBrick::HTTPServer#start: pid=3860
port=3000
% cumulative self self total
time seconds seconds calls ms/call ms/call name
138.04 3.80 3.80 1 3796.00 3796.00
Profiler__.start_profile
36.80 4.81 1.01 873 1.16 2.00 Array#include?
27.35 5.56 0.75 3966 0.19 0.19 Module#==
21.64 6.16 0.60 1 595.00 2000.00
ObjectSpace.each_object
5.71 6.31 0.16 865 0.18 0.18
Module#included_modules
5.13 6.45 0.14 1 141.00 2688.00
Module#included_in_classes

1.13 6.48 0.03 99 0.31 0.31 Kernel.send
0.58 6.50 0.02 5 3.20 3.20 Array#+
0.58 6.52 0.02 8 2.00 2.00 Array#collect
0.55 6.53 0.02 10 1.50 10.90 Array#each
0.55 6.55 0.01 2 7.50 7.50 IO#select
0.00 6.55 0.00 12 0.00 0.00 Kernel.hash
0.00 6.55 0.00 1 0.00 0.00 Class#superclass
0.00 6.55 0.00 2 0.00 0.00 String#downcase
0.00 6.55 0.00 2 0.00 0.00 Array#[]
0.00 6.55 0.00 2 0.00 0.00 Module#parent
0.00 6.55 0.00 1 0.00 0.00
DispatchServlet#service
0.00 6.55 0.00 1 0.00 0.00 Thread#kill
0.00 6.55 0.00 1 0.00 0.00 Thread#initialize
0.00 6.55 0.00 4 0.00 8.00 Enumerable.inject
0.00 6.55 0.00 1 0.00 0.00
DispatchServlet#dispatch
0.00 6.55 0.00 1 0.00 0.00 Class#new
0.00 6.55 0.00 1 0.00 0.00
Dependencies.clear
0.00 6.55 0.00 1 0.00 0.00
Enumerable.member?
0.00 6.55 0.00 1 0.00 0.00 Array#size
0.00 6.55 0.00 1 0.00 0.00
DRb::DRbTCPSocket#close
0.00 6.55 0.00 1 0.00 3796.00 Object#load
0.00 6.55 0.00 2 0.00 0.00 Array#empty?
0.00 6.55 0.00 1 0.00 2750.00
DRb::DRbServer#stop_servic
e
0.00 6.55 0.00 1 0.00 0.00 Kernel.nil?
0.00 6.55 0.00 1 0.00 0.00
CGI::Session::ActiveRecord
Store::Session#subclasses
0.00 6.55 0.00 1 0.00 0.00
Dependencies.rails_officia
l_require_or_load
0.00 6.55 0.00 1 0.00 0.00
DRb::DRbServer#main_loop
0.00 6.55 0.00 4 0.00 0.00 Hash#default
0.00 6.55 0.00 1 0.00 0.00
WEBrick::HTTPServer#run
0.00 6.55 0.00 2 0.00 0.00 Array#last
0.00 6.55 0.00 2 0.00 0.00
WEBrick::HTTPRequest#[]
0.00 6.55 0.00 1 0.00 0.00
WEBrick::HTTPServer#servic
e
0.00 6.55 0.00 2 0.00 0.00 Module#const_get
0.00 6.55 0.00 2 0.00 0.00
Dependencies.loaded
0.00 6.55 0.00 1 0.00 0.00
DRb::DRbServer#kill_sub_th
read
0.00 6.55 0.00 1 0.00 0.00 Object#initialize
0.00 6.55 0.00 2 0.00 0.00
Exception#backtrace
0.00 6.55 0.00 96 0.00 0.00
Module#method_undefined
0.00 6.55 0.00 8 0.00 0.00 Module#===
0.00 6.55 0.00 2 0.00 0.00
Kernel.respond_to?
0.00 6.55 0.00 2 0.00 0.00
Module#const_defined?
0.00 6.55 0.00 2 0.00 0.00 Kernel.require
0.00 6.55 0.00 1 0.00 2750.00 #toplevel
0.00 6.55 0.00 1 0.00 0.00 ThreadGroup#add
0.00 6.55 0.00 38 0.00 0.00 Module#to_s
0.00 6.55 0.00 1 0.00 0.00
DispatchServlet#handle_dis
patch
0.00 6.55 0.00 1 0.00 0.00 IO#close
0.00 6.55 0.00 1 0.00 0.00
DRb::DRbTCPSocket#accept
0.00 6.55 0.00 1 0.00 0.00
Class#const_missing
0.00 6.55 0.00 1 0.00 0.00 Hash#clear
0.00 6.55 0.00 1 0.00 0.00 Array#flatten
0.00 6.55 0.00 1 0.00 15.00
Class#remove_class
0.00 6.55 0.00 1 0.00 0.00
WEBrick::GenericServer#sta
rt
0.00 6.55 0.00 1 0.00 0.00
WEBrick::HTTPRequest#read_
body
0.00 6.55 0.00 2 0.00 0.00 Thread#current
0.00 6.55 0.00 1 0.00 47.00
ActiveRecord::Base#reset_s
ubclasses
0.00 6.55 0.00 1 0.00 0.00
ActionController::Routing:
:ControllerComponent#traverse_to_controller
0.00 6.55 0.00 1 0.00 16.00
ActiveRecord::Base#subclas
ses
0.00 6.55 0.00 1 0.00 2688.00
Reloadable.reloadable_clas
ses
0.00 6.55 0.00 1 0.00 0.00
WEBrick::HTTPRequest#fixup

0.00 6.55 0.00 18 0.00 0.00 Array#<<
0.00 6.55 0.00 1 0.00 0.00
Kernel.instance_variables
0.00 6.55 0.00 1 0.00 0.00
Dependencies.mechanism
0.00 6.55 0.00 1 0.00 0.00
Dependencies.load?
0.00 6.55 0.00 12 0.00 0.00 Hash#[]
0.00 6.55 0.00 2 0.00 0.00 Hash#[]=
0.00 6.55 0.00 1 0.00 0.00
Module#const_missing
0.00 6.55 0.00 30 0.00 0.00 String#==
0.00 6.55 0.00 2 0.00 0.00 Array#*
0.00 6.55 0.00 1 0.00 0.00
Errno::ENOTCONN#===
0.00 6.55 0.00 1 0.00 0.00
Dispatcher#dispatch
0.00 6.55 0.00 1 0.00 2750.00
Breakpoint.deactivate_drb
0.00 6.55 0.00 1 0.00 0.00 Thread#new
0.00 6.55 0.00 1 0.00 0.00
Dependencies.depend_on
0.00 6.55 0.00 2 0.00 0.00
CGI::Session::ActiveRecord
Store::Session#reloadable?
0.00 6.55 0.00 1 0.00 0.00
ActionController::Routing:
:RouteSet#recognize!
0.00 6.55 0.00 1 0.00 0.00 Object#require
0.00 6.55 0.00 1 0.00 0.00 Array#select
0.00 6.55 0.00 3 0.00 0.00 String#empty?
0.00 6.55 0.00 3 0.00 0.00 Kernel.==
0.00 6.55 0.00 96 0.00 0.00
Module#undef_method
0.00 6.55 0.00 1 0.00 0.00
WEBrick::HTTPRequest#body
0.00 6.55 0.00 1 0.00 0.00
ActionController::Base#all
ow_concurrency
0.00 6.55 0.00 1 0.00 0.00 ThreadGroup#list
0.00 6.55 0.00 1 0.00 2703.00
Dispatcher#reset_applicati
on!
0.00 6.55 0.00 1 0.00 0.00 Set#clear
0.00 6.55 0.00 1 0.00 0.00
Dispatcher#reset_after_dis
patch
0.00 6.55 0.00 1 0.00 0.00
Kernel.remove_instance_var
iable
0.00 6.55 0.00 1 0.00 0.00 Array#reverse
0.00 6.55 0.00 4 0.00 0.00 String#split
0.00 6.55 0.00 1 0.00 0.00
WEBrick::SimpleServer#star
t
0.00 6.55 0.00 1 0.00 0.00
#<ActionController::Routin
g::RouteSet:0x2c86d30>.recognize_path
0.00 6.55 0.00 2 0.00 0.00
Module#remove_const
0.00 6.55 0.00 1 0.00 16.00 User#subclasses
0.00 6.55 0.00 1 0.00 0.00
Dependencies.require_or_lo
ad
0.00 6.55 0.00 1 0.00 0.00
Module#instance_methods
0.00 6.55 0.00 2 0.00 0.00 Module#name
0.00 6.55 0.00 1 0.00 0.00
Errno::ECONNRESET#===
d:/programming/ruby/lib/ruby/1.8/profiler.rb:27: You have a nil object
when you
didn’t expect it! (NoMethodError)
You might have expected an instance of Array.
The error occured while evaluating nil.[] from
d:/programming/ruby/lib/rub
y/1.8/profiler.rb:5:in require' from script/server:7:inrequire’
from script/server:7