Hadoop Common
  1. Hadoop Common
  2. HADOOP-5561

Javadoc-dev ant target runs out of heap space

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.21.0
    • Component/s: build
    • Labels:
      None
    • Environment:

      OSX with 4gb of RAM

    • Hadoop Flags:
      Reviewed

      Description

      The default configuration for the ant task javadoc-dev does not specify a maxmemory and, after churning for a while, fails with an OOM exception:

      [javadoc] Constructing Javadoc information...
      [javadoc] Standard Doclet version 1.6.0_07
      [javadoc] Building tree for all the packages and classes...
      [javadoc] java.lang.OutOfMemoryError: Java heap space
      [javadoc] 	at java.util.LinkedHashMap.createEntry(LinkedHashMap.java:424)
      [javadoc] 	at java.util.LinkedHashMap.addEntry(LinkedHashMap.java:406)
      [javadoc] 	at java.util.HashMap.put(HashMap.java:385)
      [javadoc] 	at sun.util.resources.OpenListResourceBundle.loadLookup(OpenListResourceBundle.java:118)
      [javadoc] 	at sun.util.resources.OpenListResourceBundle.loadLookupTablesIfNecessary(OpenListResourceBundle.java:97)
      [javadoc] 	at sun.util.resources.OpenListResourceBundle.handleGetObject(OpenListResourceBundle.java:58)
      [javadoc] 	at sun.util.resources.TimeZoneNamesBundle.handleGetObject(TimeZoneNamesBundle.java:59)
      [javadoc] 	at java.util.ResourceBundle.getObject(ResourceBundle.java:378)
      [javadoc] 	at java.util.ResourceBundle.getObject(ResourceBundle.java:381)
      [javadoc] 	at java.util.ResourceBundle.getStringArray(ResourceBundle.java:361)
      [javadoc] 	at sun.util.TimeZoneNameUtility.retrieveDisplayNames(TimeZoneNameUtility.java:100)
      [javadoc] 	at sun.util.TimeZoneNameUtility.retrieveDisplayNames(TimeZoneNameUtility.java:81)
      [javadoc] 	at java.util.TimeZone.getDisplayNames(TimeZone.java:399)
      [javadoc] 	at java.util.TimeZone.getDisplayName(TimeZone.java:350)
      [javadoc] 	at java.util.Date.toString(Date.java:1025)
      [javadoc] 	at com.sun.tools.doclets.formats.html.markup.HtmlDocWriter.today(HtmlDocWriter.java:337)
      [javadoc] 	at com.sun.tools.doclets.formats.html.HtmlDocletWriter.printHtmlHeader(HtmlDocletWriter.java:281)
      [javadoc] 	at com.sun.tools.doclets.formats.html.ClassWriterImpl.writeHeader(ClassWriterImpl.java:122)
      [javadoc] 	at com.sun.tools.doclets.internal.toolkit.builders.ClassBuilder.buildClassHeader(ClassBuilder.java:164)
      [javadoc] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [javadoc] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      [javadoc] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [javadoc] 	at java.lang.reflect.Method.invoke(Method.java:597)
      [javadoc] 	at com.sun.tools.doclets.internal.toolkit.builders.ClassBuilder.invokeMethod(ClassBuilder.java:101)
      [javadoc] 	at com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder.build(AbstractBuilder.java:90)
      [javadoc] 	at com.sun.tools.doclets.internal.toolkit.builders.ClassBuilder.buildClassDoc(ClassBuilder.java:124)
      [javadoc] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [javadoc] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      [javadoc] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [javadoc] 	at java.lang.reflect.Method.invoke(Method.java:597)
      [javadoc] 	at com.sun.tools.doclets.internal.toolkit.builders.ClassBuilder.invokeMethod(ClassBuilder.java:101)
      [javadoc] 	at com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder.build(AbstractBuilder.java:90)
      
      1. HADOOP-5561.patch
        2 kB
        Jakob Homan
      2. HADOOP-5561.patch
        0.4 kB
        Jakob Homan

        Activity

        Hide
        Hudson added a comment -
        Show
        Hudson added a comment - Integrated in Hadoop-trunk #796 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/796/ )
        Hide
        Chris Douglas added a comment -

        +1

        I committed this. Thanks, Jacob

        Show
        Chris Douglas added a comment - +1 I committed this. Thanks, Jacob
        Hide
        Jakob Homan added a comment -

        submitting new patch

        Show
        Jakob Homan added a comment - submitting new patch
        Hide
        Jakob Homan added a comment -

        Updated patch to use javadoc.maxmemory property and have all the javadoc targets use it. Tested by calling all the javadoc targets and verifying they're using the property.

        Show
        Jakob Homan added a comment - Updated patch to use javadoc.maxmemory property and have all the javadoc targets use it. Tested by calling all the javadoc targets and verifying they're using the property.
        Hide
        Chris Douglas added a comment -

        would recommend having an Ant property javadoc.memory

        +1

        Show
        Chris Douglas added a comment - would recommend having an Ant property javadoc.memory +1
        Hide
        steve_l added a comment -

        would recommend having an Ant property javadoc.memory that is set to 512m in the build file, but can be overridden by people with problems (or 64 bit JVMs) without having to patch the build file. It could also be used by all build files

        Show
        steve_l added a comment - would recommend having an Ant property javadoc.memory that is set to 512m in the build file, but can be overridden by people with problems (or 64 bit JVMs) without having to patch the build file. It could also be used by all build files
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12403468/HADOOP-5561.patch
        against trunk revision 757667.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no tests are needed for this patch.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

        +1 Eclipse classpath. The patch retains Eclipse classpath integrity.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/127/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/127/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/127/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/127/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12403468/HADOOP-5561.patch against trunk revision 757667. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no tests are needed for this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 Eclipse classpath. The patch retains Eclipse classpath integrity. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/127/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/127/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/127/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/127/console This message is automatically generated.
        Hide
        Jakob Homan added a comment -

        submitting patch

        Show
        Jakob Homan added a comment - submitting patch
        Hide
        Jakob Homan added a comment -

        Patch explicitly sets the maxmemory in the javadoc ant task to a reasonable 512 MB. This solves the issue and the javadoc task completes quickly on my machine. Not unit-tested as is a build configuration change.

        Show
        Jakob Homan added a comment - Patch explicitly sets the maxmemory in the javadoc ant task to a reasonable 512 MB. This solves the issue and the javadoc task completes quickly on my machine. Not unit-tested as is a build configuration change.

          People

          • Assignee:
            Jakob Homan
            Reporter:
            Jakob Homan
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development