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

subversion.credentials: deserialization fails when resolves-to="dynamic-proxy"

    Details

    • Similar Issues:

      Description

      In hudson log, lots of such messages recently appeared (i.e. after having upgraded subversion plugin from 1.17 to 1.20):

      hudson.scm.PerJobCredentialStore <init>
      INFO: Failed to retrieve Subversion credentials from /var/lib/hudson/jobs/JOB_NAME/subversion.credentials
      hudson.util.IOException2: Unable to read /var/lib/hudson/jobs/JOB_NAME/subversion.credentials
      at hudson.XmlFile.unmarshal(XmlFile.java:152)
      at hudson.scm.PerJobCredentialStore.<init>(PerJobCredentialStore.java:38)
      at hudson.scm.SubversionSCM$DescriptorImpl.createAuthenticationProvider(SubversionSCM.java:1669)
      at hudson.scm.SubversionChangeLogBuilder.createAuthenticationProvider(SubversionChangeLogBuilder.java:122)
      at hudson.scm.SubversionChangeLogBuilder.getUrlForPath(SubversionChangeLogBuilder.java:118)
      at hudson.scm.SubversionChangeLogBuilder.run(SubversionChangeLogBuilder.java:103)
      at hudson.scm.SubversionSCM.calcChangeLog(SubversionSCM.java:440)
      at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:557)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1119)
      at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411)
      at hudson.model.Run.run(Run.java:1324)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:139)
      Caused by: com.thoughtworks.xstream.converters.ConversionException: No InvocationHandler specified for dynamic proxy
      ---- Debugging information ----
      class : com.thoughtworks.xstream.mapper.DynamicProxyMapper$DynamicProxy
      required-type : com.thoughtworks.xstream.mapper.DynamicProxyMapper$DynamicProxy
      path : /hudson.scm.PerJobCredentialStore
      line number : 13
      -------------------------------
      at com.thoughtworks.xstream.converters.extended.DynamicProxyConverter.unmarshal(DynamicProxyConverter.java:92)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
      at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:137)
      at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:33)
      at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:926)
      at hudson.util.XStream2.unmarshal(XStream2.java:80)
      at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:912)
      at hudson.XmlFile.unmarshal(XmlFile.java:148)
      ... 14 more

      This only occurs when the job's subversion.credentials looks like this:

      <?xml version='1.0' encoding='UTF-8'?>
      <hudson.scm.PerJobCredentialStore resolves-to="dynamic-proxy">
        <h class="hudson.remoting.RemoteInvocationHandler" serialization="custom">
          <hudson.remoting.RemoteInvocationHandler>
            <default>
              <autoUnexportByCaller>false</autoUnexportByCaller>
              <goingHome>false</goingHome>
              <oid>264</oid>
              <userProxy>true</userProxy>
            </default>
          </hudson.remoting.RemoteInvocationHandler>
        </h>
      </hudson.scm.PerJobCredentialStore>
      

      note: deserialization succeeds when the job's subversion.credentials looks like that:

      <?xml version='1.0' encoding='UTF-8'?>
      <hudson.scm.PerJobCredentialStore>
        <credentials class="hashtable">
          <entry>
            <string>REALM</string>
            <hudson.scm.SubversionSCM_-DescriptorImpl_-PasswordCredential>
              <userName>USERNAME</userName>
              <password>PASSWORD</password>
            </hudson.scm.SubversionSCM_-DescriptorImpl_-PasswordCredential>
          </entry>
        </credentials>
      </hudson.scm.PerJobCredentialStore>
      

      Let me know if something else is required.

        Attachments

          Issue Links

            Activity

            Hide
            kohsuke Kohsuke Kawaguchi added a comment -

            I believe this change fixes the memory leak reported by tswindells, but I'm not 100% sure. If it still continues in 1.23, please reopen this issue.

            Show
            kohsuke Kohsuke Kawaguchi added a comment - I believe this change fixes the memory leak reported by tswindells, but I'm not 100% sure. If it still continues in 1.23, please reopen this issue.
            Hide
            rdesgroppes Régis Desgroppes added a comment -

            No more deserialization issue. (according to logs, at least)

            Show
            rdesgroppes Régis Desgroppes added a comment - No more deserialization issue. (according to logs, at least)
            Hide
            msacarny msacarny added a comment -

            I get failures of this kind in Jenkins 1.403 even after updating SVN plugin to 1.25. The log at the master is like this:
            INFO: Failed to retrieve Subversion credentials from C:\Program Files\Jenkins\jobs\test-andromeda-sim-helloworld\subversion.credentials
            hudson.util.IOException2: Unable to read C:\Program Files\Jenkins\jobs\test-andromeda-sim-helloworld\subversion.credentials
            at hudson.XmlFile.unmarshal(XmlFile.java:152)
            at hudson.scm.PerJobCredentialStore.(PerJobCredentialStore.java:38)
            at hudson.scm.SubversionSCM$DescriptorImpl.createAuthenticationProvider(SubversionSCM.java:1647)
            at hudson.scm.SubversionSCM$DescriptorImpl.getRepository(SubversionSCM.java:1857)
            at hudson.scm.SubversionSCM$DescriptorImpl.checkRepositoryPath(SubversionSCM.java:1830)
            at hudson.scm.SubversionSCM.repositoryLocationsNoLongerExist(SubversionSCM.java:2001)
            at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:668)
            at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:633)
            at hudson.model.AbstractProject.checkout(AbstractProject.java:1181)
            at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:521)
            at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416)
            at hudson.model.Run.run(Run.java:1362)
            at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
            at hudson.model.ResourceController.execute(ResourceController.java:88)
            at hudson.model.Executor.run(Executor.java:145)
            Caused by: com.thoughtworks.xstream.converters.ConversionException: No InvocationHandler specified for dynamic proxy
            ---- Debugging information ----
            class : com.thoughtworks.xstream.mapper.DynamicProxyMapper$DynamicProxy
            required-type : com.thoughtworks.xstream.mapper.DynamicProxyMapper$DynamicProxy
            path : /hudson.scm.PerJobCredentialStore
            line number : 13
            -------------------------------

            This prevents us from running jobs on our slaves. Does anyone have a workaround or solution?

            Show
            msacarny msacarny added a comment - I get failures of this kind in Jenkins 1.403 even after updating SVN plugin to 1.25. The log at the master is like this: INFO: Failed to retrieve Subversion credentials from C:\Program Files\Jenkins\jobs\test-andromeda-sim-helloworld\subversion.credentials hudson.util.IOException2: Unable to read C:\Program Files\Jenkins\jobs\test-andromeda-sim-helloworld\subversion.credentials at hudson.XmlFile.unmarshal(XmlFile.java:152) at hudson.scm.PerJobCredentialStore.(PerJobCredentialStore.java:38) at hudson.scm.SubversionSCM$DescriptorImpl.createAuthenticationProvider(SubversionSCM.java:1647) at hudson.scm.SubversionSCM$DescriptorImpl.getRepository(SubversionSCM.java:1857) at hudson.scm.SubversionSCM$DescriptorImpl.checkRepositoryPath(SubversionSCM.java:1830) at hudson.scm.SubversionSCM.repositoryLocationsNoLongerExist(SubversionSCM.java:2001) at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:668) at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:633) at hudson.model.AbstractProject.checkout(AbstractProject.java:1181) at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:521) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416) at hudson.model.Run.run(Run.java:1362) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:145) Caused by: com.thoughtworks.xstream.converters.ConversionException: No InvocationHandler specified for dynamic proxy ---- Debugging information ---- class : com.thoughtworks.xstream.mapper.DynamicProxyMapper$DynamicProxy required-type : com.thoughtworks.xstream.mapper.DynamicProxyMapper$DynamicProxy path : /hudson.scm.PerJobCredentialStore line number : 13 ------------------------------- This prevents us from running jobs on our slaves. Does anyone have a workaround or solution?
            Hide
            jhansche Joe Hansche added a comment -

            I know this was already closed, but I'm seeing a suspected leak, similar to what tswindells reports above – and I haven't been able to find a similar report in its own issue. I'm not sure what I should be looking for, but looking at the ExportTable on the slave shows tens of thousands of "PerJobCredentialStore" references. Any suggestions?

            Show
            jhansche Joe Hansche added a comment - I know this was already closed, but I'm seeing a suspected leak, similar to what tswindells reports above – and I haven't been able to find a similar report in its own issue. I'm not sure what I should be looking for, but looking at the ExportTable on the slave shows tens of thousands of "PerJobCredentialStore" references. Any suggestions?
            Hide
            kutzi kutzi added a comment -

            We're using Jenkins 1.409.1, Subversion plugin 1.25 and are also still seeing this log messages.
            Though they don't seem to cause any other harm.

            Show
            kutzi kutzi added a comment - We're using Jenkins 1.409.1, Subversion plugin 1.25 and are also still seeing this log messages. Though they don't seem to cause any other harm.

              People

              • Assignee:
                rdesgroppes Régis Desgroppes
                Reporter:
                rdesgroppes Régis Desgroppes
              • Votes:
                15 Vote for this issue
                Watchers:
                21 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: