Skip to content

Memory leak off heap on Windows when using File::Stat #3446

@jsvd

Description

@jsvd

This affects all jruby versions since 1.7.20 inclusive:
1.7.11 works OK
1.7.18 works OK
1.7.19 works OK
1.7.20 NOT OK
1.7.22 NOT OK
9.0.3.0 NOT OK

Every time a File::Stat.new(path) or a File.stat(path) is executed, even if the context disappears there are chunks of memory that are not freed.

This can cause, for example, jruby instances to show a healthy jvm heap usage of < 150 mb while the process on windows uses 3gb.

This can be tested by executing bin\jruby -e " loop { File.stat('bin') }"and watching in VMMAP (https://technet.microsoft.com/en-us/sysinternals/dd535533.aspx) the amount of unusable memory.

In this image collection you can see the normal memory usage of 1.7.19 and the of the non-freed allocations in 1.7.20

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions