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

Platformlabeler can generate NULL label objects on Linux

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Component/s: platformlabeler-plugin
    • Labels:
      None
    • Environment:
      Platform: All, OS: All

      Description

      While trying to save the slave config at
      http://davidkarlsen.com/hudson/computer/hudson-slave1/configSubmit

      I get:

      Status Code: 500
      Exception:
      Stacktrace:

      java.lang.NullPointerException
      at java.util.TreeMap.put(TreeMap.java:541)
      at java.util.TreeSet.add(TreeSet.java:238)
      at java.util.AbstractCollection.addAll(AbstractCollection.java:305)
      at java.util.TreeSet.addAll(TreeSet.java:295)
      at hudson.model.Node.getAssignedLabels(Node.java:187)
      at hudson.model.Slave.(Slave.java:152)
      at hudson.model.Slave.(Slave.java:130)
      at hudson.slaves.DumbSlave.(DumbSlave.java:53)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at
      sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at
      sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      at org.kohsuke.stapler.RequestImpl.invokeConstructor(RequestImpl.java:391)
      at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:344)
      at hudson.model.Descriptor.newInstance(Descriptor.java:351)
      at hudson.model.Computer.doConfigSubmit(Computer.java:927)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:185)
      at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:101)
      at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:54)
      at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:74)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:492)
      at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:318)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:492)
      at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:144)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:492)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:408)
      at org.kohsuke.stapler.Stapler.service(Stapler.java:117)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
      at winstone.ServletConfiguration.execute(ServletConfiguration.java:249)
      at winstone.RequestDispatcher.forward(RequestDispatcher.java:335)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:378)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:94)
      at hudson.plugins.audit_trail.AuditTrailFilter.doFilter(AuditTrailFilter.java:64)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:97)
      at
      org.jvnet.hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:47)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:97)
      at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:86)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:78)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      at
      hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at
      org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at
      org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at
      org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at
      org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at
      org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at
      org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
      at
      hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:66)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
      at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:244)
      at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
      at java.lang.Thread.run(Thread.java:619)

      Generated by Winstone Servlet Engine v0.9.10 at Mon Nov 23 02:27:34 CET 2009

        Activity

        Hide
        davidkarlsen davidkarlsen added a comment -

        Seems to work fine now - thanks!

        Show
        davidkarlsen davidkarlsen added a comment - Seems to work fine now - thanks!
        Hide
        lifeless lifeless added a comment -

        Ok, cool. I would have liked to have seen the labels you were getting, but I should have enough to figure out whats going on now.

        Show
        lifeless lifeless added a comment - Ok, cool. I would have liked to have seen the labels you were getting, but I should have enough to figure out whats going on now.
        Hide
        lifeless lifeless added a comment -

        Ok, confirmed, net.robertcollins.ldb.Release.Release() returns null if lsb-release isn't installed. This is fine at that layer. but the hudson plugin can't return null labels.

        Show
        lifeless lifeless added a comment - Ok, confirmed, net.robertcollins.ldb.Release.Release() returns null if lsb-release isn't installed. This is fine at that layer. but the hudson plugin can't return null labels.
        Hide
        scm_issue_link SCM/JIRA link daemon added a comment -

        Code changed in hudson
        User: : lifeless
        Path:
        trunk/hudson/plugins/platformlabeler/src/main/java/org/jvnet/hudson/plugins/platformlabeler/PlatformDetailsTask.java
        http://fisheye4.cenqua.com/changelog/hudson/?cs=24305
        Log:
        Fix JENKINS-4924, NPE when lsb_release not installed on unix machines.

        Show
        scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : lifeless Path: trunk/hudson/plugins/platformlabeler/src/main/java/org/jvnet/hudson/plugins/platformlabeler/PlatformDetailsTask.java http://fisheye4.cenqua.com/changelog/hudson/?cs=24305 Log: Fix JENKINS-4924 , NPE when lsb_release not installed on unix machines.
        Hide
        lifeless lifeless added a comment -

        1.1 of the plugin fixes this.

        Show
        lifeless lifeless added a comment - 1.1 of the plugin fixes this.

          People

          • Assignee:
            lifeless lifeless
            Reporter:
            davidkarlsen davidkarlsen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: