Skip to content

Stop leaking handled statuses in StatusManager - #4366

Open
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:lv/statusmanager-logged-statuses
Open

Stop leaking handled statuses in StatusManager#4366
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:lv/statusmanager-logged-statuses

Conversation

@vogella

@vogella vogella commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

StatusManager parks every status handled with the LOG style in a list and only drops it again once that very same instance comes back through its own log listener. For callers where that never happens the entry stays for the life of the singleton, and each one can keep an exception and its stack trace alive. Two such cases exist today: the listener is only registered when the platform is running, and the public addLoggedStatus can be called without a following log.

Holding the entries in a weak set fixes that without changing the handshake, and it lets the Vector go, whose per-call locking never made the contains-then-remove pair atomic anyway.

The new StatusManagerTest fails on the old implementation (the reference is never enqueued) and passes on the new one.

A status handed to addLoggedStatus is only removed again once the very same
instance comes back through the log listener. That never happens when the
listener was not registered because the platform is not running, or when the
public addLoggedStatus is called without a following log, so the entry stays
for the life of the singleton and keeps its exception and stack trace alive.

Hold the entries in a weak set instead. That also drops the Vector, whose
per-call locking never made the contains-then-remove pair atomic anyway.

Assisted-by: multiple AI agents and layers of automated tooling 🤖
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Test Results

   858 files  +  286     858 suites  +286   46m 20s ⏱️ - 5m 47s
 8 309 tests +    1   8 066 ✅ +    6  243 💤  -   5  0 ❌ ±0 
20 796 runs  +6 934  20 126 ✅ +6 719  670 💤 +215  0 ❌ ±0 

Results for commit 4e47263. ± Comparison against base commit ee7ae1f.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant