ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:60699] [ruby-trunk - Bug #9518] [Open] Objects in large arrays are leaked
       [not found] <redmine.issue-9518.20140214042949@ruby-lang.org>
@ 2014-02-14  4:29 ` charliesome
  2014-02-14  4:31 ` [ruby-core:60700] [ruby-trunk - Bug #9518] " charliesome
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: charliesome @ 2014-02-14  4:29 UTC (permalink / raw
  To: ruby-core

Issue #9518 has been reported by Charlie Somerville.

----------------------------------------
Bug #9518: Objects in large arrays are leaked
https://bugs.ruby-lang.org/issues/9518

* Author: Charlie Somerville
* Status: Open
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* ruby -v: ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin13.0]
* Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
a = [nil] * 131071
loop { a << Object.new; a.pop }
# process RSS stays stable

a = [nil] * 131072
loop { a << Object.new; a.pop }
# process RSS grows quickly and never falls

It seems to be related to this bit of code: https://github.com/github/ruby/blob/2.1/gc.c#L4764-4766



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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [ruby-core:60700] [ruby-trunk - Bug #9518] Objects in large arrays are leaked
       [not found] <redmine.issue-9518.20140214042949@ruby-lang.org>
  2014-02-14  4:29 ` [ruby-core:60699] [ruby-trunk - Bug #9518] [Open] Objects in large arrays are leaked charliesome
@ 2014-02-14  4:31 ` charliesome
  2014-02-25  8:49 ` [ruby-core:61065] " ko1
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: charliesome @ 2014-02-14  4:31 UTC (permalink / raw
  To: ruby-core

Issue #9518 has been updated by Charlie Somerville.


Oops, the markdown rendering messed up the code I pasted above.

    a = [nil] * 131071
    loop { a << Object.new; a.pop }
    # process RSS stays stable

    a = [nil] * 131072
    loop { a << Object.new; a.pop }
    # process RSS grows quickly and never falls

----------------------------------------
Bug #9518: Objects in large arrays are leaked
https://bugs.ruby-lang.org/issues/9518#change-45121

* Author: Charlie Somerville
* Status: Open
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* ruby -v: ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin13.0]
* Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
a = [nil] * 131071
loop { a << Object.new; a.pop }
# process RSS stays stable

a = [nil] * 131072
loop { a << Object.new; a.pop }
# process RSS grows quickly and never falls

It seems to be related to this bit of code: https://github.com/github/ruby/blob/2.1/gc.c#L4764-4766



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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [ruby-core:61065] [ruby-trunk - Bug #9518] Objects in large arrays are leaked
       [not found] <redmine.issue-9518.20140214042949@ruby-lang.org>
  2014-02-14  4:29 ` [ruby-core:60699] [ruby-trunk - Bug #9518] [Open] Objects in large arrays are leaked charliesome
  2014-02-14  4:31 ` [ruby-core:60700] [ruby-trunk - Bug #9518] " charliesome
@ 2014-02-25  8:49 ` ko1
  2014-02-25 10:06   ` [ruby-core:61068] " Eric Wong
  2014-02-25 10:11 ` [ruby-core:61069] " normalperson
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 13+ messages in thread
From: ko1 @ 2014-02-25  8:49 UTC (permalink / raw
  To: ruby-core

Issue #9518 has been updated by Koichi Sasada.


Yes, you are right. WB (write barrier) strategy doesn't care such case.

How many such program?
If it is popular case, we can care about it.



----------------------------------------
Bug #9518: Objects in large arrays are leaked
https://bugs.ruby-lang.org/issues/9518#change-45462

* Author: Charlie Somerville
* Status: Open
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* ruby -v: ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin13.0]
* Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
a = [nil] * 131071
loop { a << Object.new; a.pop }
# process RSS stays stable

a = [nil] * 131072
loop { a << Object.new; a.pop }
# process RSS grows quickly and never falls

It seems to be related to this bit of code: https://github.com/github/ruby/blob/2.1/gc.c#L4764-4766



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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [ruby-core:61068] Re: [ruby-trunk - Bug #9518] Objects in large arrays are leaked
  2014-02-25  8:49 ` [ruby-core:61065] " ko1
@ 2014-02-25 10:06   ` Eric Wong
  0 siblings, 0 replies; 13+ messages in thread
From: Eric Wong @ 2014-02-25 10:06 UTC (permalink / raw
  To: Ruby developers

The yahns HTTP server uses a long-lived fdmap array to map
Fixnum(fileno) -> IO connections.
This array exists prevent GC from sweeping IOs (because IOs are watched
by Linux epoll and not markable w/o an Array to store them).

64K+ connections (array size) is attainable with yahns.  The long-lived
fdmap array lifetime should not infect the short lived client
connections.

If I were to allow >=64K client connections on my public yahns instance,
clients will cause memory leaks/waste.

(yahns supports infinitely-lived connections, but in
 practice, clients connections tend to be short-lived).

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [ruby-core:61069] [ruby-trunk - Bug #9518] Objects in large arrays are leaked
       [not found] <redmine.issue-9518.20140214042949@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2014-02-25  8:49 ` [ruby-core:61065] " ko1
@ 2014-02-25 10:11 ` normalperson
  2014-03-29  6:39   ` [ruby-core:61749] " Eric Wong
  2014-03-29  6:48 ` [ruby-core:61750] " normalperson
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 13+ messages in thread
From: normalperson @ 2014-02-25 10:11 UTC (permalink / raw
  To: ruby-core

Issue #9518 has been updated by Eric Wong.


 The yahns HTTP server uses a long-lived fdmap array to map
 Fixnum(fileno) -> IO connections.
 This array exists prevent GC from sweeping IOs (because IOs are watched
 by Linux epoll and not markable w/o an Array to store them).
 
 64K+ connections (array size) is attainable with yahns.  The long-lived
 fdmap array lifetime should not infect the short lived client
 connections.
 
 If I were to allow >=64K client connections on my public yahns instance,
 clients will cause memory leaks/waste.
 
 (yahns supports infinitely-lived connections, but in
  practice, clients connections tend to be short-lived).

----------------------------------------
Bug #9518: Objects in large arrays are leaked
https://bugs.ruby-lang.org/issues/9518#change-45465

* Author: Charlie Somerville
* Status: Open
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* ruby -v: ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin13.0]
* Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
a = [nil] * 131071
loop { a << Object.new; a.pop }
# process RSS stays stable

a = [nil] * 131072
loop { a << Object.new; a.pop }
# process RSS grows quickly and never falls

It seems to be related to this bit of code: https://github.com/github/ruby/blob/2.1/gc.c#L4764-4766



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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [ruby-core:61749] Re: [ruby-trunk - Bug #9518] Objects in large arrays are leaked
  2014-02-25 10:11 ` [ruby-core:61069] " normalperson
@ 2014-03-29  6:39   ` Eric Wong
  0 siblings, 0 replies; 13+ messages in thread
From: Eric Wong @ 2014-03-29  6:39 UTC (permalink / raw
  To: ruby-core

ko1: may I commit the removal of special case for large array/hash?

* gc.c (rb_gc_writebarrier): remove special case for large hash/array

http://bogomips.org/ruby.git/patch?id=40849ff1bc881
git://80x24.org/ruby.git gc-nomagic

I strongly believe there should no magic based on size.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [ruby-core:61750] [ruby-trunk - Bug #9518] Objects in large arrays are leaked
       [not found] <redmine.issue-9518.20140214042949@ruby-lang.org>
                   ` (3 preceding siblings ...)
  2014-02-25 10:11 ` [ruby-core:61069] " normalperson
@ 2014-03-29  6:48 ` normalperson
  2014-03-29  7:59   ` [ruby-core:61751] " SASADA Koichi
  2014-03-29  8:10 ` [ruby-core:61752] " ko1
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 13+ messages in thread
From: normalperson @ 2014-03-29  6:48 UTC (permalink / raw
  To: ruby-core

Issue #9518 has been updated by Eric Wong.


 ko1: may I commit the removal of special case for large array/hash?
 
 * gc.c (rb_gc_writebarrier): remove special case for large hash/array
 
 http://bogomips.org/ruby.git/patch?id=40849ff1bc881
 git://80x24.org/ruby.git gc-nomagic
 
 I strongly believe there should no magic based on size.

----------------------------------------
Bug #9518: Objects in large arrays are leaked
https://bugs.ruby-lang.org/issues/9518#change-45989

* Author: Charlie Somerville
* Status: Open
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* ruby -v: ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin13.0]
* Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
a = [nil] * 131071
loop { a << Object.new; a.pop }
# process RSS stays stable

a = [nil] * 131072
loop { a << Object.new; a.pop }
# process RSS grows quickly and never falls

It seems to be related to this bit of code: https://github.com/github/ruby/blob/2.1/gc.c#L4764-4766



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [ruby-core:61751] Re: [ruby-trunk - Bug #9518] Objects in large arrays are leaked
  2014-03-29  6:48 ` [ruby-core:61750] " normalperson
@ 2014-03-29  7:59   ` SASADA Koichi
  0 siblings, 0 replies; 13+ messages in thread
From: SASADA Koichi @ 2014-03-29  7:59 UTC (permalink / raw
  To: ruby-core

(2014/03/29 15:48), normalperson@yhbt.net wrote:
>  I strongly believe there should no magic based on size.

I need to ask tarui-san, who introduce this mechanism.

Tarui-san, could you give me a comment?

-- 
// SASADA Koichi at atdot dot net

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [ruby-core:61752] [ruby-trunk - Bug #9518] Objects in large arrays are leaked
       [not found] <redmine.issue-9518.20140214042949@ruby-lang.org>
                   ` (4 preceding siblings ...)
  2014-03-29  6:48 ` [ruby-core:61750] " normalperson
@ 2014-03-29  8:10 ` ko1
  2014-04-18  9:57 ` [ruby-core:62086] " tarui
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: ko1 @ 2014-03-29  8:10 UTC (permalink / raw
  To: ruby-core

Issue #9518 has been updated by Koichi Sasada.


 (2014/03/29 15:48), normalperson@yhbt.net wrote:
 >  I strongly believe there should no magic based on size.
 
 I need to ask tarui-san, who introduce this mechanism.
 
 Tarui-san, could you give me a comment?
 
 -- 
 // SASADA Koichi at atdot dot net

----------------------------------------
Bug #9518: Objects in large arrays are leaked
https://bugs.ruby-lang.org/issues/9518#change-45990

* Author: Charlie Somerville
* Status: Open
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* ruby -v: ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin13.0]
* Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
a = [nil] * 131071
loop { a << Object.new; a.pop }
# process RSS stays stable

a = [nil] * 131072
loop { a << Object.new; a.pop }
# process RSS grows quickly and never falls

It seems to be related to this bit of code: https://github.com/github/ruby/blob/2.1/gc.c#L4764-4766



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [ruby-core:62086] [ruby-trunk - Bug #9518] Objects in large arrays are leaked
       [not found] <redmine.issue-9518.20140214042949@ruby-lang.org>
                   ` (5 preceding siblings ...)
  2014-03-29  8:10 ` [ruby-core:61752] " ko1
@ 2014-04-18  9:57 ` tarui
  2014-04-19 21:27   ` [ruby-core:62098] " Eric Wong
  2014-04-19 21:28 ` [ruby-core:62099] " normalperson
  2014-05-04 16:28 ` [ruby-core:62358] " nagachika00
  8 siblings, 1 reply; 13+ messages in thread
From: tarui @ 2014-04-18  9:57 UTC (permalink / raw
  To: ruby-core

Issue #9518 has been updated by Masaya Tarui.


Sorry for such a late response.

I agree.

At the first time, I was introduled for reducing minor GC's long time
by rescan of huge size array.
But in real case, if there are huge size array, there may be other huge data too.
No matter how it do, it have to take time.

----------------------------------------
Bug #9518: Objects in large arrays are leaked
https://bugs.ruby-lang.org/issues/9518#change-46250

* Author: Charlie Somerville
* Status: Open
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* ruby -v: ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin13.0]
* Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
a = [nil] * 131071
loop { a << Object.new; a.pop }
# process RSS stays stable

a = [nil] * 131072
loop { a << Object.new; a.pop }
# process RSS grows quickly and never falls

It seems to be related to this bit of code: https://github.com/github/ruby/blob/2.1/gc.c#L4764-4766



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [ruby-core:62098] Re: [ruby-trunk - Bug #9518] Objects in large arrays are leaked
  2014-04-18  9:57 ` [ruby-core:62086] " tarui
@ 2014-04-19 21:27   ` Eric Wong
  0 siblings, 0 replies; 13+ messages in thread
From: Eric Wong @ 2014-04-19 21:27 UTC (permalink / raw
  To: Ruby developers

Thanks all! r45638

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [ruby-core:62099] [ruby-trunk - Bug #9518] Objects in large arrays are leaked
       [not found] <redmine.issue-9518.20140214042949@ruby-lang.org>
                   ` (6 preceding siblings ...)
  2014-04-18  9:57 ` [ruby-core:62086] " tarui
@ 2014-04-19 21:28 ` normalperson
  2014-05-04 16:28 ` [ruby-core:62358] " nagachika00
  8 siblings, 0 replies; 13+ messages in thread
From: normalperson @ 2014-04-19 21:28 UTC (permalink / raw
  To: ruby-core

Issue #9518 has been updated by Eric Wong.


 Thanks all! r45638

----------------------------------------
Bug #9518: Objects in large arrays are leaked
https://bugs.ruby-lang.org/issues/9518#change-46259

* Author: Charlie Somerville
* Status: Closed
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* ruby -v: ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin13.0]
* Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
a = [nil] * 131071
loop { a << Object.new; a.pop }
# process RSS stays stable

a = [nil] * 131072
loop { a << Object.new; a.pop }
# process RSS grows quickly and never falls

It seems to be related to this bit of code: https://github.com/github/ruby/blob/2.1/gc.c#L4764-4766



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [ruby-core:62358] [ruby-trunk - Bug #9518] Objects in large arrays are leaked
       [not found] <redmine.issue-9518.20140214042949@ruby-lang.org>
                   ` (7 preceding siblings ...)
  2014-04-19 21:28 ` [ruby-core:62099] " normalperson
@ 2014-05-04 16:28 ` nagachika00
  8 siblings, 0 replies; 13+ messages in thread
From: nagachika00 @ 2014-05-04 16:28 UTC (permalink / raw
  To: ruby-core

Issue #9518 has been updated by Tomoyuki Chikanaga.

Backport changed from 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN to 1.9.3: DONTNEED, 2.0.0: DONTNEED, 2.1: DONE

r45638 was backported into ruby_2_1 at r45818.
according to #9796

----------------------------------------
Bug #9518: Objects in large arrays are leaked
https://bugs.ruby-lang.org/issues/9518#change-46517

* Author: Charlie Somerville
* Status: Closed
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* ruby -v: ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin13.0]
* Backport: 1.9.3: DONTNEED, 2.0.0: DONTNEED, 2.1: DONE
----------------------------------------
a = [nil] * 131071
loop { a << Object.new; a.pop }
# process RSS stays stable

a = [nil] * 131072
loop { a << Object.new; a.pop }
# process RSS grows quickly and never falls

It seems to be related to this bit of code: https://github.com/github/ruby/blob/2.1/gc.c#L4764-4766



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2014-05-04 16:20 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <redmine.issue-9518.20140214042949@ruby-lang.org>
2014-02-14  4:29 ` [ruby-core:60699] [ruby-trunk - Bug #9518] [Open] Objects in large arrays are leaked charliesome
2014-02-14  4:31 ` [ruby-core:60700] [ruby-trunk - Bug #9518] " charliesome
2014-02-25  8:49 ` [ruby-core:61065] " ko1
2014-02-25 10:06   ` [ruby-core:61068] " Eric Wong
2014-02-25 10:11 ` [ruby-core:61069] " normalperson
2014-03-29  6:39   ` [ruby-core:61749] " Eric Wong
2014-03-29  6:48 ` [ruby-core:61750] " normalperson
2014-03-29  7:59   ` [ruby-core:61751] " SASADA Koichi
2014-03-29  8:10 ` [ruby-core:61752] " ko1
2014-04-18  9:57 ` [ruby-core:62086] " tarui
2014-04-19 21:27   ` [ruby-core:62098] " Eric Wong
2014-04-19 21:28 ` [ruby-core:62099] " normalperson
2014-05-04 16:28 ` [ruby-core:62358] " nagachika00

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).