Project

General

Profile

Actions

Bug #18134

closed

Memory leak with master

Added by MSP-Greg (Greg L) over 2 years ago. Updated over 2 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.1.0dev (2021-08-26T10:47:48Z master ef10e8a1eb) [x64-mingw32]
[ruby-core:105073]

Description

While working on code to test Puma’s performance, I noticed a memory leak using WSL2 Ubuntu 20.04 and Ruby master. The leak seemed proportional to the number of requests made, and independent of the response size, either headers or body. Locally, I was running up to 2 million requests. The code used @ioquatix’s version of wrk and smem for measuring memory use. I ran GC.start and GC.compact before checking memory. The Puma configuration was using fork.

I’ve got a lot of Ruby versions on Windows, but haven’t created the same setup for Ubuntu. So, I took the above code and ran it on GitHub Actions Ubuntu 20.04. Ruby 2.5.9, 2.7.4, and 3.0.2 did not have the memory leak, but master had the same leak I saw locally.

Puma and one of its dependencies (nio4r) are both extension gems. Has there been an ABI change that might affect the code?

I can try to bisect it if that would be helpful.

Thanks, Greg

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0