[#8478] resolv.rb -- doc patch. — Hugh Sasse <hgs@...>
This is an attempt to get the RD format docs for resolv.rb into
[#8484] strptime fails to properly parse certain inputs — <noreply@...>
Bugs item #5263, was opened at 2006-08-01 23:14
Hi,
Hi,
nobu@ruby-lang.org wrote:
Why bother other languages? They are on their own. We should not
[#8497] Ruby Socket to support SCTP? — Philippe Langlois <philippelanglois@...>
Hi,
[#8504] TCPSocket: bind method missing — hadmut@... (Hadmut Danisch)
Hi,
[#8513] patches for the 1.8.5 deadline... — Hugh Sasse <hgs@...>
As far as I can tell the only patches which I've submitted which
On Aug 3, 2006, at 10:20 AM, Hugh Sasse wrote:
On Fri, 4 Aug 2006, Eric Hodel wrote:
[#8522] IRB change for RDoc workaround — Eric Hodel <drbrain@...7.net>
RDoc chokes on the following code:
[#8525] rdoc bug? — Steven Jenkins <steven.jenkins@...>
I think I've found a bug in rdoc's handling of C files. Specifically, it
[#8555] Process.gid= fails on OS X — <noreply@...>
Bugs item #5351, was opened at 2006-08-08 01:56
>>>>> On Tue, 8 Aug 2006 17:56:07 +0900
Hi,
Hi,
>>>>> On Wed, 9 Aug 2006 12:31:07 +0900
Hi,
[#8561] sandbox timers & block scopes — why the lucky stiff <ruby-core@...>
Two puzzles I am trying to solve:
On 8/8/06, why the lucky stiff <ruby-core@whytheluckystiff.net> wrote:
On 8/16/06, Francis Cianfrocca <garbagecat10@gmail.com> wrote:
raise ThisDecayingInquisition, "anyone? anyone at all?"
On Wed, 2006-08-16 at 00:35 +0900, why the lucky stiff wrote:
On Wed, Aug 16, 2006 at 02:46:30AM +0900, MenTaLguY wrote:
On 8/15/06, why the lucky stiff <ruby-core@whytheluckystiff.net> wrote:
On 8/15/06, Charles O Nutter <headius@headius.com> wrote:
On Wed, Aug 16, 2006 at 04:14:33AM +0900, Charles O Nutter wrote:
On 8/15/06, why the lucky stiff <ruby-core@whytheluckystiff.net> wrote:
Hi,
[#8568] Pathname.to_a — Marc Haisenko <haisenko@...>
Hi folks,
[#8585] RDoc: extensions spread across multiple C files — Tilman Sauerbeck <tilman@...>
Hi,
Tilman Sauerbeck [2006-08-11 00:39]:
[#8593] ri problem with the latest ruby_1_8 — "Kent Sibilev" <ksruby@...>
Does anyone know why for some strange reason ri doesn't know about any
On Aug 11, 2006, at 10:55 AM, Kent Sibilev wrote:
[#8608] Another ri problem (ruby_1_8 branch) — "Kent Sibilev" <ksruby@...>
I've noticed that many builtin Ruby classes don't have descriptions:
On Aug 12, 2006, at 11:45 PM, Kent Sibilev wrote:
On 8/15/06, Eric Hodel <drbrain@segment7.net> wrote:
[#8609] Again Range=== bug — Ondrej Bilka <neleai@...>
Problem of discrete membership at Range#=== is that it returns unexpected
[#8616] invalid test in "sudo make install-doc"? — <noreply@...>
Bugs item #5415, was opened at 2006-08-14 12:01
[#8662] NODE_WHEN inside a case else body — "Dominik Bathon" <dbatml@...>
Hi,
[#8690] a ruby-core primer — why the lucky stiff <ruby-core@...>
Hello, all. I've been working on the ruby-core page for the new Ruby site.
On 8/22/06, why the lucky stiff <ruby-core@whytheluckystiff.net> wrote:
On 8/24/06, Dave Howell <groups+2006@howell.seattle.wa.us> wrote:
[#8709] More ri-problems (ruby_1_8 branch again) — Johan Holmberg <holmberg@...>
Hi!
[#8735] Legal operator symbols — "Nikolai Weibull" <now@...>
Why are :>, :>=, :<=, :< fine as symbols, while := isn't?
Hi --
[#8758] sandbox r50, here we go, loading conflicting gems — why the lucky stiff <ruby-core@...>
Checky.
deadlock/segmentation fault when running barriers
Hello,
When I was playing around with synchronization options in various
dynamic languages I came across a problem in the Ruby VM accidentally.
I try to run 2 different barriers for a given number of times. I use 2
barriers cause I want to use the simplest barrier implementation
possible to avoid other sources of deadlocks.
When I run this code the Ruby interpreter reports an error from time to
time (it doesn't always occur). The error differs from Ruby version to
Ruby version and also depends on the processor architecture (x86, ia64).
Ruby may throw a 'deadlock error' and crashes with segmentation fault.
Running gdb doesn't help much. The segmentation fault occurs in
different parts of the eval.c code (of course on different architectures
and with different compilers).
I would appreciate if could comment on this. Do you see any problem in
my test code?
Best regards,
Sascha
---------------------------------------------------------------------------------------
# @author Sascha Hunold
#
# command line arguments
# 1 : number of iterations
# 2 : number of threads
require 'thread'
class BarrierTest
def initialize(reps, threadnum)
@reps = reps
@threadnum = threadnum
@cond1 = ConditionVariable.new
@lock1 = Mutex.new
@count1 = 0
@cond2 = ConditionVariable.new
@lock2 = Mutex.new
@count2 = 0
end
def test()
@reps.times do
barrier1()
barrier2()
end
end
def barrier1()
@lock1.synchronize {
@count1 += 1
if @count1 == @threadnum
@cond1.broadcast
else
@cond1.wait(@lock1)
end
@count1 -= 1
}
end
def barrier2()
@lock2.synchronize {
@count2 += 1
if @count2 == @threadnum
@cond2.broadcast
else
@cond2.wait(@lock2)
end
@count2 -= 1
}
end
end
reps = ARGV[0].to_i
tnum = ARGV[1].to_i
threads = []
barrier_test = BarrierTest.new(reps, tnum)
tnum.times do |i|
threads[i] = Thread.new {
barrier_test.test()
}
end
threads.each { |t| t.join }
-----------------------------------------------------------------------------------------------
test output
system 1 - Linux 2.6.13-15.10-smp (x86)
---------------------------------------
ruby 1.8.2 (2004-12-25) [i586-linux]
$ ruby barrier_test.rb 10000 16
deadlock 0x4029f280: sleep:- - /usr/lib/ruby/1.8/thread.rb:195
deadlock 0x4029f3fc: sleep:- - /usr/lib/ruby/1.8/thread.rb:195
deadlock 0x4029f578: sleep:- - /usr/lib/ruby/1.8/thread.rb:195
deadlock 0x4029f6f4: sleep:- - /usr/lib/ruby/1.8/thread.rb:195
deadlock 0x4029f870: sleep:- - /usr/lib/ruby/1.8/thread.rb:195
deadlock 0x4029f9ec: sleep:- - /usr/lib/ruby/1.8/thread.rb:195
deadlock 0x402b4798: sleep:J(0x4029f9ec) (main) - barrier_test.rb:63
deadlock 0x4029e3a8: sleep:- - /usr/lib/ruby/1.8/thread.rb:195
deadlock 0x4029e524: sleep:- - /usr/lib/ruby/1.8/thread.rb:195
deadlock 0x4029e6a0: sleep:- - /usr/lib/ruby/1.8/thread.rb:195
deadlock 0x4029e81c: sleep:- - /usr/lib/ruby/1.8/thread.rb:195
deadlock 0x4029e998: sleep:- - /usr/lib/ruby/1.8/thread.rb:195
deadlock 0x4029eb14: sleep:- - /usr/lib/ruby/1.8/thread.rb:195
deadlock 0x4029ec90: sleep:- - /usr/lib/ruby/1.8/thread.rb:195
deadlock 0x4029ee0c: sleep:- - /usr/lib/ruby/1.8/thread.rb:195
deadlock 0x4029ef88: sleep:- - /usr/lib/ruby/1.8/thread.rb:195
deadlock 0x4029f104: sleep:- - /usr/lib/ruby/1.8/thread.rb:195
/usr/lib/ruby/1.8/thread.rb:195: Thread(0x4029f104): deadlock (fatal)
from barrier_test.rb:63:in `each'
from barrier_test.rb:63
ruby 1.8.4 (2005-12-24) [i686-linux]
$ ~/tmp/test/ruby-1.8.4/bin/ruby barrier_test.rb 10000 16
deadlock 0x401e413c: sleep:- -
/home/hunold/tmp/test/ruby-1.8.4/lib/ruby/1.8/thread.rb:203
deadlock 0x401e42b8: sleep:- -
/home/hunold/tmp/test/ruby-1.8.4/lib/ruby/1.8/thread.rb:203
deadlock 0x401e4434: sleep:- -
/home/hunold/tmp/test/ruby-1.8.4/lib/ruby/1.8/thread.rb:203
deadlock 0x401e45b0: sleep:- -
/home/hunold/tmp/test/ruby-1.8.4/lib/ruby/1.8/thread.rb:203
deadlock 0x401e472c: sleep:- -
/home/hunold/tmp/test/ruby-1.8.4/lib/ruby/1.8/thread.rb:203
deadlock 0x401e48a8: sleep:- -
/home/hunold/tmp/test/ruby-1.8.4/lib/ruby/1.8/thread.rb:203
deadlock 0x401e4a24: sleep:- -
/home/hunold/tmp/test/ruby-1.8.4/lib/ruby/1.8/thread.rb:203
deadlock 0x401e4ba0: sleep:- -
/home/hunold/tmp/test/ruby-1.8.4/lib/ruby/1.8/thread.rb:203
deadlock 0x401e4d1c: sleep:- -
/home/hunold/tmp/test/ruby-1.8.4/lib/ruby/1.8/thread.rb:203
deadlock 0x401e4e98: sleep:- -
/home/hunold/tmp/test/ruby-1.8.4/lib/ruby/1.8/thread.rb:203
deadlock 0x401e5014: sleep:- -
/home/hunold/tmp/test/ruby-1.8.4/lib/ruby/1.8/thread.rb:203
deadlock 0x401e5190: sleep:- -
/home/hunold/tmp/test/ruby-1.8.4/lib/ruby/1.8/thread.rb:203
deadlock 0x401e530c: sleep:- -
/home/hunold/tmp/test/ruby-1.8.4/lib/ruby/1.8/thread.rb:203
deadlock 0x401e5488: sleep:- -
/home/hunold/tmp/test/ruby-1.8.4/lib/ruby/1.8/thread.rb:203
deadlock 0x401fa748: sleep:J(0x401e5488) (main) - barrier_test.rb:63
deadlock 0x401e3e44: sleep:- -
/home/hunold/tmp/test/ruby-1.8.4/lib/ruby/1.8/thread.rb:203
deadlock 0x401e3fc0: sleep:- -
/home/hunold/tmp/test/ruby-1.8.4/lib/ruby/1.8/thread.rb:203
/home/hunold/tmp/test/ruby-1.8.4/lib/ruby/1.8/thread.rb:203:
Thread(0x401e3fc0): deadlock (fatal)
from barrier_test.rb:63
ruby 1.9.0 (2006-08-13) [i686-linux]
$ ~/tmp/test/ruby-snap/bin/ruby barrier_test.rb 10000 16
deadlock 0x401d1d30: sleep:- -
/home/hunold/tmp/test/ruby-snap/lib/ruby/1.9/thread.rb:206
deadlock 0x401d1e98: sleep:- -
/home/hunold/tmp/test/ruby-snap/lib/ruby/1.9/thread.rb:206
deadlock 0x401d2000: sleep:- -
/home/hunold/tmp/test/ruby-snap/lib/ruby/1.9/thread.rb:206
deadlock 0x401d2168: sleep:- -
/home/hunold/tmp/test/ruby-snap/lib/ruby/1.9/thread.rb:206
deadlock 0x401d22d0: sleep:- -
/home/hunold/tmp/test/ruby-snap/lib/ruby/1.9/thread.rb:206
deadlock 0x401e7748: sleep:J(0x401d22d0) (main) - barrier_test.rb:63
deadlock 0x401d0db8: sleep:- -
/home/hunold/tmp/test/ruby-snap/lib/ruby/1.9/thread.rb:206
deadlock 0x401d0f20: sleep:- -
/home/hunold/tmp/test/ruby-snap/lib/ruby/1.9/thread.rb:206
deadlock 0x401d1088: sleep:- -
/home/hunold/tmp/test/ruby-snap/lib/ruby/1.9/thread.rb:206
deadlock 0x401d11f0: sleep:- -
/home/hunold/tmp/test/ruby-snap/lib/ruby/1.9/thread.rb:206
deadlock 0x401d1358: sleep:- -
/home/hunold/tmp/test/ruby-snap/lib/ruby/1.9/thread.rb:206
deadlock 0x401d14c0: sleep:- -
/home/hunold/tmp/test/ruby-snap/lib/ruby/1.9/thread.rb:206
deadlock 0x401d1628: sleep:- -
/home/hunold/tmp/test/ruby-snap/lib/ruby/1.9/thread.rb:206
deadlock 0x401d1790: sleep:- -
/home/hunold/tmp/test/ruby-snap/lib/ruby/1.9/thread.rb:206
deadlock 0x401d18f8: sleep:- -
/home/hunold/tmp/test/ruby-snap/lib/ruby/1.9/thread.rb:206
deadlock 0x401d1a60: sleep:- -
/home/hunold/tmp/test/ruby-snap/lib/ruby/1.9/thread.rb:206
deadlock 0x401d1bc8: sleep:- -
/home/hunold/tmp/test/ruby-snap/lib/ruby/1.9/thread.rb:206
/home/hunold/tmp/test/ruby-snap/lib/ruby/1.9/thread.rb:204: [BUG]
Segmentation fault
ruby 1.9.0 (2006-08-13) [i686-linux]
-------------------------------------------------------------------------------
system 2 Linux 2.6.17.6 Intel(R) Pentium(R) 4 CPU 3.06GHz GNU/Linux
ruby 1.8.4 (2005-12-24) [i686-linux]
$ ruby barrier_test.rb 1000 16
deadlock 0xb7d642b8: sleep:- - /usr/lib/ruby/1.8/thread.rb:203
deadlock 0xb7d64434: sleep:- - /usr/lib/ruby/1.8/thread.rb:203
deadlock 0xb7d645b0: sleep:- - /usr/lib/ruby/1.8/thread.rb:203
deadlock 0xb7d6472c: sleep:- - /usr/lib/ruby/1.8/thread.rb:203
deadlock 0xb7d648a8: sleep:- - /usr/lib/ruby/1.8/thread.rb:203
deadlock 0xb7d64a24: sleep:- - /usr/lib/ruby/1.8/thread.rb:203
deadlock 0xb7d64ba0: sleep:- - /usr/lib/ruby/1.8/thread.rb:203
deadlock 0xb7d64d1c: sleep:- - /usr/lib/ruby/1.8/thread.rb:203
deadlock 0xb7d64e98: sleep:- - /usr/lib/ruby/1.8/thread.rb:203
deadlock 0xb7d65014: sleep:- - /usr/lib/ruby/1.8/thread.rb:203
deadlock 0xb7d65190: sleep:- - /usr/lib/ruby/1.8/thread.rb:203
deadlock 0xb7d6530c: sleep:- - /usr/lib/ruby/1.8/thread.rb:203
deadlock 0xb7d65488: sleep:- - /usr/lib/ruby/1.8/thread.rb:203
deadlock 0xb7d7a748: sleep:J(0xb7d65488) (main) - barrier_test.rb:63
deadlock 0xb7d63e44: sleep:- - /usr/lib/ruby/1.8/thread.rb:203
deadlock 0xb7d63fc0: sleep:- - /usr/lib/ruby/1.8/thread.rb:203
deadlock 0xb7d6413c: sleep:- - /usr/lib/ruby/1.8/thread.rb:203
/usr/lib/ruby/1.8/thread.rb:35: [BUG] Segmentation fault
ruby 1.8.4 (2005-12-24) [i686-linux]