Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid capturing Request in LogRecord parameters #694

Merged
merged 2 commits into from
Oct 25, 2023

Conversation

jglick
Copy link
Member

@jglick jglick commented Oct 24, 2023

Noticed in a heap dump that there were several Channels sticking around after the associated builds had completed, and found that they were referenced in a log ring buffer

this     - value: hudson.remoting.Channel #1
 <- channel     - class: hudson.remoting.RemoteClassLoader$ClassLoaderProxy, value: hudson.remoting.Channel #1
  <- classLoaderProxy     - class: hudson.remoting.UserRequest, value: hudson.remoting.RemoteClassLoader$ClassLoaderProxy #1
   <- [0]     - class: java.lang.Object[], value: hudson.remoting.UserRequest #1
    <- parameters     - class: java.util.logging.LogRecord, value: java.lang.Object[] #97789
     <- [177]     - class: java.util.logging.LogRecord[], value: java.util.logging.LogRecord #32
      <- records     - class: hudson.WebAppMain$1, value: java.util.logging.LogRecord[] #1
       <- handler     - class: hudson.WebAppMain, value: hudson.WebAppMain$1 #1
        <- [4]     - class: java.lang.Object[], value: hudson.WebAppMain #1
         <- elementData     - class: java.util.ArrayList, value: java.lang.Object[] #1868
          <- _destroyServletContextListeners     - class: winstone.HostConfiguration$1, value: java.util.ArrayList #91
           <- _context (Java frame)     - class: org.eclipse.jetty.webapp.WebAppClassLoader, value: winstone.HostConfiguration$1 #1

whose message I traced to this line.

See jenkinsci/jenkins#6643 for background.

@jglick jglick added the bug For changelog: Fixes a bug. label Oct 24, 2023
@jglick jglick requested a review from a team October 24, 2023 23:17
@basil basil merged commit c3b7249 into jenkinsci:master Oct 25, 2023
12 checks passed
@jglick jglick deleted the Request-logger branch October 25, 2023 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For changelog: Fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants