[#90399] [Ruby trunk Feature#14813] [PATCH] gc.c: make gc_enter+gc_exit pairs dtrace probes, too — ko1@...
Issue #14813 has been updated by ko1 (Koichi Sasada).
3 messages
2018/12/10
[#90417] [Ruby trunk Bug#15398] TestThread#test_signal_at_join fails on FreeBSD — naruse@...
Issue #15398 has been reported by naruse (Yui NARUSE).
4 messages
2018/12/11
[#90423] Re: [Ruby trunk Bug#15398] TestThread#test_signal_at_join fails on FreeBSD
— Eric Wong <normalperson@...>
2018/12/11
naruse@airemix.jp wrote:
[#90519] Spoofing warnings for mail from bugs.ruby-lang.org — Charles Oliver Nutter <headius@...>
I'm getting a spoofing warning for emails sent from bugs.ruby-lang.org when
4 messages
2018/12/13
[#90522] Re: Spoofing warnings for mail from bugs.ruby-lang.org
— Eric Wong <normalperson@...>
2018/12/13
Charles Oliver Nutter <headius@headius.com> wrote:
[#90533] [Ruby trunk Feature#15413] unmarkable C stack (3rd stack) — normalperson@...
Issue #15413 has been reported by normalperson (Eric Wong).
3 messages
2018/12/14
[#90581] [Ruby trunk Bug#15424] Ruby 2.6.0rc1 & 2.6.0rc2 mutex exception — mat999@...
Issue #15424 has been reported by splitice (Mathew Heard).
3 messages
2018/12/17
[#90595] [Ruby trunk Bug#15430] test_fork_while_parent_locked is failing status on Ruby CI — hsbt@...
Issue #15430 has been reported by hsbt (Hiroshi SHIBATA).
3 messages
2018/12/18
[#90614] [Ruby trunk Bug#15430][Assigned] test_fork_while_parent_locked is failing status on Ruby CI — hsbt@...
Issue #15430 has been updated by hsbt (Hiroshi SHIBATA).
4 messages
2018/12/19
[#90630] Re: [Ruby trunk Bug#15430][Assigned] test_fork_while_parent_locked is failing status on Ruby CI
— Eric Wong <normalperson@...>
2018/12/20
> It still exists. https://rubyci.org/logs/rubyci.s3.amazonaws.com/centos7/ruby-trunk/log/20181218T230003Z.fail.html.gz
[#90820] Re: [ruby-cvs:73697] k0kubun:r66593 (trunk): accept_nonblock_spec.rb: skip spurious failure — Eric Wong <normalperson@...>
k0kubun@ruby-lang.org wrote:
3 messages
2018/12/30
[ruby-core:90415] [Ruby trunk Bug#15397] Ruby process doesn't release memory back to os on CentOS
From:
myliltos@...
Date:
2018-12-11 03:31:42 UTC
List:
ruby-core #90415
Issue #15397 has been reported by lihr (辉荣 李).
----------------------------------------
Bug #15397: Ruby process doesn't release memory back to os on CentOS
https://bugs.ruby-lang.org/issues/15397
* Author: lihr (辉荣 李)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: 2.5.1, 2.5.3
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
I'm not familiar with low level knowledge, so I'm not sure if this issue belongs to Ruby or CentOS, sorry for this, but it's very easy to produce the problem.
## Reproducer:
ruby -v, I have test this script in both 2.5.1 and 2.5.3, I installed ruby via `rvm`
1. `ruby test_gc.rb` it will create a 50M json file and exit
2. open 4 windows and run`ruby test_gc.rb` in each window with delay 30 seconds to 60 seconds, each one will run about 30 minutes this time
The script is very simple(there're some differences between this and the attachment in log format and file size), the main part is list below:
```ruby
Thread.new do
started = Time.now.to_i
while true
sys_mem = (`ps -o rss= -p #{Process.pid}`.strip.to_i * 1024).to_hmsize
objspace_mem = ObjectSpace.memsize_of_all.to_hmsize
puts "#{(Time.now.to_i - started).to_hmtime}\tsys_mem:#{sys_mem}, objspace_mem:#{objspace_mem}"
sleep 3
GC.start
end
end
# the script will create this file at the first launch
file = File.expand_path("../wiki_pages.json", __FILE__)
puts "read content from file #{File.size(file)}[#{File.size(file).to_hmsize}]"
# read the file, memory will raise about 50M
json = IO.read(file)
sleep 30
puts "parse json string to object"
# memory will raise about 350M
obj = JSON.parse(json)
sleep 30
puts "set string&object to nil, and sleep 30 min to check the memory usage."
# now set the json string and the parsed object to nil, I expect the memory will reduce 300M at least
json = nil
obj = nil
# let the thread to monitor memory, add a simple sleep to keep the thread alive
sleep 1800
```
## Result of reproduce process
I have tested this script under macOS and Cent OS, and some .txt files are attached.
## Expected result and the reason why you expect
However, I have no problem with the macOS version ruby, but the Cent OS version is not good.
As the two huge object (string&hash) are released, and the size of `ObjectSpace.memsize_of_all` shows these two objects are removed from the `objspace`, so the memory should be return back to os, which the CentOS version doesn't make. When the memory pressure raises, CentOS just kill one of the processes.
---Files--------------------------------
test_gc.rb (2.21 KB)
centos-1.txt (4.03 KB)
centos-2.txt (4.08 KB)
centos-3.txt (3.21 KB)
centos-4.txt (1.9 KB)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>