RFR: 8329013: StackOverflowError when starting Apache Tomcat with signed jar

Jaikiran Pai jpai at openjdk.org
Tue Apr 2 09:54:01 UTC 2024


On Thu, 28 Mar 2024 15:55:12 GMT, Sean Coffey <coffeys at openjdk.org> wrote:

> Calling extra logging calls during initialization of Logger libraries can cause recursion leading to StackOverflowError
> This patch adds logic to the EventHelper class to detect recursion and prevent it.

Hello Sean, from what I understand of this proposed fix, what we are attempting here is to prevent a re-entrant call into `System.getLogger()`? Is my understanding correct? The linked JBS issue has a stacktrace from Java 8 and doesn't match the current mainline code so it isn't fully clear to me what's triggering the StackOverFlowError. I tried to reproduce this with the jtreg test that's part of this PR, without including your proposed fix, but that didn't reproduce the StackOverFlowError but the test seems to have uncovered some kind of deadlock in running the shutdown hook that the LogManager installs in the Runtime. I will check that issue separately.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/18534#issuecomment-2031560133



More information about the security-dev mailing list