[#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:18363] Re: Ruby popen bug #1, isolated

From: "Michal Suchanek" <hramrach@...>
Date: 2008-08-21 08:44:33 UTC
List: ruby-core #18363
On 21/08/2008, Michal Suchanek <hramrach@centrum.cz> wrote:

>
>  With this test I get EBADF on ruby 1.8.5 after 107 iterations and on
>  1.8.7 anfter 104 iterations, always.
>
>
>  ruby 1.8.5 (2006-08-25) [x86_64-linux]
>
>  ruby 1.8.7 (2008-06-20 patchlevel 22) [x86_64-linux]
>

FWIW it also fails on OS X after 109 iterations, although with a
completely different error message.

ruby 1.8.6 (2008-08-11 patchlevel 287) [i686-darwin]

Here the EBADF is reported by cat and ruby reports thread deadlock.

Thanks

Michal

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