Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-6001

Yaml parser eats memory up to 100% in case of syntax errors

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 12.4
    • None
    • yaml - Editor
    • None
    • Netbeans 12.4

      Java jdk-16.0.1+9 from AdoptOpenJDK

      Ubuntu 20.04

      Both Netbeans and the JDK installed from their respective websites, not the Ubuntu packet manager

       

       

    Description

      When editing a YAML file, if there is a syntax error, netbeans eats up memory until it reaches 100% of what it's assigned, at which point garbage collection will use all CPU resources and netbeans becomes unresponsive.

      To reproduce:

      Create a new empty YAML file in any project

      Enter the following text into the file:

      some key:
           some value: "this is the value"

       

      At this point, watch the widget that shows Netbeans' memory consumption, it increases rapidly, until it reaches 100%. At this point, Java spends 99% of its time in garbage collection, Netbeans becomes unresponsive (and if the Java parameters permit using all cores, the system becomes sluggish as well).

       

      Closing/correcting the yaml file at that point doesn't help. This does/did not happen in Netbeans 12.3.

       

      I attached JProfiler to the JVM that was running netbeans and could confirm the memory usage increase starting right after entering the invalid yaml. Taking a heap dump showed 56 million instances of `org.netbeans.modules.csl.spi.DefaultError`, as well as 56 million `java.lang.String`s.

       

       

       

      Attachments

        Issue Links

          Activity

            People

              lkishalmi Laszlo Kishalmi
              giselbaer Guntram Blohm
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: