oracle / oracle/oci-java-sdk

Thread leak in IdleConnectionMonitor in Versions 3.31.0 to 3.38.0 (fixed in 3.39.0)

Open
#587 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

SDK
Dominant language
Java
Stars
243
Forks
171
Avg merge
30m
Merged PRs (30d)
4

Description

If you are using any OCI Java SDK version(s) >= 3.31.0 and <= 3.38.0 then you could see a thread leak in IdleConnectionMonitor. We recommend you to update to version 3.39.0 or later. If you are not using any of the affected OCI Java SDK versions, you can ignore this issue.

Description
When using OCI Java SDK version(s) >= 3.31.0 and <= 3.38.0, an increase in CPU or memory usage might occur due to the proliferation of threads of type idle-connection-monitor-thread. IdleConnectionMonitor was introduced in version 3.31.0 for each client to evict the idle and expired Apache connections and to restore connection re-use for the Apache connector. As each OCI Java SDK client spawns its own idle connection monitoring threads, these threads do not terminate unless the clients are closed (either by using "try-with-resources" or by calling the close() method). Over time, as more clients are created and not closed, the number of threads continues to grow, resulting in a build-up of unused threads and thus a thread leak.

Affected Versions

Actions
Update the OCI Java SDK version to 3.39.0 or later.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository files or tests are identified in the issue. Start by checking the affected OCI Java SDK versions against the 3.39.0 release, and consider the work done when affected users are directed to a version that contains the fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.