Project

General

Profile

Actions

Bug #3537

closed

Thread 作成時のsigaltstackでメモリリーク

Added by nagachika (Tomoyuki Chikanaga) over 13 years ago. Updated almost 13 years ago.

Status:
Closed
Assignee:
-
Target version:
ruby -v:
ruby 1.9.2dev (2010-07-02 revision 28010) [i686-linux]
Backport:

Description

=begin
近永と申します。

Linux上で trunk と 1.9.2(HEAD) で Thread を作成する際の sigaltstack で登録するスタック用領域がリークしています。

$ ./ruby-1.9.2 -v -e "1000000.times{ Thread.start{}.join }"
ruby 1.9.2dev (2010-05-25 revision 28010) [i686-linux]
-e:1: [BUG] rb_register_sigaltstack. malloc error

ruby 1.9.2dev (2010-05-25 revision 28010) [i686-linux]

-- control frame ----------
c:0007 p:---- s:0016 b:0016 l:000015 d:000015 CFUNC :start
c:0006 p:0015 s:0013 b:0013 l:001f5c d:001e74 BLOCK -e:1
c:0005 p:---- s:0011 b:0011 l:000010 d:000010 FINISH
c:0004 p:---- s:0009 b:0009 l:000008 d:000008 CFUNC :times
c:0003 p:0010 s:0006 b:0006 l:001f5c d:0008cc EVAL -e:1
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:001f5c d:001f5c TOP

-- Ruby level backtrace information ----------------------------------------
-e:1:in <main>' -e:1:in times'
-e:1:in block in <main>' -e:1:in join'

-- C level backtrace information -------------------------------------------
./ruby-1.9.2(rb_vm_bugreport+0x34) [0x8171af4]
./ruby-1.9.2 [0x81b6efc]
./ruby-1.9.2(rb_bug+0x2c) [0x81b6f5c]
./ruby-1.9.2 [0x80fdf9b]
./ruby-1.9.2 [0x8177b19]
./ruby-1.9.2 [0x817832d]
/lib/tls/libpthread.so.0 [0xb47dd8]
/lib/tls/libc.so.6(__clone+0x5a) [0x916d1a]

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

以下のパッチで起きなくなりました。thread_free を呼んでる以上 sigaltstack を実行したスレッドは終了済みということで SS_DISABLE とかしていません。取り急ぎ報告まで。
=end


Files

sigaltstack_leak.patch (326 Bytes) sigaltstack_leak.patch nagachika (Tomoyuki Chikanaga), 07/05/2010 09:18 PM
Actions #1

Updated by mame (Yusuke Endoh) over 13 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r28548.
Tomoyuki, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Actions

Also available in: Atom PDF

Like0
Like0