[#46918] [ruby-trunk - Bug #6820][Open] Time#to_s on NEWS — "no6v (Nobuhiro IMAI)" <nov@...>
8 messages
2012/08/01
[#46922] [ruby-trunk - Bug #6822][Open] Race Condition with Fiber and Process — "MartinBosslet (Martin Bosslet)" <Martin.Bosslet@...>
8 messages
2012/08/02
[#46973] [ruby-trunk - Bug #6829][Open] Failure using Win32ole (happens in 1.8.7 and 1.9 — "mvanduyn (Mitch VanDuyn)" <mitch@...>
6 messages
2012/08/03
[#46974] [ruby-trunk - Bug #6830][Assigned] test failure test_constants(OpenSSL::TestConfig) [/ruby/test/openssl/test_config.rb:27] on Mac + homebrew — "kosaki (Motohiro KOSAKI)" <kosaki.motohiro@...>
17 messages
2012/08/04
[#46978] [ruby-trunk - Bug #6832][Open] Module#instance_method and Module#method_defined? act inconsistently w.r.t #respond_to_missing? — "myronmarston (Myron Marston)" <myron.marston@...>
6 messages
2012/08/04
[#46996] [ruby-trunk - Bug #6836][Assigned] Improve File.expand_path performance in Windows — "luislavena (Luis Lavena)" <luislavena@...>
15 messages
2012/08/04
[#47021] [ruby-trunk - Bug #6836] Improve File.expand_path performance in Windows
— "luislavena (Luis Lavena)" <luislavena@...>
2012/08/06
[#47045] [ruby-trunk - Bug #6836] Improve File.expand_path performance in Windows
— "h.shirosaki (Hiroshi Shirosaki)" <h.shirosaki@...>
2012/08/07
[#47036] [ruby-trunk - Feature #6841][Open] Shorthand for Assigning Return Value of Method to Self — "wardrop (Tom Wardrop)" <tom@...>
18 messages
2012/08/07
[#52968] [ruby-trunk - Feature #6841] Shorthand for Assigning Return Value of Method to Self
— "wardrop (Tom Wardrop)" <tom@...>
2013/02/27
[#47050] [ruby-trunk - Feature #6842][Open] Add Optional Arguments to String#strip — "wardrop (Tom Wardrop)" <tom@...>
10 messages
2012/08/07
[#47091] [ruby-trunk - Feature #6847][Open] Hash#extract — "citizen428 (Michael Kohl)" <citizen428@...>
10 messages
2012/08/09
[#47094] [ruby-trunk - Bug #6849][Open] Psych.load_file throws TypeError for empty file — "BrandonMathis (Brandon Mathis)" <BeMathis@...>
4 messages
2012/08/09
[#47103] [ruby-trunk - Bug #6851][Open] Result of File.stat("c:/...") is different from 1.9.3 — "phasis68 (Heesob Park)" <phasis@...>
8 messages
2012/08/10
[#47108] [ruby-trunk - Feature #6852][Open] [].transpose should behave specially — "boris_stitnicky (Boris Stitnicky)" <boris@...>
13 messages
2012/08/10
[#47138] [ruby-trunk - Bug #6861][Open] ERB::Util.escape_html is not escaping single quotes — "spastorino (Santiago Pastorino)" <santiago@...>
14 messages
2012/08/12
[#47199] [ruby-trunk - Bug #6872][Open] Array does not specify how it determines uniqueness of values — "agrimm (Andrew Grimm)" <andrew.j.grimm@...>
8 messages
2012/08/15
[#47243] [ruby-trunk - Feature #6895][Open] TracePoint API — "ko1 (Koichi Sasada)" <redmine@...>
27 messages
2012/08/20
[#47277] [ruby-trunk - Feature #6895] TracePoint API
— "trans (Thomas Sawyer)" <transfire@...>
2012/08/22
[#47254] [ruby-trunk - Feature #6895] TracePoint API
— "trans (Thomas Sawyer)" <transfire@...>
2012/08/20
[#47257] Re: [ruby-trunk - Feature #6895] TracePoint API
— SASADA Koichi <ko1@...>
2012/08/21
(2012/08/21 6:11), trans (Thomas Sawyer) wrote:
[#47287] [ruby-trunk - Feature #6910][Assigned] Loading syck's broken yaml with psych — "naruse (Yui NARUSE)" <naruse@...>
5 messages
2012/08/23
[#47309] [ruby-trunk - Bug #6929][Open] Documentation for Ripper — "zzak (Zachary Scott)" <zachary@...>
16 messages
2012/08/25
[#47322] Re: [ruby-cvs:43987] luislavena:r36811 (trunk): Improve require/File.expand_path performance on Windows — Urabe Shyouhei <shyouhei@...>
Hello Luis,
4 messages
2012/08/27
[#47345] [ruby-trunk - Feature #6946][Open] FIPS support? — "vo.x (Vit Ondruch)" <v.ondruch@...>
35 messages
2012/08/28
[#51002] [ruby-trunk - Feature #6946] FIPS support?
— "MartinBosslet (Martin Bosslet)" <Martin.Bosslet@...>
2012/12/20
[#51004] Re: [ruby-trunk - Feature #6946] FIPS support?
— SASADA Koichi <ko1@...>
2012/12/20
After that, I got the following error.
[#51006] Re: [ruby-trunk - Feature #6946] FIPS support?
— Martin Bo煬et <martin.bosslet@...>
2012/12/20
2012/12/20 SASADA Koichi <ko1@atdot.net>
[#47350] No tag for 1.8.7p370 on Github? — Charles Oliver Nutter <headius@...>
I was about to update JRuby's 1.8.7 stdlib, but there's no tag for
3 messages
2012/08/28
[#47367] [ruby-trunk - Bug #6950][Open] ruby-mode: comint-previous-input does not work — "cinsk (Seong-Kook Shin)" <cinsky@...>
6 messages
2012/08/30
[#47369] [ruby-trunk - Bug #6950] ruby-mode: comint-previous-input does not work
— "drbrain (Eric Hodel)" <drbrain@...7.net>
2012/08/30
[ruby-core:47096] [ruby-trunk - Bug #5437][Rejected] Using fibers leads to huge memory leak
From:
"drbrain (Eric Hodel)" <drbrain@...7.net>
Date:
2012-08-10 00:23:28 UTC
List:
ruby-core #47096
Issue #5437 has been updated by drbrain (Eric Hodel).
Status changed from Assigned to Rejected
=begin
Your test does not illustrate any leak and is likely not capable of demonstrating a leak in a diagnosable way.
You seem to have some misconceptions about how malloc() and free() work and how ruby's GC works.
Finalizers are not invoked immediately after object collection. They are invoked at some point in the future so more Fiber objects may be collected than indicated by your counter.
Calling GC.start is not guaranteed to collect all objects without visible references. Ruby's GC is conservative and walks the stack looking for possible references to objects, even if the stack value only coincidentally points to an object.
Ruby calls malloc() to allocate memory. If malloc() does not have any free memory available to assign to ruby it will ask for more from the kernel via mmap() (and sometimes sbrk(), but less frequently on modern OSs). When ruby is done with memory it wall call free(). This will tell malloc() the memory is no longer being used and is available for a future call to malloc(). Sometimes free() will result in returning memory to the OS, but not always since that reduces performance. (malloc() may immediately need to ask the OS for more memory.)
You should not always expect to see a reduction of the resident size of a process when Ruby's GC runs, especially on a very small script that runs for a very short period.
To demonstrate a leak you need to demonstrate process growth in a long-running program. Running for a few seconds and checking the size of ((%ps%)) is insufficient.
I made a better test for Fiber leaks:
require 'fiber'
loop do
fibers = 10.times.map do
n = Fiber.new do
f = Fiber.current
Fiber.yield
end
n
end; nil
fibers.each(&:resume); nil
fibers = []
end
This allocates a small number of fibers and runs continuously. If Ruby is leaking fibers we should see a small but steady growth in process size over time. We should also be able to run tools on the process like OS X's leaks(1) to detect the leak.
I ran my test for over 25 minutes. The memory size reached 39.6MB and remained constant for the duration of the test.
leaks(1) reported:
Process: ruby20 [96158]
Path: /Users/drbrain/Work/svn/ruby/trunk/ruby20
Load Address: 0x104616000
Identifier: ruby20
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: make [96143]
Date/Time: 2012-08-09 17:18:55.562 -0700
OS Version: Mac OS X 10.8 (12A269)
Report Version: 7
leaks Report Version: 2.0
Process 96158: 16276 nodes malloced for 8215 KB
Process 96158: 0 leaks for 0 total leaked bytes.
As you can see there is no leak detected. Also, note that only about 20% of the resident memory capacity is part of an active allocation.
Due to these results I am reasonably certain that no leak has occurred.
We will reopen if you can demonstrate a leak in a long-running process.
=end
----------------------------------------
Bug #5437: Using fibers leads to huge memory leak
https://bugs.ruby-lang.org/issues/5437#change-28749
Author: rupert (Robert Pankowecki)
Status: Rejected
Priority: Normal
Assignee: ko1 (Koichi Sasada)
Category: core
Target version:
ruby -v: ruby 1.9.3dev (2011-10-11 revision 33457) [x86_64-linux]
It appears to me that there is something wrong with reallocating (reusing?) memory used by fibers. Here is a little script:
<code>
require 'fiber'
fibers = 10_000.times.map do
Fiber.new do
f = Fiber.current
Fiber.yield
end
end; nil
fibers.each(&:resume); nil
fibers.each(&:resume); nil
fibers = []
GC.start
</code>
Running this code in IRB multiple times leads to consuming more and more memory every time. However every time I execute this code the amount of newly consumed memory is lower. I was able to repeat this bug with ruby 1.9.2.p290 and 1.9.3-head using 32 and 64 bit architecture.
Here are some memory stats:
a) 32bit
Iter | VSZ | RSS
1 186268 63508
2 360196 119580
3 360340 147600
4 360484 178552
5 360616 199968
6 360612 210716
7 360612 221920
8 360612 224544
9 360612 229976
b) 64bit
1 395152 107600
2 739924 176532
3 739924 187972
4 739924 203300
5 739924 217716
6 739924 218344
7 739924 218540
8 739924 234040
9 739924 234256
We can see on our production instance that the more Fibers are in use the more memory is never reclaimed back to OS and the bigger the leak is.
--
http://bugs.ruby-lang.org/