jtulach commented on pull request #3136:
URL: https://github.com/apache/netbeans/pull/3136#issuecomment-908820088


   Hello Neil, this is 3rd or 4th version of my reply. Sometimes I agree, 
sometimes I don't...
   
   This PR clearly fixes 
[something](https://github.com/apache/netbeans/pull/3136/commits/9227546960199ecec44755a03cce6f1d59ade69d)
 (as shown by the test). Whether that is enough to address the problem of [this 
deadlock](https://issues.apache.org/jira/secure/attachment/13032558/13032558_12.5-beta2-threaddump-1629986898821.tdump):
   ```
        at 
org.netbeans.modules.projectapi.LazyLookupProviders$1Prov$1.beforeLookup(LazyLookupProviders.java:84)
        - locked <0x00000000cf989400> (a [Ljava.lang.Thread;)
        at 
org.openide.util.lookup.ProxyLookup.beforeLookup(ProxyLookup.java:268)
   ``` 
   remains to be seen. There is:
   ```
   "org.netbeans.modules.project.ui.actions.LookupSensitiveAction" #51 daemon 
prio=1 os_prio=-2 cpu=46.88ms elapsed=78.28s tid=0x0000000031c145b0 nid=0x1f3c 
waiting for monitor entry  [0x0000000047bce000]
      java.lang.Thread.State: BLOCKED (on object monitor)
        at 
org.netbeans.spi.project.support.DelegatingLookupImpl.doDelegate(DelegatingLookupImpl.java:100)
        - waiting to lock <0x00000000cf989738> (a java.util.ArrayList)
        at 
org.netbeans.spi.project.support.DelegatingLookupImpl.resultChanged(DelegatingLookupImpl.java:84)
        at org.openide.util.lookup.ProxyLookup$1Notify.run(ProxyLookup.java:239)
        at org.openide.util.lookup.ProxyLookup.setLookups(ProxyLookup.java:248)
        at org.openide.util.lookup.ProxyLookup.setLookups(ProxyLookup.java:184)
        at 
org.netbeans.modules.projectapi.LazyLookupProviders$1Prov$1.beforeLookup(LazyLookupProviders.java:97)
   ```
   which would at the end notify the other waiters in 
`LazyLookupProviders$1Prov$1`. Right now it is blocked, but with changes in 
this PR it might become free. If not, then the next thing to tackle is
   ```
        at org.openide.util.lookup.ProxyLookup.setLookups(ProxyLookup.java:184)
        at 
org.netbeans.spi.project.support.DelegatingLookupImpl.doDelegate(DelegatingLookupImpl.java:168)
        - locked <0x00000000cf989738> (a java.util.ArrayList)
        at 
org.netbeans.spi.project.support.DelegatingLookupImpl.resultChanged(DelegatingLookupImpl.java:84)
   ```
   e.g. eliminate call to `setLookups` under the lock `0x00000000cf989738`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to