[#27380] [Bug #2553] Fix pthreads slowness by eliminating unnecessary sigprocmask calls — Dan Peterson <redmine@...>

Bug #2553: Fix pthreads slowness by eliminating unnecessary sigprocmask calls

21 messages 2010/01/03

[#27437] [Feature #2561] 1.8.7 Patch reduces time cost of Rational operations by 50%. — Kurt Stephens <redmine@...>

Feature #2561: 1.8.7 Patch reduces time cost of Rational operations by 50%.

9 messages 2010/01/06

[#27447] [Bug #2564] [patch] re-initialize timer_thread_{lock,cond} after fork — Aliaksey Kandratsenka <redmine@...>

Bug #2564: [patch] re-initialize timer_thread_{lock,cond} after fork

18 messages 2010/01/06

[#27545] [Feature #2594] 1.8.7 Patch: Reduce time spent in gc.c is_pointer_to_heap(). — Kurt Stephens <redmine@...>

Feature #2594: 1.8.7 Patch: Reduce time spent in gc.c is_pointer_to_heap().

8 messages 2010/01/11

[#27635] [Bug #2619] Proposed method: Process.fork_supported? — Hongli Lai <redmine@...>

Bug #2619: Proposed method: Process.fork_supported?

45 messages 2010/01/20
[#27643] [Feature #2619] Proposed method: Process.fork_supported? — Luis Lavena <redmine@...> 2010/01/21

Issue #2619 has been updated by Luis Lavena.

[#27678] Re: [Feature #2619] Proposed method: Process.fork_supported? — Yukihiro Matsumoto <matz@...> 2010/01/22

Hi,

[#27684] Re: [Feature #2619] Proposed method: Process.fork_supported? — Charles Oliver Nutter <headius@...> 2010/01/22

On Thu, Jan 21, 2010 at 11:27 PM, Yukihiro Matsumoto <matz@ruby-lang.org> wrote:

[#27708] Re: [Feature #2619] Proposed method: Process.fork_supported? — Yukihiro Matsumoto <matz@...> 2010/01/22

Hi,

[#27646] Re: [Bug #2619] Proposed method: Process.fork_supported? — Tanaka Akira <akr@...> 2010/01/21

2010/1/21 Hongli Lai <redmine@ruby-lang.org>:

[#27652] Re: [Bug #2619] Proposed method: Process.fork_supported? — Hongli Lai <hongli@...99.net> 2010/01/21

On 1/21/10 5:20 AM, Tanaka Akira wrote:

[#27653] Re: [Bug #2619] Proposed method: Process.fork_supported? — Tanaka Akira <akr@...> 2010/01/21

2010/1/21 Hongli Lai <hongli@plan99.net>:

[#27662] Re: [Bug #2619] Proposed method: Process.fork_supported? — Vladimir Sizikov <vsizikov@...> 2010/01/21

On Thu, Jan 21, 2010 at 10:53 AM, Tanaka Akira <akr@fsij.org> wrote:

[#27698] [Bug #2629] ConditionVariable#wait(mutex, timeout) should return whether the condition was signalled, not the waited time — Hongli Lai <redmine@...>

Bug #2629: ConditionVariable#wait(mutex, timeout) should return whether the condition was signalled, not the waited time

8 messages 2010/01/22

[#27722] [Feature #2635] Unbundle rdoc — Yui NARUSE <redmine@...>

Feature #2635: Unbundle rdoc

14 messages 2010/01/23

[#27757] [Bug #2638] ruby-1.9.1-p37[68] build on aix5.3 with gcc-4.2 failed to run for me because it ignores where libgcc is located. — Joel Soete <redmine@...>

Bug #2638: ruby-1.9.1-p37[68] build on aix5.3 with gcc-4.2 failed to run for me because it ignores where libgcc is located.

10 messages 2010/01/24

[#27778] [Bug #2641] Seg fault running miniruby during ruby build on Haiku — Alexander von Gluck <redmine@...>

Bug #2641: Seg fault running miniruby during ruby build on Haiku

10 messages 2010/01/25

[#27791] [Bug #2644] memory over-allocation with regexp — Greg Hazel <redmine@...>

Bug #2644: memory over-allocation with regexp

12 messages 2010/01/25

[#27794] [Bug #2647] Lack of testing for String#split — Hugh Sasse <redmine@...>

Bug #2647: Lack of testing for String#split

14 messages 2010/01/25

[#27912] [Bug #2669] mkmf find_executable doesn't find .bat files — Roger Pack <redmine@...>

Bug #2669: mkmf find_executable doesn't find .bat files

11 messages 2010/01/27

[#27930] [Bug:trunk] some behavior changes of lib/csv.rb between 1.8 and 1.9 — Yusuke ENDOH <mame@...>

Hi jeg2, or anyone who knows the implementation of FasterCSV,

15 messages 2010/01/28
[#27931] Re: [Bug:trunk] some behavior changes of lib/csv.rb between 1.8 and 1.9 — James Edward Gray II <james@...> 2010/01/28

On Jan 28, 2010, at 10:51 AM, Yusuke ENDOH wrote:

[ruby-core:27860] [Bug #2663] Hard hang (needs -9 to kill) in 1.8.7 build 248

From: Wayne Conrad <redmine@...>
Date: 2010-01-26 22:12:47 UTC
List: ruby-core #27860
Bug #2663: Hard hang (needs -9 to kill) in 1.8.7 build 248
http://redmine.ruby-lang.org/issues/show/2663

Author: Wayne Conrad
Status: Open, Priority: Normal
ruby -v: ruby 1.8.7 (2009-12-24 patchlevel 248) [i486-linux]

I've got a little piece of code that can hang Ruby 1.8.7 patchlevel
248 about one out of every 500 times it is run, on several (but not
every) boxes.  Here is foo.rb:

    #!/usr/bin/ruby1.8

    # The puts is not necessary to reproduce the problem.  It just makes
    # it easy to tell when the problem happens.
    puts ARGV.first
    Thread.new do
      sleep 1
    end
    system("#")

To reproduce the problem, execute foo.rb in a shell loop:

    for i in `seq 10000` ; do ./foo.rb $i ; done

The hang is hard: A TERM (15) signal won't stop it.  A KILL (9) signal
will.

If it's going to hang, it will do it in 10,000 iterations.  On the
boxes I've tested, the hang is usually within the first 500 iterations.

I've got five linux boxes that will show this behavior, and one that
won't:

- There are three fairly fast Intel 4-core boxes that can reproduce
the problem.  One is running Debian testing ("squeeze") and two
running Debian unstable ("sid").

- There is a moderate speed AMD two-core box that reproduces the
problem, but takes longer.  It runs Debian testing.

- There is an old, slow single-core Intel box that does not show the
problem.  It runs Debian testing.

Although I found the problem using the Debian ruby/libruby packages, I
confirmed that the problem happens when using a Ruby built without any
of Debian's patches.

Using the git tree at git://git.phusion.nl/ruby.git (branch
v1_8_7_248) I used git bisect and found that the following commit
introduced this problem:

commit d83cd902207920368dfe2de34a4be37fc774e6c8
Author: shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Date:   Tue Jul 14 11:31:37 2009 +0000

    merge revision(s) 23202,23268,23305:
        * eval.c (safe_mutex_lock): pthread_cleanup_push() must not be
          inside parens.
        * eval.c (rb_thread_start_timer): guard condition was inverted.
          [ruby-dev:38319]
        * eval.c (get_ts): use readtime clock.  [ruby-dev:38354]
        * eval.c (rb_thread_stop_timer): clear thread_init while
locking.

This is a small commit that doesn't change very many lines, so I was
able to eliminate all but a single changed line as the cause of this
problem:

--- a/eval.c
+++ b/eval.c
@@ -12316,7 +12316,7 @@ rb_thread_start_timer()
     void *args[2];
     static pthread_cond_t start = PTHREAD_COND_INITIALIZER;

-    if (!thread_init) return;
+    if (thread_init) return;
     args[0] = &time_thread;
     args[1] = &start;
     safe_mutex_lock(&time_thread.lock);

I think this is CVS rev 23268, ruby-dev:38319, bug #1402.

I confirmed that this line has something to do with the problem
by reverse-applying it to build 248 and seeing that the problem
no longer occurs.  But rev 23268 seems correct to my untrained
eye, so perhaps the real problem is somewhere else.

Best Regards,
     Wayne Conrad


----------------------------------------
http://redmine.ruby-lang.org

In This Thread

Prev Next