Skip to content

Fix circular references in exceptions - #4249

Open
vy wants to merge 2 commits into
2.xfrom
stack-trace-fix
Open

Fix circular references in exceptions#4249
vy wants to merge 2 commits into
2.xfrom
stack-trace-fix

Conversation

@vy

@vy vy commented Aug 12, 2026

Copy link
Copy Markdown
Member

Fix Throwable causal-chain handling for cyclic and identity-malfunctioning exceptions.

@vy vy added this to the 2.27.0 milestone Aug 12, 2026
@vy
vy requested review from ppkarwasz and ramanathan1504 August 12, 2026 08:39
@vy vy self-assigned this Aug 12, 2026
@vy vy added bug Incorrect, unexpected, or unintended behavior of existing code appenders Affects one or more Appender plugins layouts Affects one or more Layout plugins labels Aug 12, 2026

@ramanathan1504 ramanathan1504 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vy I reverted each production hunk locally and the cyclic cases are real: JPA converter → StackOverflow, NoSqlDatabaseManagerTestOutOfMemoryError after 100s, Throwables.getRootCauser instead of r_c_c.
ThrowableExtendedStackTraceRenderer.java:115 — reverting only this hunk leaves all 1,643 pattern-converter tests green; TestFriendlyException is a single class so classResourceInfoByName comes out identical either way. Can one be made to fail without it, or is it defensive only?
ThrowableProxy.java:119causeVisited never gets the root added, so a.initCause(b); b.initCause(a) prints Caused by: java.lang.Exception: A twice where %xEx prints [CIRCULAR REFERENCE: ...]. Out of scope here?
src/changelog/.2.x.x/4249_fix-circular-exception.xml — link #3933 too, the way the #4133 entry does?

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

Labels

appenders Affects one or more Appender plugins bug Incorrect, unexpected, or unintended behavior of existing code layouts Affects one or more Layout plugins

Projects

Development

Successfully merging this pull request may close these issues.

2 participants