Maven Compiler Plugin
  1. Maven Compiler Plugin
  2. MCOMPILER-133

Facing OutOfMemory as IsolatedClassloader (plexus-compiler jar) is not closed after JavacCompiler is done with compilation.

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Blocker Blocker
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Windows 2003 Server
    • Number of attachments :
      1

      Description

      In Eclipse environment for a maven-based project, Auto-build fires Maven-build which in turn executes CompilerMojo, finally creating an IsolatedClassloader for each compile call !

      IsolatedClassLoader.addURL(URL) line: 42...
      JavacCompiler.compile(CompilerConfiguration) line: 141
      CompilerMojo(AbstractCompilerMojo).execute() line: 493...
      DefaultBuildPluginManager.executeMojo(MavenSession, MojoExecution) line: 105...
      MavenImpl.execute(MavenExecutionRequest, IProgressMonitor) ...
      MavenBuilder.build(int, Map, IProgressMonitor) line: 153 ....
      AutoBuildJob.run(IProgressMonitor) line: 238

      So every single change in maven-v4 project creates a new IsolatedClassloader which is fine.
      But the problem is JavacCompiler is not closing the loader which holds huge number of jars (url points to maven-repo) in its url classpath.
      It should use ClassLoaderutil.releaseLoader(..) to unload the jars.

      GC does not reclaim the isolatedclassloader instances (not sure why).
      As a result, IsolatedClassloader instances consume retains the heap.
      Eventually maven-application goes OutOfMemory !

      Attached is the heapdump analysis of isolatedclassloader that holds the memory.

      This is kind of blocking us from building largescale maven app which requires good number of jars in development time for compiling the app source at development time.

      Please note that we face this issue at development time whenever developer making changes in source code as explained in the code-flow above.

      Please let us know if more information is required.

        Activity

        Lukas Theussl made changes -
        Field Original Value New Value
        Project Maven 1 [ 10030 ] Maven 2 & 3 [ 10500 ]
        Key MAVEN-1867 MNG-4801
        Affects Version/s 1.2 [ 13492 ]
        Component/s core [ 10026 ]
        Complexity Intermediate
        Benjamin Bentmann made changes -
        Project Maven 2 & 3 [ 10500 ] Maven 2.x Compiler Plugin [ 11130 ]
        Key MNG-4801 MCOMPILER-133
        Complexity Intermediate
        Mark Struberg made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Won't Fix [ 2 ]
        Mark Struberg made changes -
        Comment [ ONLINE STORE :
        ==== ( http://zzb.bz/LNmmL ) =====



        n2012 comes, in order to thank everyone, characteristic, novel style, varieties, low price and good quality, and the low sale price. Thank everyone


        free shipping

        competitive price

        any size available

        accept the paypal

        jordan shoes $32

        nike shox $32

        Christan Audigier bikini $23

        Ed Hardy Bikini $23

        Smful short_t-shirt_woman $15

        ed hardy short_tank_woman $16

        Sandal $32

        christian louboutin $80

        Sunglass $15

        COACH_Necklace $27

        handbag $33

        AF tank woman $17


        puma slipper woman $30
        ==== ( http://zzb.bz/LNmmL ) =====
        ]
        Mark Struberg made changes -
        Comment [ ONLINE STORE :
        ==== ( http://zzb.bz/LNmmL ) =====



        n2012 comes, in order to thank everyone, characteristic, novel style, varieties, low price and good quality, and the low sale price. Thank everyone


        free shipping

        competitive price

        any size available

        accept the paypal

        jordan shoes $32

        nike shox $32

        Christan Audigier bikini $23

        Ed Hardy Bikini $23

        Smful short_t-shirt_woman $15

        ed hardy short_tank_woman $16

        Sandal $32

        christian louboutin $80

        Sunglass $15

        COACH_Necklace $27

        handbag $33

        AF tank woman $17


        puma slipper woman $30
        ==== ( http://zzb.bz/LNmmL ) =====
        ]

          People

          • Assignee:
            Unassigned
            Reporter:
            kaniska
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: