Skip to content

Cleaner thread too slow #1535

Open
@pmconrad

Description

@pmconrad
  1. Version of JNA and related jars. 5.13.0
  2. Version and vendor of the java virtual machine: openjdk-17.0.8.0 and others
  3. Operating system: Linux (Debian, OpenSUSE)
  4. System architecture (CPU type, bitness of the JVM), x86_64
  5. Complete description of the problem:
    I have an application that will sporadically run into a situation where multiple threads are creating lots of short-lived jna.Structure and jna.Union objects. The problem is that jna's single Cleaner thread cannot keep up freeing objects created by multiple parallel threads, so eventually all heap memory will be used up despite the fact that it could be GC'ed.
  6. Steps to reproduce:
    See test case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions