Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8146274

Thread spinning on WeakHashMap.getEntry() with concurrent use of nashorn

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8u66
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b103
    • CPU:
      x86_64
    • OS:
      linux_ubuntu

      Backports

        Description

        FULL PRODUCT VERSION :
        java version "1.8.0_66"
        Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
        Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)


        ADDITIONAL OS VERSION INFORMATION :
        Linux wrk-it-140 3.13.0-37-generic #64-Ubuntu SMP Mon Sep 22 21:28:38 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

        A DESCRIPTION OF THE PROBLEM :
        This issue seems quite similar to JDK-8075006.

        I am using nashorn to run JSHint (https://github.com/jshint/jshint/releases/tag/2.6.3) in parallel within a gradle build. A Single CompiledScript object is evaluated in several threads, with each thread using a different SimpleBindings object. This works perfectly the vast majority of the time, but occasionally one of the threads starts spinning in the WeakHashMap.getEntry() method (line 431) while the other threads block.

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        Note that code snippets are in groovy.

        Compile JSHint 2.6.3 (or likely any other complex javascript):
            ScriptEngineManager manager = new ScriptEngineManager()
            ScriptEngine engine = manager.getEngineByMimeType('text/javascript')
            CompiledScript script = ((Compilable) engine).compile(jsHint + jsHintWrapper)

        Execute this script in parallel over a large number of files:
            files.stream().parallel()
                .map {[file: it.absolutePath, options: jshintOptions, predefs: null]}
                .map {new SimpleBindings(it)}
                .map {script.eval(it)}
                .collect(Collectors.toList())

        Repeat these steps until one thread starts spinning while the others are blocked.

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        The work described about normally completes in under a minute with all cores running near 100% through the entire run.
        ACTUAL -
        After a short time running normally, one core continues to run near 100% while all others drop to near idle. This state continues until the process is killed.

        ERROR MESSAGES/STACK TRACES THAT OCCUR :
        Stack trace of the one spinning thread (from jconsole):

        Name: ForkJoinPool.commonPool-worker-1
        State: RUNNABLE
        Total blocked: 214 Total waited: 0

        Stack trace:
        java.util.WeakHashMap.getEntry(WeakHashMap.java:431)
        java.util.WeakHashMap.containsKey(WeakHashMap.java:417)
        jdk.nashorn.internal.runtime.PropertyListeners$WeakPropertyMapSet.contains(PropertyListeners.java:217)
        jdk.nashorn.internal.runtime.PropertyListeners.containsListener(PropertyListeners.java:115)
           - locked jdk.nashorn.internal.runtime.PropertyListeners@692b489
        jdk.nashorn.internal.runtime.PropertyListeners.addListener(PropertyListeners.java:95)
        jdk.nashorn.internal.runtime.PropertyMap.addListener(PropertyMap.java:247)
        jdk.nashorn.internal.runtime.ScriptObject.getProtoSwitchPoint(ScriptObject.java:2112)
        jdk.nashorn.internal.runtime.ScriptObject.findGetMethod(ScriptObject.java:2001)
        jdk.nashorn.internal.runtime.ScriptObject.lookup(ScriptObject.java:1828)
        jdk.nashorn.internal.runtime.linker.NashornLinker.getGuardedInvocation(NashornLinker.java:104)
        jdk.nashorn.internal.runtime.linker.NashornLinker.getGuardedInvocation(NashornLinker.java:98)
        jdk.internal.dynalink.support.CompositeTypeBasedGuardingDynamicLinker.getGuardedInvocation(CompositeTypeBasedGuardingDynamicLinker.java:176)
        jdk.internal.dynalink.support.CompositeGuardingDynamicLinker.getGuardedInvocation(CompositeGuardingDynamicLinker.java:124)
        jdk.internal.dynalink.support.LinkerServicesImpl.getGuardedInvocation(LinkerServicesImpl.java:154)
        jdk.internal.dynalink.DynamicLinker.relink(DynamicLinker.java:253)
        java.lang.invoke.LambdaForm$DMH/261488833.invokeSpecial_LLIL_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/400975508.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$MH/299380183.exactInvoker(LambdaForm$MH)
        java.lang.invoke.LambdaForm$reinvoker/148934703.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/581993340.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$reinvoker/148934703.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/581993340.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$reinvoker/148934703.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/581993340.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$reinvoker/148934703.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/581993340.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$reinvoker/148934703.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/581993340.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$reinvoker/148934703.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/581993340.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$reinvoker/148934703.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/581993340.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$reinvoker/148934703.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/581993340.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$reinvoker/148934703.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/581993340.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$reinvoker/148934703.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/581993340.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$reinvoker/148934703.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/581993340.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$reinvoker/148934703.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/581993340.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/769820660.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$329$578566A$\^eval\_.L:4$jshint$JSHINT$checkCondAssignment(<eval>:10019)
        java.lang.invoke.LambdaForm$DMH/2025179318.invokeStatic_L3_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/1754341197.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$reinvoker/994586870.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/935381552.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/1537529521.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$324$598204$\^eval\_.L:4$jshint$JSHINT$L:10691(<eval>:10697)
        java.lang.invoke.LambdaForm$DMH/1081907965.invokeStatic_LL_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/2122118945.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$reinvoker/1982661481.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/1918022864.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$reinvoker/1982661481.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/1918022864.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/719402320.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$215$517813IZ$\^eval\_.L:4$jshint$JSHINT$expression(<eval>:7780)
        java.lang.invoke.LambdaForm$DMH/742706425.invokeStatic_LLII_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/1680729212.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$MH/1632416097.delegate(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/1793599655.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/641213252.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$212$535382$\^eval\_.L:4$jshint$JSHINT$statement(<eval>:8482)
        java.lang.invoke.LambdaForm$DMH/1081907965.invokeStatic_LL_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/2122118945.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$MH/678816083.delegate(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/1918022864.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/719402320.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$211$537831$\^eval\_.L:4$jshint$JSHINT$statements(<eval>:8525)
        java.lang.invoke.LambdaForm$DMH/1081907965.invokeStatic_LL_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/2122118945.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$reinvoker/1982661481.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/1918022864.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/719402320.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$292$540031ZZZAA$\^eval\_.L:4$jshint$JSHINT$block(<eval>:8644)
        java.lang.invoke.LambdaForm$DMH/1926915314.invokeStatic_LLI3LL_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/474167281.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$reinvoker/1737304802.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/148455990.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/923343394.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$276$575174A$\^eval\_.L:4$jshint$JSHINT$doFunction(<eval>:9943)
        java.lang.invoke.LambdaForm$DMH/2025179318.invokeStatic_L3_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/1754341197.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$reinvoker/994586870.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/935381552.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/1537529521.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$271$597347$\^eval\_.L:4$jshint$JSHINT$L:10663(<eval>:10675)
        java.lang.invoke.LambdaForm$DMH/1081907965.invokeStatic_LL_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/2122118945.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$reinvoker/1982661481.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/1918022864.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/678816083.delegate(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/1918022864.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/719402320.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$248$517813IA$\^eval\_.L:4$jshint$JSHINT$expression(<eval>:7783)
        java.lang.invoke.LambdaForm$DMH/237640146.invokeStatic_LLIL_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/1332445213.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$MH/190252315.delegate(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/1759787595.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/505541004.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$255$579513$\^eval\_.L:4$jshint$JSHINT$L:10057$nud(<eval>:10146)
        java.lang.invoke.LambdaForm$DMH/1081907965.invokeStatic_LL_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/2122118945.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$reinvoker/1982661481.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/1918022864.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/719402320.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$248$517813IA$\^eval\_.L:4$jshint$JSHINT$expression(<eval>:7783)
        java.lang.invoke.LambdaForm$DMH/237640146.invokeStatic_LLIL_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/1332445213.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$MH/190252315.delegate(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/1759787595.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/505541004.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$255$579513$\^eval\_.L:4$jshint$JSHINT$L:10057$nud(<eval>:10146)
        java.lang.invoke.LambdaForm$DMH/1081907965.invokeStatic_LL_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/2122118945.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$MH/1022943542.exactInvoker(LambdaForm$MH)
        java.lang.invoke.LambdaForm$reinvoker/1982661481.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/1918022864.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$reinvoker/1982661481.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/1918022864.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/719402320.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$248$517813IA$\^eval\_.L:4$jshint$JSHINT$expression(<eval>:7783)
        java.lang.invoke.LambdaForm$DMH/237640146.invokeStatic_LLIL_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/1332445213.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$reinvoker/1821802481.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/1759787595.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/505541004.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$247$559154AA$\^eval\_.L:4$jshint$JSHINT$L:9334(<eval>:9358)
        java.lang.invoke.LambdaForm$DMH/1676541147.invokeStatic_L4_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/1391012858.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$MH/342583859.exactInvoker(LambdaForm$MH)
        java.lang.invoke.LambdaForm$reinvoker/1655792360.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/1427904760.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$reinvoker/1655792360.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/1427904760.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/850312068.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$225$525275A$\^eval\_.L:4$jshint$JSHINT$infix$led(<eval>:8044)
        java.lang.invoke.LambdaForm$DMH/2025179318.invokeStatic_L3_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/1754341197.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$reinvoker/994586870.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/935381552.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/1537529521.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$215$517813IZ$\^eval\_.L:4$jshint$JSHINT$expression(<eval>:7823)
        java.lang.invoke.LambdaForm$DMH/742706425.invokeStatic_LLII_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/1680729212.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$reinvoker/844806478.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/1793599655.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/641213252.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$212$535382$\^eval\_.L:4$jshint$JSHINT$statement(<eval>:8482)
        java.lang.invoke.LambdaForm$DMH/1081907965.invokeStatic_LL_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/2122118945.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$MH/1022943542.exactInvoker(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/719402320.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$211$537831$\^eval\_.L:4$jshint$JSHINT$statements(<eval>:8525)
        java.lang.invoke.LambdaForm$DMH/1081907965.invokeStatic_LL_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/2122118945.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$reinvoker/1982661481.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/1918022864.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/719402320.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$116$633807AAA$\^eval\_.L:4$jshint$JSHINT$itself(<eval>:12144)
        java.lang.invoke.LambdaForm$DMH/699081454.invokeStatic_L5_I(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/5835392.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$MH/827733083.exactInvoker(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/800699328.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$\^eval\_.:scopeCall(<eval>)
        jdk.nashorn.internal.scripts.Script$\^eval\_.:program(<eval>:12453)
        java.lang.invoke.LambdaForm$DMH/1081907965.invokeStatic_LL_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$MH/1137719069.invokeExact_MT(LambdaForm$MH)
        jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:640)
        jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:228)
        jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
        jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:418)
        jdk.nashorn.api.scripting.NashornScriptEngine.access$300(NashornScriptEngine.java:73)
        jdk.nashorn.api.scripting.NashornScriptEngine$3.eval(NashornScriptEngine.java:511)
        javax.script.CompiledScript.eval(CompiledScript.java:92)
        javax.script.CompiledScript$eval$1.call(Unknown Source)
        org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
        org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
        org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
        com.ze.gradle.jshint.IncrementalJsHintTask$_execute_closure6.doCall(IncrementalJsHintTask.groovy:105)
        sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        java.lang.reflect.Method.invoke(Method.java:497)
        org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
        groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
        org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
        groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1019)
        groovy.lang.Closure.call(Closure.java:426)
        org.codehaus.groovy.runtime.ConvertedClosure.invokeCustom(ConvertedClosure.java:53)
        org.codehaus.groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:105)
        com.sun.proxy.$Proxy56.apply(Unknown Source)
        java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
        java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
        java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
        java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
        java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
        java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
        java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:747)
        java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:721)
        java.util.stream.AbstractTask.compute(AbstractTask.java:316)
        java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
        java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
        java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
        java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
        java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

        Stack trace from one of the blocked threads (others are all similar):

        Name: ForkJoinPool.commonPool-worker-2
        State: BLOCKED on jdk.nashorn.internal.runtime.PropertyListeners@692b489 owned by: ForkJoinPool.commonPool-worker-1
        Total blocked: 193 Total waited: 0

        Stack trace:
        jdk.nashorn.internal.runtime.PropertyListeners.containsListener(PropertyListeners.java:111)
        jdk.nashorn.internal.runtime.PropertyListeners.addListener(PropertyListeners.java:95)
        jdk.nashorn.internal.runtime.PropertyMap.addListener(PropertyMap.java:247)
        jdk.nashorn.internal.runtime.ScriptObject.getProtoSwitchPoint(ScriptObject.java:2112)
        jdk.nashorn.internal.runtime.ScriptObject.findGetMethod(ScriptObject.java:2001)
        jdk.nashorn.internal.runtime.ScriptObject.lookup(ScriptObject.java:1828)
        jdk.nashorn.internal.runtime.linker.NashornLinker.getGuardedInvocation(NashornLinker.java:104)
        jdk.nashorn.internal.runtime.linker.NashornLinker.getGuardedInvocation(NashornLinker.java:98)
        jdk.internal.dynalink.support.CompositeTypeBasedGuardingDynamicLinker.getGuardedInvocation(CompositeTypeBasedGuardingDynamicLinker.java:176)
        jdk.internal.dynalink.support.CompositeGuardingDynamicLinker.getGuardedInvocation(CompositeGuardingDynamicLinker.java:124)
        jdk.internal.dynalink.support.LinkerServicesImpl.getGuardedInvocation(LinkerServicesImpl.java:154)
        jdk.internal.dynalink.DynamicLinker.relink(DynamicLinker.java:253)
        java.lang.invoke.LambdaForm$DMH/261488833.invokeSpecial_LLIL_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/400975508.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$MH/299380183.exactInvoker(LambdaForm$MH)
        java.lang.invoke.LambdaForm$reinvoker/148934703.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/581993340.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$reinvoker/148934703.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/581993340.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$reinvoker/148934703.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/581993340.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$reinvoker/148934703.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/581993340.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$reinvoker/148934703.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/581993340.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$reinvoker/148934703.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/581993340.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$reinvoker/148934703.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/581993340.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$reinvoker/148934703.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/581993340.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$reinvoker/148934703.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/581993340.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$reinvoker/148934703.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/581993340.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$reinvoker/148934703.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/581993340.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$reinvoker/148934703.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/581993340.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$reinvoker/148934703.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/581993340.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$reinvoker/148934703.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/581993340.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$reinvoker/148934703.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/581993340.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$reinvoker/148934703.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/581993340.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/769820660.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$283$569762A$\^eval\_.L:4$jshint$JSHINT$functionparams(<eval>:9764)
        java.lang.invoke.LambdaForm$DMH/2025179318.invokeStatic_L3_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/1754341197.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$reinvoker/994586870.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/935381552.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/1537529521.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$276$575174A$\^eval\_.L:4$jshint$JSHINT$doFunction(<eval>:9930)
        java.lang.invoke.LambdaForm$DMH/2025179318.invokeStatic_L3_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/1754341197.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$reinvoker/994586870.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/935381552.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/1537529521.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$271$597347$\^eval\_.L:4$jshint$JSHINT$L:10663(<eval>:10675)
        java.lang.invoke.LambdaForm$DMH/1081907965.invokeStatic_LL_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/2122118945.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$reinvoker/1982661481.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/1918022864.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/678816083.delegate(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/1918022864.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/719402320.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$248$517813IA$\^eval\_.L:4$jshint$JSHINT$expression(<eval>:7783)
        java.lang.invoke.LambdaForm$DMH/237640146.invokeStatic_LLIL_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/1332445213.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$MH/190252315.delegate(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/1759787595.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/505541004.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$255$579513$\^eval\_.L:4$jshint$JSHINT$L:10057$nud(<eval>:10146)
        java.lang.invoke.LambdaForm$DMH/1081907965.invokeStatic_LL_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/2122118945.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$reinvoker/1982661481.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/1918022864.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/719402320.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$248$517813IA$\^eval\_.L:4$jshint$JSHINT$expression(<eval>:7783)
        java.lang.invoke.LambdaForm$DMH/237640146.invokeStatic_LLIL_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/1332445213.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$MH/190252315.delegate(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/1759787595.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/505541004.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$255$579513$\^eval\_.L:4$jshint$JSHINT$L:10057$nud(<eval>:10146)
        java.lang.invoke.LambdaForm$DMH/1081907965.invokeStatic_LL_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/2122118945.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$reinvoker/1982661481.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/1918022864.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/719402320.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$248$517813IA$\^eval\_.L:4$jshint$JSHINT$expression(<eval>:7783)
        java.lang.invoke.LambdaForm$DMH/237640146.invokeStatic_LLIL_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/1332445213.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$MH/190252315.delegate(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/1759787595.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/505541004.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$255$579513$\^eval\_.L:4$jshint$JSHINT$L:10057$nud(<eval>:10146)
        java.lang.invoke.LambdaForm$DMH/1081907965.invokeStatic_LL_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/2122118945.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$reinvoker/1982661481.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/1918022864.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/719402320.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$248$517813IA$\^eval\_.L:4$jshint$JSHINT$expression(<eval>:7783)
        java.lang.invoke.LambdaForm$DMH/237640146.invokeStatic_LLIL_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/1332445213.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$MH/190252315.delegate(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/1759787595.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/505541004.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$255$579513$\^eval\_.L:4$jshint$JSHINT$L:10057$nud(<eval>:10146)
        java.lang.invoke.LambdaForm$DMH/1081907965.invokeStatic_LL_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/2122118945.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$reinvoker/1982661481.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/1918022864.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/719402320.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$248$517813IA$\^eval\_.L:4$jshint$JSHINT$expression(<eval>:7783)
        java.lang.invoke.LambdaForm$DMH/237640146.invokeStatic_LLIL_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/1332445213.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$MH/190252315.delegate(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/1759787595.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/505541004.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$247$559154AA$\^eval\_.L:4$jshint$JSHINT$L:9334(<eval>:9358)
        java.lang.invoke.LambdaForm$DMH/1676541147.invokeStatic_L4_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/1391012858.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$MH/1289747302.delegate(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/1427904760.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/1289747302.delegate(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/1427904760.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/1289747302.delegate(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/1427904760.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/1289747302.delegate(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/1427904760.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/1289747302.delegate(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/1427904760.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/850312068.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$225$525275A$\^eval\_.L:4$jshint$JSHINT$infix$led(<eval>:8044)
        java.lang.invoke.LambdaForm$DMH/2025179318.invokeStatic_L3_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/1754341197.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$MH/1438796530.delegate(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/935381552.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/1537529521.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$215$517813IZ$\^eval\_.L:4$jshint$JSHINT$expression(<eval>:7823)
        java.lang.invoke.LambdaForm$DMH/742706425.invokeStatic_LLII_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/1680729212.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$MH/1632416097.delegate(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/1793599655.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/641213252.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$212$535382$\^eval\_.L:4$jshint$JSHINT$statement(<eval>:8482)
        java.lang.invoke.LambdaForm$DMH/1081907965.invokeStatic_LL_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/2122118945.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$MH/678816083.delegate(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/1918022864.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/719402320.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$211$537831$\^eval\_.L:4$jshint$JSHINT$statements(<eval>:8525)
        java.lang.invoke.LambdaForm$DMH/1081907965.invokeStatic_LL_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/2122118945.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$reinvoker/1982661481.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/1918022864.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/719402320.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$Recompilation$116$633807AAA$\^eval\_.L:4$jshint$JSHINT$itself(<eval>:12144)
        java.lang.invoke.LambdaForm$DMH/699081454.invokeStatic_L5_I(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$BMH/5835392.reinvoke(LambdaForm$BMH)
        java.lang.invoke.LambdaForm$reinvoker/356005021.dontInline(LambdaForm$reinvoker)
        java.lang.invoke.LambdaForm$MH/765395380.guard(LambdaForm$MH)
        java.lang.invoke.LambdaForm$MH/800699328.linkToCallSite(LambdaForm$MH)
        jdk.nashorn.internal.scripts.Script$\^eval\_.:scopeCall(<eval>)
        jdk.nashorn.internal.scripts.Script$\^eval\_.:program(<eval>:12453)
        java.lang.invoke.LambdaForm$DMH/1081907965.invokeStatic_LL_L(LambdaForm$DMH)
        java.lang.invoke.LambdaForm$MH/1137719069.invokeExact_MT(LambdaForm$MH)
        jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:640)
        jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:228)
        jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
        jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:418)
        jdk.nashorn.api.scripting.NashornScriptEngine.access$300(NashornScriptEngine.java:73)
        jdk.nashorn.api.scripting.NashornScriptEngine$3.eval(NashornScriptEngine.java:511)
        javax.script.CompiledScript.eval(CompiledScript.java:92)
        javax.script.CompiledScript$eval$3.call(Unknown Source)
        com.ze.gradle.jshint.IncrementalJsHintTask$_execute_closure6.doCall(IncrementalJsHintTask.groovy:105)
        sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        java.lang.reflect.Method.invoke(Method.java:497)
        org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
        groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
        org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
        groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1019)
        groovy.lang.Closure.call(Closure.java:426)
        org.codehaus.groovy.runtime.ConvertedClosure.invokeCustom(ConvertedClosure.java:53)
        org.codehaus.groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:105)
        com.sun.proxy.$Proxy56.apply(Unknown Source)
        java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
        java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
        java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
        java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
        java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
        java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
        java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:747)
        java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:721)
        java.util.stream.AbstractTask.compute(AbstractTask.java:316)
        java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
        java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
        java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
        java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
        java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)


        REPRODUCIBILITY :
        This bug can be reproduced rarely.

          Activity

          Hide
          hannesw Hannes Wallnoefer added a comment -
          The fix is quite obvious, but I can't reproduce the issue with the information that is provided here. Even if we label this as noreg-hard (which we probably will have to) it would be nice to confirm the issue is fixed.
          Show
          hannesw Hannes Wallnoefer added a comment - The fix is quite obvious, but I can't reproduce the issue with the information that is provided here. Even if we label this as noreg-hard (which we probably will have to) it would be nice to confirm the issue is fixed.
          Hide
          hannesw Hannes Wallnoefer added a comment -
          I've tried to reproduce the issue running JSHint 2.6.3 on large sets like all our test files in parallel, but I didn't succeed. Anyway, the issue itself is quite easy to understand. PropertyMapListener contains a weak hashmap with WeakPropertyMapSet values, and while all access to that map is synchronized, the WeakPropertyMapSet values are copied/reused between PropertyMapListener instances. So it may be that one PropertyMapListener queries a WeakPropertyMapSet while it is being added to by another PropertyMapListener instance. The fix is simply to create new WeakPropertyMapSet when creating a new PropertyMapListener from an existing one.

          Since I can't provide a test for it I'm marking the issue as noreg-hard.
          Show
          hannesw Hannes Wallnoefer added a comment - I've tried to reproduce the issue running JSHint 2.6.3 on large sets like all our test files in parallel, but I didn't succeed. Anyway, the issue itself is quite easy to understand. PropertyMapListener contains a weak hashmap with WeakPropertyMapSet values, and while all access to that map is synchronized, the WeakPropertyMapSet values are copied/reused between PropertyMapListener instances. So it may be that one PropertyMapListener queries a WeakPropertyMapSet while it is being added to by another PropertyMapListener instance. The fix is simply to create new WeakPropertyMapSet when creating a new PropertyMapListener from an existing one. Since I can't provide a test for it I'm marking the issue as noreg-hard.
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/dev/nashorn/rev/ca4d50be062e
          User: hannesw
          Date: 2016-01-18 09:26:39 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/dev/nashorn/rev/ca4d50be062e User: hannesw Date: 2016-01-18 09:26:39 +0000
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/jdk9/nashorn/rev/ca4d50be062e
          User: lana
          Date: 2016-01-27 21:41:48 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/nashorn/rev/ca4d50be062e User: lana Date: 2016-01-27 21:41:48 +0000

            People

            • Assignee:
              hannesw Hannes Wallnoefer
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: