This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
see attached file
Created attachment 54316 [details] Stack traces
It seems two thread : GSF Source Worker Thread ( compilation task ) and AWT-EventQueue-1 ( formatting task ) tries to access on Swing Document resource and PHP model simultaneously but is different order. GSF call PHP model for sync and inside sync one calls lock on Swing Document. But it seems foramtter locks OM having lock on Swing Document. So we need to resolve this dead lock. Possibly sync() should lock Swing document firstly and perform all his work under this lock. But we cannot avoid situation when someone call Swing document lock inside PHP Model lock. So this situation need more deep investigation.
I don't see any other solution for problem except placing "sync" inside "render" method of Swing Document. As I already said this can still lead to deadlock when one perform locked reading or writing in Document OM lock holding. But this will be a problem of OM client. I place this warning into JavaDoc for OM locks method. There is one more simple solution for this problem : remove OM lock at all and base only on Swing Document lock. But this is not good decision from my point of view.
Please provide steps to reproduce. I have just only my vision on this issue and provide fix for this. But I'm not sure that the essence of this deadlock is exactly what I'm thinking.
Checking in php/srcmodel/src/org/netbeans/modules/php/model/PhpModel.java; /cvs/scripting/php/srcmodel/src/org/netbeans/modules/php/model/PhpModel.java,v <-- PhpModel.java new revision: 1.9; previous revision: 1.8 done Checking in php/srcmodel/src/org/netbeans/modules/php/model/impl/PhpModelImpl.java; /cvs/scripting/php/srcmodel/src/org/netbeans/modules/php/model/impl/PhpModelImpl.java,v <-- PhpModelImpl.java new revision: 1.16; previous revision: 1.15 done
I am sorry, but I cannot reproduce the issue too.