Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-4045

hudson.remoting.Channel.unexport attempts to unexport oid instead of object



    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Done
    • core
    • None
    • Platform: All, OS: All


      We came across an issue where we were seeing persistent memory leaks in Hudson.
      It appeared to be similar if not the same as the latter part of this thread:


      It was extremely subtle to track this thing down, but I've found the cause of it.

      It looks like in the course of handling Unexport and EOF commands, Hudson calls
      hudson.remoting.Channel.unexport(oid). This in turn calls
      hudson.remoting.ExportTable.unexport(oid), but unfortunately the latter method
      expects to be passed the exported object itself, not the oid. It dutifully looks
      to see if anyone has exported the Integer oid and when it finds nobody has, it
      returns without releasing the reference from the intended Entry.

      The fix is simple; introduce an unexportByOid method onto
      hudson.remoting.ExportTable and have hudson.remoting.Channel call that instead.
      Patch forthcoming.



          mdillon mdillon created issue -
          scm_issue_link SCM/JIRA link daemon made changes -
          Field Original Value New Value
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          abayer Andrew Bayer made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          rtyler R. Tyler Croy made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          rtyler R. Tyler Croy made changes -
          Reporter mdillon [ mdillon ] Mike Dillon [ md5 ]
          rtyler R. Tyler Croy made changes -
          Resolution Done [ 10000 ]
          Status Reopened [ 4 ] Closed [ 6 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 134118 ] JNJira + In-Review [ 202620 ]


            Unassigned Unassigned
            md5 Mike Dillon
            0 Vote for this issue
            1 Start watching this issue