[#18121] [Ruby 1.8.7 - Bug #405] (Open) ssl.rb:31: [BUG] Bus Error — Anonymous <redmine@...>

Issue #405 has been reported by Anonymous.

14 messages 2008/08/04

[#18130] Re: New array methods cycle, choice, shuffle (plus bug in cycle) — Brian Candler <B.Candler@...>

> Seriously though... Array.first is a noun.

10 messages 2008/08/05

[#18319] NEW Command: absolute_path() -- — "C.E. Thornton" <admin@...>

Core,

14 messages 2008/08/16
[#18321] Re: NEW Command: absolute_path() -- — Yukihiro Matsumoto <matz@...> 2008/08/18

Hi,

[#18381] [Bug #496] DRb.start_service(nil) is very slow — Hongli Lai <redmine@...>

Bug #496: DRb.start_service(nil) is very slow

11 messages 2008/08/25

[ruby-core:18361] Ruby popen bug #1, isolated

From: "Michal Suchanek" <hramrach@...>
Date: 2008-08-21 07:50:51 UTC
List: ruby-core #18361
Hello

It looks like the problems with IO.popen I see have multiple causes,
and the fact that repeatedly calling popen fails is not in itself
enough to isolate a particular problem.

However, I was trying to put my code into a shape that would work on
JRuby at least, and found a test that reproducibly fails on ~100
iterations for me.

With this test I get EBADF on ruby 1.8.5 after 107 iterations and on
1.8.7 anfter 104 iterations, always.

Since I got a version of the code that hopefully works for me I guess
I won't look into the other problems any time soon.

Thanks

Michal

ruby 1.8.5 (2006-08-25) [x86_64-linux]

ruby 1.8.7 (2008-06-20 patchlevel 22) [x86_64-linux]


def try_analyze *words
 analyzer = IO.popen( 'cat', IO::RDWR )
 res = []

 t = Thread.new(  (IO::for_fd analyzer.fileno),res){|fd,ary|
   while l = fd.gets do
     STDERR.putc 8
     ary.push l
   end
   fd.close rescue nil # hopefully prevents zombie hordes
 }

 words.each{|w|
   STDERR.putc '.'[0]
   analyzer.puts w
 }

 analyzer.close_write rescue nil
 t.join
end

1.upto(10000){|_|
 try_analyze *%w(a b c d e f g h i)
 STDERR.puts _
}

In This Thread

Prev Next