Skip to content

Sentry won't stop threads during web app stop when used with Tomcat 9 #2074

@wukrwurk

Description

@wukrwurk

Integration

sentry-spring-boot-starter

Java Version

11

Version

5.7.3

Steps to Reproduce

  1. Define a spring boot project, add sentry client to pom.xml
  2. Start a tomcat 9 with a war file deployed
  3. Redeploy(replace) a war file (without restarting tomcat)

The issue is similar to #487 or #420

Expected Result

Sentry should stop threads once web app is stopped

Actual Result

org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ftadmin] created a ThreadLocal with key of type [io.sentry.environment.SentryEnvironment$1] (value [io.sentry.environment.SentryEnvironment$1@26c761df]) and a value of type [java.util.concurrent.atomic.AtomicInteger] (value [0]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions