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

hudson starts slow on solaris

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: other
    • Labels:
      None
    • Environment:
      Platform: Sun, OS: All
    • Similar Issues:

      Description

      -bash-3.00$ java -jar hudson.war
      [Winstone 2007/03/30 10:01:41] - Beginning extraction from war file
      [Winstone 2007/03/30 10:05:30] - No webapp classes folder found - /var/tmp/winstone/hudson.war/
      WEB-INF/classes
      hudson home directory: /homes/theuser/.hudson
      Mar 30, 2007 10:05:31 AM hudson.TcpSlaveAgentListener <init>
      INFO: JNLP slave agent listener started on TCP port 62592
      [Winstone 2007/03/30 10:05:32] - HTTP Listener started: port=8080
      [Winstone 2007/03/30 10:05:32] - AJP13 Listener started: port=8009

      (note that this machine has never run hudson before)

      It takes almost 5 minutes to extract the war file, on my windows pc it takes about 10 seconds.

      truss seems to indicate that the process is waiting for something, below output is repeated over and
      over again:

      /10: lwp_cond_wait(0x00034EE0, 0x00034EC8, 0xB3E7FBC8, 0) Err#62 ETIME
      /18: pollsys(0x00000000, 0, 0xB367FBF0, 0x00000000) = 0
      /18: pollsys(0x00000000, 0, 0xB367FBF0, 0x00000000) = 0
      /18: pollsys(0x00000000, 0, 0xB367FBF0, 0x00000000) = 0
      /18: pollsys(0x00000000, 0, 0xB367FBF0, 0x00000000) = 0
      /18: pollsys(0x00000000, 0, 0xB367FBF0, 0x00000000) = 0
      /18: pollsys(0x00000000, 0, 0xB367FBF0, 0x00000000) = 0
      /18: pollsys(0x00000000, 0, 0xB367FBF0, 0x00000000) = 0
      /18: pollsys(0x00000000, 0, 0xB367FBF0, 0x00000000) = 0
      /18: pollsys(0x00000000, 0, 0xB367FBF0, 0x00000000) = 0
      /18: pollsys(0x00000000, 0, 0xB367FBF0, 0x00000000) = 0
      /18: pollsys(0x00000000, 0, 0xB367FBF0, 0x00000000) = 0
      /18: pollsys(0x00000000, 0, 0xB367FBF0, 0x00000000) = 0
      /18: pollsys(0x00000000, 0, 0xB367FBF0, 0x00000000) = 0
      /18: pollsys(0x00000000, 0, 0xB367FBF0, 0x00000000) = 0
      /18: pollsys(0x00000000, 0, 0xB367FBF0, 0x00000000) = 0
      /18: pollsys(0x00000000, 0, 0xB367FBF0, 0x00000000) = 0
      /18: pollsys(0x00000000, 0, 0xB367FBF0, 0x00000000) = 0

      The machine does not have direct internet access, perhaps an xml parser somewhere is trying to load
      DTDs or schemas ?

        Attachments

          Activity

          Hide
          kohsuke Kohsuke Kawaguchi added a comment -

          Looking at the code, I see that Winstone tries to load things from a local cache:

          in WeebXmlParser.java line 166, there's:

          public InputSource resolveEntity(String publicName, String url)
          throws SAXException, IOException {
          Logger.log(Logger.FULL_DEBUG, Launcher.RESOURCES,
          "WebXmlParser.ResolvingEntity",
          new String[]

          { publicName, url }

          );
          for (int n = 0; n < LOCAL_ENTITY_TABLE.length; n++) {
          if (((LOCAL_ENTITY_TABLE[n][0] != null) && (publicName != null) &&
          publicName.equals(LOCAL_ENTITY_TABLE[n][0])) ||
          ((LOCAL_ENTITY_TABLE[n][1] != null) && (url != null) &&
          url.equals(LOCAL_ENTITY_TABLE[n][1]))) {
          if (this.commonLoader.getResource(LOCAL_ENTITY_TABLE[n][2]) !=
          null)

          { return getLocalResource(url, LOCAL_ENTITY_TABLE[n][2]); }

          }
          }
          if ((url != null) && url.startsWith("jar:"))

          { return getLocalResource(url, url.substring(url.indexOf("!/") + 2)); }

          else if ((url != null) && url.startsWith("file:"))

          { return new InputSource(url); }

          else

          { Logger.log(Logger.FULL_DEBUG, Launcher.RESOURCES, "WebXmlParser.NoLocalResource", url); return new InputSource(url); }

          }

          And there's a table to go with this:

          /**

          • Table mapping public doctypes and system ids against local classloader
            paths. This
          • is used to resolve local entities where possible.
          • Column 0 = public doctype
          • Column 1 = system id
          • Column 2 = local path
            */
            private static final String LOCAL_ENTITY_TABLE[][] =
            Unknown macro: { {"-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN", null, "javax/servlet/resources/web-app_2_2.dtd"}, {"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN", null, "javax/servlet/resources/web-app_2_3.dtd"}, {null, "http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd", "javax/servlet/resources/web-app_2_4.xsd"}, {null, "http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd", "javax/servlet/resources/web-app_2_5.xsd"}, {null, "http://www.w3.org/2001/xml.xsd", "javax/servlet/resources/xml.xsd"}, {"-//W3C//DTD XMLSCHEMA 200102//EN", null, "javax/servlet/resources/XMLSchema.dtd"}, {null, "http://www.w3.org/2001/datatypes.dtd", "javax/servlet/resources/datatypes.dtd"}, {null, "http://java.sun.com/xml/ns/j2ee/j2ee_1_4.xsd", "javax/servlet/resources/j2ee_1_4.xsd"}, {null, "http://java.sun.com/xml/ns/j2ee/javaee_5.xsd", "javax/servlet/resources/javaee_5.xsd"}, {null, "http://www.ibm.com/webservices/xsd/j2ee_web_services_client_1_1.xsd", "javax/servlet/resources/j2ee_web_services_client_1_1.xsd"}, {null, "http://www.ibm.com/webservices/xsd/j2ee_web_services_client_1_2.xsd", "javax/servlet/resources/javaee_web_services_client_1_2.xsd"} }

            ;

          When I trace through this code, the resolveEntity method is invoked, and it uses
          the local resource.

          Would it be possible for you to run this under Java debugger and see if your
          resolveEntity method is invoked at all?

          Show
          kohsuke Kohsuke Kawaguchi added a comment - Looking at the code, I see that Winstone tries to load things from a local cache: in WeebXmlParser.java line 166, there's: public InputSource resolveEntity(String publicName, String url) throws SAXException, IOException { Logger.log(Logger.FULL_DEBUG, Launcher.RESOURCES, "WebXmlParser.ResolvingEntity", new String[] { publicName, url } ); for (int n = 0; n < LOCAL_ENTITY_TABLE.length; n++) { if (((LOCAL_ENTITY_TABLE [n] [0] != null) && (publicName != null) && publicName.equals(LOCAL_ENTITY_TABLE [n] [0] )) || ((LOCAL_ENTITY_TABLE [n] [1] != null) && (url != null) && url.equals(LOCAL_ENTITY_TABLE [n] [1] ))) { if (this.commonLoader.getResource(LOCAL_ENTITY_TABLE [n] [2] ) != null) { return getLocalResource(url, LOCAL_ENTITY_TABLE[n][2]); } } } if ((url != null) && url.startsWith("jar:")) { return getLocalResource(url, url.substring(url.indexOf("!/") + 2)); } else if ((url != null) && url.startsWith("file:")) { return new InputSource(url); } else { Logger.log(Logger.FULL_DEBUG, Launcher.RESOURCES, "WebXmlParser.NoLocalResource", url); return new InputSource(url); } } And there's a table to go with this: /** Table mapping public doctypes and system ids against local classloader paths. This is used to resolve local entities where possible. Column 0 = public doctype Column 1 = system id Column 2 = local path */ private static final String LOCAL_ENTITY_TABLE[][] = Unknown macro: { {"-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN", null, "javax/servlet/resources/web-app_2_2.dtd"}, {"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN", null, "javax/servlet/resources/web-app_2_3.dtd"}, {null, "http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd", "javax/servlet/resources/web-app_2_4.xsd"}, {null, "http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd", "javax/servlet/resources/web-app_2_5.xsd"}, {null, "http://www.w3.org/2001/xml.xsd", "javax/servlet/resources/xml.xsd"}, {"-//W3C//DTD XMLSCHEMA 200102//EN", null, "javax/servlet/resources/XMLSchema.dtd"}, {null, "http://www.w3.org/2001/datatypes.dtd", "javax/servlet/resources/datatypes.dtd"}, {null, "http://java.sun.com/xml/ns/j2ee/j2ee_1_4.xsd", "javax/servlet/resources/j2ee_1_4.xsd"}, {null, "http://java.sun.com/xml/ns/j2ee/javaee_5.xsd", "javax/servlet/resources/javaee_5.xsd"}, {null, "http://www.ibm.com/webservices/xsd/j2ee_web_services_client_1_1.xsd", "javax/servlet/resources/j2ee_web_services_client_1_1.xsd"}, {null, "http://www.ibm.com/webservices/xsd/j2ee_web_services_client_1_2.xsd", "javax/servlet/resources/javaee_web_services_client_1_2.xsd"} } ; When I trace through this code, the resolveEntity method is invoked, and it uses the local resource. Would it be possible for you to run this under Java debugger and see if your resolveEntity method is invoked at all?
          Hide
          heymjo Jorg Heymans added a comment -

          But isn't that list just missing http://java.sun.com/xml/ns/j2ee/jsp_2_0.xsd then ?

          Show
          heymjo Jorg Heymans added a comment - But isn't that list just missing http://java.sun.com/xml/ns/j2ee/jsp_2_0.xsd then ?
          Hide
          kohsuke Kohsuke Kawaguchi added a comment -

          Doh! Doh! Doh! Of course!!!

          And when I looked back the e-mail thread, Renaud already said:

          > The last winstone release (0.9.6) did not have the JSP XSDs in the jar,
          > but the next one should according to their CVS.

          So this issue is just waiting for a new version of Winstone now.

          My apologies. I should have had more caffeine before doing this.

          Show
          kohsuke Kohsuke Kawaguchi added a comment - Doh! Doh! Doh! Of course!!! And when I looked back the e-mail thread, Renaud already said: > The last winstone release (0.9.6) did not have the JSP XSDs in the jar, > but the next one should according to their CVS. So this issue is just waiting for a new version of Winstone now. My apologies. I should have had more caffeine before doing this.
          Hide
          heymjo Jorg Heymans added a comment -

          It seems that this is fixed in the new winstone release ! It would be great if hudson could upgrade in one
          of the upcoming releases.

          Show
          heymjo Jorg Heymans added a comment - It seems that this is fixed in the new winstone release ! It would be great if hudson could upgrade in one of the upcoming releases.
          Hide
          kohsuke Kohsuke Kawaguchi added a comment -

          Fixed in 1.105.

          Show
          kohsuke Kohsuke Kawaguchi added a comment - Fixed in 1.105.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            heymjo Jorg Heymans
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: