Issue #13846 has been updated by jeremyevans0 (Jeremy Evans).

Status changed from Open to Closed

I did some testing of this recently.  With ruby 2.6, the memory use is constant.  With ruby 2.5, there is slight memory growth.  However, considering the extensive thread changes between ruby 2.5 and ruby 2.6, it is unlikely the particular fix could be isolated and backported.  I'm going to close this now.  If you are experiencing similar memory leaks with threads with master or 2.6, please update this ticket.

----------------------------------------
Bug #13846: Openbsd possible memory leak when using Thread
https://bugs.ruby-lang.org/issues/13846#change-78216

* Author: parhs (Coding Gorilla)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.3.4
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
On openBSD 5.9/6.1 running this code causes RSS memory to increase without limit. This does not happen in ubuntu or other linux.

~~~ ruby
loop do
  thr = Thread.new { puts "thread test" }
  thr.join
  GC.start
end

~~~
This is related to other things too, like when calling Open3.* , virtually everything that is using threads...
I have attached a screenshot with RSS memory plot I did.

---Files--------------------------------
Screen Shot 2017-08-29 at 11.11.42 AM.png (51.7 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>