#1254 CPD run that worked in 5.1.2 fails in 5.1.3 with OOM

PMD-5.2.2
closed
None
PMD
3-Major
Bug
5.1.3
2015-03-24
2014-09-02
No

java version "1.7.0_65"
OpenJDK Runtime Environment (IcedTea 2.5.1) (7u65-2.5.1-4ubuntu1~0.14.04.2)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)

Same inputs that worked in 5.1.2 and completed relatively quickly get OOM after a long time in 5.1.3.

jason@jason-thinkpad:/www/greasyfork$ time /www/pmd-bin-5.1.2/bin/run.sh cpd --files theattachment --minimum-tokens 100 --language ecmascript --format csv --encoding UTF-8 > /dev/null

real    0m9.444s
user    0m25.624s
sys 0m0.549s
jason@jason-thinkpad:/www/greasyfork$ time /www/pmd-bin-5.1.3/bin/run.sh cpd --files theattachment --minimum-tokens 100 --language ecmascript --format csv --encoding UTF-8 > /dev/null
Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded
    at java.util.HashMap.createEntry(HashMap.java:897)
    at java.util.HashMap.addEntry(HashMap.java:884)
    at java.util.HashMap.put(HashMap.java:505)
    at net.sourceforge.pmd.cpd.MatchAlgorithm.hash(MatchAlgorithm.java:103)
    at net.sourceforge.pmd.cpd.MatchAlgorithm.findMatches(MatchAlgorithm.java:59)
    at net.sourceforge.pmd.cpd.CPD.go(CPD.java:49)
    at net.sourceforge.pmd.cpd.CPDCommandLineInterface.main(CPDCommandLineInterface.java:82)
    at net.sourceforge.pmd.cpd.CPD.main(CPD.java:180)

real    1m30.131s
user    5m2.617s
sys 0m1.560s
1 Attachments

Discussion

  • Andreas Dangel

    Andreas Dangel - 2014-11-15

    With [#1239] I disabled multiple line strings for javascript. This might have increased a little bit the memory usage (as one single string had created multiple tokens). I renabled this feature (and fixed it, so that no stack overflow exceptions occur). However, you project seems to be just too big - I still get the OOM error.
    Therefore I removed the default memory setting in run.sh of 512m. It should default now to whatever the java-vm chooses. This could of course still be not enough.

    For now, you can increase the memory, by just setting the environment variable HEAPSIZE, e.g.

    export HEAPSIZE=1g
    
     

    Related

    Issues: #1239


    Last edit: Andreas Dangel 2014-11-15
  • Andreas Dangel

    Andreas Dangel - 2014-11-15
    • status: open --> closed
    • assigned_to: Andreas Dangel
    • Milestone: New Tickets --> PMD-Next
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks