Well, just when I thought I was out of the fastthread business... Okay, in brief: fastthread is a Ruby extension which re-implements the primitives in Ruby''s thread.rb in C. It was merged into 1.8.6, replacing the old thread.rb implementation, but the version that was merged had a couple serious bugs. So -- now I release fastthread 1.0, which is basically the Ruby 1.8.6 version with the fixes applied. You can use it as a hotfix for 1.8.6 until the next 1.8.x version is released, and of course it should still work for speeding up older versions of 1.8 as well. Gems and source are available via the mongrel RubyForge project: http://rubyforge.org/frs/?group_id=1306 Let me know if you guys have any more problems. -mental -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20070320/f123ad0a/attachment.bin
Hi Mental, Using the new 1.0, I ran the memory leak program referred to on: http://pastie.caboo.se/10194 Unfortunately I am still seeing a memory leak. Am I doing something wrong? Not using fastthread: memory climbs to 97.1 MiB and stabilizes once the "waiting for nnn threads" messages start. Using fastthread: the memory never stops climbing maxing out at 243.6 MiB. Appreciate your thoughts. Thanks, Jason -----Original Message----- From: mongrel-users-bounces at rubyforge.org [mailto:mongrel-users-bounces at rubyforge.org] On Behalf Of MenTaLguY Sent: Tuesday, 20 March 2007 3:59 PM To: ruby-talk ML; mongrel-users Subject: [Mongrel] [ANN] fastthread 1.0 Well, just when I thought I was out of the fastthread business... Okay, in brief: fastthread is a Ruby extension which re-implements the primitives in Ruby''s thread.rb in C. It was merged into 1.8.6, replacing the old thread.rb implementation, but the version that was merged had a couple serious bugs. So -- now I release fastthread 1.0, which is basically the Ruby 1.8.6 version with the fixes applied. You can use it as a hotfix for 1.8.6 until the next 1.8.x version is released, and of course it should still work for speeding up older versions of 1.8 as well. Gems and source are available via the mongrel RubyForge project: http://rubyforge.org/frs/?group_id=1306 Let me know if you guys have any more problems. -mental
On Mar 20, 2007, at 00:59 , MenTaLguY wrote:> fastthread is a Ruby extension which re-implements the primitives in > Ruby''s thread.rb in C. It was merged into 1.8.6, replacing the old > thread.rb implementation, but the version that was merged had a couple > serious bugs.Mental, What might these serious bugs be? Thanks, ~Wayne
On 3/20/07, Wayne E. Seguin <wayneeseguin at gmail.com> wrote:> > On Mar 20, 2007, at 00:59 , MenTaLguY wrote: > > fastthread is a Ruby extension which re-implements the primitives in > > Ruby''s thread.rb in C. It was merged into 1.8.6, replacing the old > > thread.rb implementation, but the version that was merged had a couple > > serious bugs. > > Mental, > > What might these serious bugs be? > > Thanks, > > ~Wayne >With a freshly created plain vanilla rails app with no code/controller/model added, when i attempt to start it, i get: ** Starting Mongrel listening at 0.0.0.0:3000 ** Starting Rails with development environment... /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:477:in `const_missing'': uninitialized constant ActiveRecord::ConnectionAdapters::TwelveByteKey::Mutex (NameError) from /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/frontbase_adapter.rb:55 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'' from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require'' from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in'' from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require'' from /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record.rb:81 from /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record.rb:80 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'' ... 11 levels... from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:83:in `run'' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run'' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 from /usr/bin/mongrel_rails:18 This is when, I have ruby 1.8.6 installed and fastthread gem version 1.0 is also installed. Any ideas why is this?
On Tue, 2007-03-20 at 07:55 -0400, Wayne E. Seguin wrote:> Mental, > > What might these serious bugs be?ConditionVariable#wake could fail to wake threads, and also under some wait lists could become corrupt. -mental -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20070320/02f2e5fb/attachment.bin
On Tue, 2007-03-20 at 17:45 +0530, hemant wrote:> With a freshly created plain vanilla rails app with no > code/controller/model added, when i attempt to start it, i get: > > ** Starting Mongrel listening at 0.0.0.0:3000 > ** Starting Rails with development environment... > /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:477:in > `const_missing'': uninitialized constant > ActiveRecord::ConnectionAdapters::TwelveByteKey::Mutex (NameError)> This is when, I have ruby 1.8.6 installed and fastthread gem version > 1.0 is also installed. Any ideas why is this?Are you requiring thread or fastthread? The problem is that ::Mutex is not defined, which suggests that thread/fastthread has not been loaded yet. -mental -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20070320/2bb02386/attachment.bin
On 3/21/07, MenTaLguY <mental at rydia.net> wrote:> On Tue, 2007-03-20 at 17:45 +0530, hemant wrote: > > With a freshly created plain vanilla rails app with no > > code/controller/model added, when i attempt to start it, i get: > > > > ** Starting Mongrel listening at 0.0.0.0:3000 > > ** Starting Rails with development environment... > > /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:477:in > > `const_missing'': uninitialized constant > > ActiveRecord::ConnectionAdapters::TwelveByteKey::Mutex (NameError) > > > This is when, I have ruby 1.8.6 installed and fastthread gem version > > 1.0 is also installed. Any ideas why is this? > > Are you requiring thread or fastthread? The problem is that ::Mutex is > not defined, which suggests that thread/fastthread has not been loaded > yet. >Well, yes Mutex constant is not defined, but i wonder why? As far my code is concerned, i am not doing a explicit require on either thread or fastthread. I guess its mongrel, which would do a require ''thread''. -- gnufied
On Wed, 2007-03-21 at 10:09 +0530, hemant wrote:> Well, yes Mutex constant is not defined, but i wonder why? As far my > code is concerned, i am not doing a explicit require on either thread > or fastthread.Could you please humor me and try? -mental -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20070321/d11e7341/attachment-0001.bin
On 3/21/07, MenTaLguY <mental at rydia.net> wrote:> On Wed, 2007-03-21 at 10:09 +0530, hemant wrote: > > Well, yes Mutex constant is not defined, but i wonder why? As far my > > code is concerned, i am not doing a explicit require on either thread > > or fastthread. > > Could you please humor me and try? >Well mental, I have similar setup at couple of machines, where we upgraded to ruby 1.8.6, but machines on which mongrel is still able to start is using fastthread : fastthread (0.6.3) On the other hand, the machine on which i am having problem is having fastthread 1.0 ( i updated to fastthread 1.0) So i added require ''thread'' at the top of environment.rb file, yet i get the above said error. I also tried adding require ''fastthread'' in place of environment.rb, to no avail. On the other hand, if i start IRB and do : irb(main):001:0> require ''rubygems'' => true irb(main):002:0> require ''fastthread'' => true irb(main):003:0> mut = Mutex.new => #<Mutex:0xb7be3554> irb(main):004:0> it works without problems.
On 3/21/07, hemant <gethemant at gmail.com> wrote:> On 3/21/07, MenTaLguY <mental at rydia.net> wrote: > > On Wed, 2007-03-21 at 10:09 +0530, hemant wrote: > > > Well, yes Mutex constant is not defined, but i wonder why? As far my > > > code is concerned, i am not doing a explicit require on either thread > > > or fastthread. > > > > Could you please humor me and try? > > > > Well mental, > > I have similar setup at couple of machines, where we upgraded to ruby > 1.8.6, but machines on which mongrel is still able to start is using > fastthread : > > fastthread (0.6.3) > > > On the other hand, the machine on which i am having problem is having > fastthread 1.0 ( i updated to fastthread 1.0) > > So i added require ''thread'' at the top of environment.rb file, yet i > get the above said error. I also tried adding require ''fastthread'' in > place of environment.rb, to no avail. > > On the other hand, if i start IRB and do : > > irb(main):001:0> require ''rubygems'' > => true > irb(main):002:0> require ''fastthread'' > => true > irb(main):003:0> mut = Mutex.new > => #<Mutex:0xb7be3554> > irb(main):004:0> > > > it works without problems. >Ok mental, problem is solved now, we just reinstalled all the concerned gems. But sadly still can''t say, why was the above problem.
On Wed, 2007-03-21 at 11:27 +0530, hemant wrote:> Ok mental, problem is solved now, we just reinstalled all the concerned gems. > But sadly still can''t say, why was the above problem.Unless someone else reports the same problem, the most important thing is that it works for you now. :) -mental -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20070321/d2150fa4/attachment.bin