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

Graphviz plugin cannot allocate memory; Possibly due to fork()?

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core, depgraph-view-plugin
    • None
    • Jenkins v1.412 installed in Tomcat Container

      When trying to view a Graph as generated by the depgraph-view plugin, an exception (below) is thrown due to memory constraints.

      On research there may be a correlation between this error and the forking behaviour of the plugin, as based on the following stakoverflow article: http://stackoverflow.com/questions/1124771/how-to-solve-java-io-ioexception-error-12-cannot-allocate-memory-calling-runt

      The machine I am running on is close to capacity, but I would not expect this plugin to exceed the limitation;

      top - 11:06:10 up 43 days,  1:56,  2 users,  load average: 0.31, 0.15, 0.09
      Tasks:  97 total,   1 running,  96 sleeping,   0 stopped,   0 zombie
      Cpu(s):  0.4%us,  0.2%sy,  0.1%ni, 98.3%id,  1.0%wa,  0.0%hi,  0.0%si,  0.0%st
      Mem:   2097152k total,  2033764k used,    63388k free,    26180k buffers
      Swap:   557048k total,   354000k used,   203048k free,   330868k cached
        PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                
      17747 tomcat    21   0 2116m 1.3g 8028 S  9.2 65.7 211:37.36 java  
      
                   total       used       free     shared    buffers     cached
      Mem:          2048       1989         58          0         26        325
      -/+ buffers/cache:       1637        410
      Swap:          543        345        198
      
      SEVERE: Servlet.service() for servlet Stapler threw exception
      java.io.IOException: Cannot run program "/usr/bin/dot": java.io.IOException: error=12, Cannot allocate memory
      	at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
      	at hudson.Proc$LocalProc.<init>(Proc.java:244)
      	at hudson.Proc$LocalProc.<init>(Proc.java:216)
      	at hudson.Launcher$LocalLauncher.launch(Launcher.java:698)
      	at hudson.Launcher$ProcStarter.start(Launcher.java:329)
      	at hudson.plugins.depgraph_view.AbstractDependencyGraphAction.runDot(AbstractDependencyGraphAction.java:188)
      	at hudson.plugins.depgraph_view.AbstractDependencyGraphAction.doDynamic(AbstractDependencyGraphAction.java:116)
      	at sun.reflect.GeneratedMethodAccessor2071.invoke(Unknown Source)
      	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:282)
      	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:149)
      	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:88)
      	at org.kohsuke.stapler.MetaClass$11.dispatch(MetaClass.java:352)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:561)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:646)
      	at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:373)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:561)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:646)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:612)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:646)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:477)
      	at org.kohsuke.stapler.Stapler.service(Stapler.java:159)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:94)
      	at hudson.plugins.audit_trail.AuditTrailFilter.doFilter(AuditTrailFilter.java:65)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:97)
      	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:86)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	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 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
      	at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
      	at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
      	at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
      	at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
      	at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
      	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
      	at java.lang.Thread.run(Thread.java:619)
      Caused by: java.io.IOException: java.io.IOException: error=12, Cannot allocate memory
      	at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
      	at java.lang.ProcessImpl.start(ProcessImpl.java:65)
      	at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
      	... 71 more
      

          [JENKINS-11206] Graphviz plugin cannot allocate memory; Possibly due to fork()?

          Toby Jackson added a comment -

          Reduced priority from original as this does not block our ability to use Jenkins itself, only the plugin on this instance. My other standalone Jenkins installation works fine.

          Toby Jackson added a comment - Reduced priority from original as this does not block our ability to use Jenkins itself, only the plugin on this instance. My other standalone Jenkins installation works fine.

          Stefan Wolf added a comment -

          I think you are correct and this error is related to the forking behaviour of the vm. Since I am using the default Launcher from the Jenkins projekt, I believe that this is the default behaviour. So if this should get fixed you probably should open a bug against the core or try asking on the mailing list.

          Stefan Wolf added a comment - I think you are correct and this error is related to the forking behaviour of the vm. Since I am using the default Launcher from the Jenkins projekt, I believe that this is the default behaviour. So if this should get fixed you probably should open a bug against the core or try asking on the mailing list.

          Toby Jackson added a comment -

          I have added "core" as the component which this issue relates, and "auto assigned" the issue, but I'm not sure where to go with this particular issue to get some resolution, or at least a workaround.

          Toby Jackson added a comment - I have added "core" as the component which this issue relates, and "auto assigned" the issue, but I'm not sure where to go with this particular issue to get some resolution, or at least a workaround.

            wolfs Stefan Wolf
            warmfusion Toby Jackson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: