Forum: Ruby-core [ruby-trunk - Bug #7999][Open] bootstarap test hungs at threading tests

Posted by ko1 (Koichi Sasada) (Guest)
on 2013-03-02 05:04
(Received via mailing list)
Issue #7999 has been reported by ko1 (Koichi Sasada).

----------------------------------------
Bug #7999: bootstarap test hungs at threading tests
https://bugs.ruby-lang.org/issues/7999

Author: ko1 (Koichi Sasada)
Status: Open
Priority: Normal
Assignee: ko1 (Koichi Sasada)
Category: core
Target version: current: 2.1.0
ruby -v: ruby 2.1.0dev


On [ruby-list:49232], Ootani-san reported that Ruby 2.0.0p0 hungs on 
bootstarap test hungs at threading tests.

assert_equal 'true', %{
  t = Thread.new { loop {} }
  begin
    pid = fork {
      exit t.status != "run"
    }
    Process.wait pid
    $?.success?
  rescue NotImplementedError
    true
  end
}

He rewrites to "  t = Thread.new { loop {sleep 1} }" and it work 
successfully.
His environment is CentOS6.3 and VMware.
He doubts this issue caused only on single-core processor because there 
is no problem on multi-core VM setting.

I also observed same issue on VirtualBox with Ubuntu. I haven't check 
yet that it is only on single-core or not.

I want to clarify the reason of this issue.
Please give information about your environment if you have same issue.
Posted by kosaki (Motohiro KOSAKI) (Guest)
on 2013-03-02 06:00
(Received via mailing list)
Issue #7999 has been updated by kosaki (Motohiro KOSAKI).


I could reproduced. try taskset command.

e.g.
taskset -c 0 ./ruby test.rb
----------------------------------------
Bug #7999: bootstarap test hungs at threading tests
https://bugs.ruby-lang.org/issues/7999#change-37245

Author: ko1 (Koichi Sasada)
Status: Open
Priority: Normal
Assignee: ko1 (Koichi Sasada)
Category: core
Target version: current: 2.1.0
ruby -v: ruby 2.1.0dev


On [ruby-list:49232], Ootani-san reported that Ruby 2.0.0p0 hungs on 
bootstarap test hungs at threading tests.

assert_equal 'true', %{
  t = Thread.new { loop {} }
  begin
    pid = fork {
      exit t.status != "run"
    }
    Process.wait pid
    $?.success?
  rescue NotImplementedError
    true
  end
}

He rewrites to "  t = Thread.new { loop {sleep 1} }" and it work 
successfully.
His environment is CentOS6.3 and VMware.
He doubts this issue caused only on single-core processor because there 
is no problem on multi-core VM setting.

I also observed same issue on VirtualBox with Ubuntu. I haven't check 
yet that it is only on single-core or not.

I want to clarify the reason of this issue.
Please give information about your environment if you have same issue.
Posted by Jeff Moore (djief)
on 2013-03-02 06:25
I have seen the same as I have built Ruby 2 on a variety of machines.

This includes 12.04.2 LTS (GNU/Linux 3.2.0-38-generic-pae i686) running 
on bare metal or inside a VirtualBox on a x86_64 host.

The x86_64 host running Linux Mint 14 Cinnamon 64-bit, 3.5.0-25-generic 
was not effected.

The only similarity between the systems that I noted is that they are 
all 32bit arch.

Hope this helps...
Posted by kosaki (Motohiro KOSAKI) (Guest)
on 2013-03-02 07:44
(Received via mailing list)
Issue #7999 has been updated by kosaki (Motohiro KOSAKI).

Status changed from Open to Assigned
Assignee changed from ko1 (Koichi Sasada) to kosaki (Motohiro KOSAKI)

main thread never exit from rb_threadptr_execute_interrupts() because 
timer thread wake-up lead to increase t->running_time_us and exhaust 
thread time slice.
----------------------------------------
Bug #7999: bootstarap test hungs at threading tests
https://bugs.ruby-lang.org/issues/7999#change-37246

Author: ko1 (Koichi Sasada)
Status: Assigned
Priority: Normal
Assignee: kosaki (Motohiro KOSAKI)
Category: core
Target version: current: 2.1.0
ruby -v: ruby 2.1.0dev


On [ruby-list:49232], Ootani-san reported that Ruby 2.0.0p0 hungs on 
bootstarap test hungs at threading tests.

assert_equal 'true', %{
  t = Thread.new { loop {} }
  begin
    pid = fork {
      exit t.status != "run"
    }
    Process.wait pid
    $?.success?
  rescue NotImplementedError
    true
  end
}

He rewrites to "  t = Thread.new { loop {sleep 1} }" and it work 
successfully.
His environment is CentOS6.3 and VMware.
He doubts this issue caused only on single-core processor because there 
is no problem on multi-core VM setting.

I also observed same issue on VirtualBox with Ubuntu. I haven't check 
yet that it is only on single-core or not.

I want to clarify the reason of this issue.
Please give information about your environment if you have same issue.
Posted by kosaki (Motohiro KOSAKI) (Guest)
on 2013-03-02 08:01
(Received via mailing list)
Issue #7999 has been updated by kosaki (Motohiro KOSAKI).


This issue was introduced at r35163 (see [Bug#6098]).


----------------------------------------
Bug #7999: bootstarap test hungs at threading tests
https://bugs.ruby-lang.org/issues/7999#change-37247

Author: ko1 (Koichi Sasada)
Status: Assigned
Priority: Normal
Assignee: kosaki (Motohiro KOSAKI)
Category: core
Target version: current: 2.1.0
ruby -v: ruby 2.1.0dev


On [ruby-list:49232], Ootani-san reported that Ruby 2.0.0p0 hungs on 
bootstarap test hungs at threading tests.

assert_equal 'true', %{
  t = Thread.new { loop {} }
  begin
    pid = fork {
      exit t.status != "run"
    }
    Process.wait pid
    $?.success?
  rescue NotImplementedError
    true
  end
}

He rewrites to "  t = Thread.new { loop {sleep 1} }" and it work 
successfully.
His environment is CentOS6.3 and VMware.
He doubts this issue caused only on single-core processor because there 
is no problem on multi-core VM setting.

I also observed same issue on VirtualBox with Ubuntu. I haven't check 
yet that it is only on single-core or not.

I want to clarify the reason of this issue.
Please give information about your environment if you have same issue.
Posted by kosaki (Motohiro KOSAKI) (Guest)
on 2013-03-10 07:07
(Received via mailing list)
Issue #7999 has been updated by kosaki (Motohiro KOSAKI).


Oops, please backport r39694 too.

----------------------------------------
Backport #7999: bootstarap test hungs at threading tests
https://bugs.ruby-lang.org/issues/7999#change-37447

Author: ko1 (Koichi Sasada)
Status: Assigned
Priority: Normal
Assignee: nagachika (Tomoyuki Chikanaga)
Category:
Target version:


On [ruby-list:49232], Ootani-san reported that Ruby 2.0.0p0 hungs on 
bootstarap test hungs at threading tests.

assert_equal 'true', %{
  t = Thread.new { loop {} }
  begin
    pid = fork {
      exit t.status != "run"
    }
    Process.wait pid
    $?.success?
  rescue NotImplementedError
    true
  end
}

He rewrites to "  t = Thread.new { loop {sleep 1} }" and it work 
successfully.
His environment is CentOS6.3 and VMware.
He doubts this issue caused only on single-core processor because there 
is no problem on multi-core VM setting.

I also observed same issue on VirtualBox with Ubuntu. I haven't check 
yet that it is only on single-core or not.

I want to clarify the reason of this issue.
Please give information about your environment if you have same issue.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.