Created attachment 991351 [details] jstack output detecting 1 deadlock Description of problem: I managed to create deadlock in Workbench by deleting a project. After that it is not possible to log into Workbench and server never shuts down because of the deadlocked threads. Version-Release number of selected component (if applicable): 6.1.0.ER5 How reproducible: race condition? Steps to Reproduce: Not yet. Actual results: 1 deadlock reported by jstack, impossible to log into workbench, server does not shutdown. Expected results: Deadlock should be prevented. Additional info: In attached jstack report, look for deadlock section at the end, after full thread dump. It begins with: Found one Java-level deadlock: ============================= "http-localhost/127.0.0.1:8080-9": waiting to lock monitor 0x00007f2fec07a858 (object 0x00000000b7f6e5e0, a org.uberfire.io.impl.IOServiceNio2WrapperImpl), which is held by "http-localhost/127.0.0.1:8080-6" "http-localhost/127.0.0.1:8080-6": waiting for ownable synchronizer 0x00000000b7f6e7b0, (a java.util.concurrent.locks.ReentrantLock$FairSync), which is held by "Thread-92" "Thread-92": waiting to lock monitor 0x00007f2fec07a858 (object 0x00000000b7f6e5e0, a org.uberfire.io.impl.IOServiceNio2WrapperImpl), which is held by "http-localhost/127.0.0.1:8080-6" Followed by stack traces of the 3 blocked threads.
What version is this test has been executed with?
Description says 6.1.0.ER5
Created attachment 992815 [details] deadlock after cloning repository Also reproduced by cloning (large) repository in Workbench UI.
This happens quite frequently and complicates automated testing.
Quick remediation for deadlock: (6.2.x) https://github.com/droolsjbpm/kie-wb-common/commit/42fed0ff6c8ee4cd243e7032e36d543a714a1471 (6.2.x) https://github.com/droolsjbpm/guvnor/commit/ecfd8c640276a1d43d8ac40d6cb8b4cf5eae1183 (0.5.x) https://github.com/uberfire/uberfire-extensions/commit/26cbe36101df66b186e0cef074ca5e9b79cf93b7 (0.5.x) https://github.com/uberfire/uberfire/commit/87d19617e52caf7e7be74adddefdda1edf599fd7 (master) https://github.com/droolsjbpm/kie-wb-common/commit/ab8b9206b8e017e19d6544291f7ed82e33948162 (master) https://github.com/droolsjbpm/guvnor/commit/6959d2f75a66ea86d8d49d61f61dfe4752813072 (master) https://github.com/uberfire/uberfire-extensions/commit/e9fb8c545762ad3f4a7edbc2240fafcbb4276986 (0.6.x) https://github.com/uberfire/uberfire/commit/402670577d0ff5f56253175dc04d0389487a27ac
Some additional fixes: (6.2.x) https://github.com/droolsjbpm/kie-uberfire-extensions/commit/4f2dab1fbc05ffcc17201b01c34666fb2793fe7b (6.2.x) https://github.com/droolsjbpm/kie-uberfire-extensions/commit/a11866655a9b1a0094dc91bce44cb45b7678fb0c (master) https://github.com/droolsjbpm/kie-uberfire-extensions/commit/14735eb05d7e8e51ffcc6cb23db68764b68d7a10 (master) https://github.com/droolsjbpm/kie-uberfire-extensions/commit/87a897c10bcc918a4661c4ab9efba0e503214fff
Additional improvements, now double checked with cluster setup. (0.5.x) https://github.com/uberfire/uberfire/commit/9915770dd1d25369312b099055edc09b8b1f143b (0.6.x - future master) https://github.com/uberfire/uberfire/commit/d20895bd2a48a99bbe099b7ef4d2a3fb6cea282c (0.5.x) https://github.com/uberfire/uberfire-extensions/commit/9655be7d7b22bebfa69aff1cf2852629850266f7 (master) https://github.com/uberfire/uberfire-extensions/commit/66d85dd2d650d1c73239eb71477b8c496a13ab51 (6.2.x) https://github.com/droolsjbpm/guvnor/commit/5fce36c34 (master) https://github.com/droolsjbpm/guvnor/commit/2979fc11c (6.2.x) http://github.com/droolsjbpm/kie-wb-common/commit/eba805498 (master) http://github.com/droolsjbpm/kie-wb-common/commit/d3e30ba36
Created attachment 999961 [details] deadlock in ER6 We have hit the deadlock again in ER6. It happened only once so far and a different part of code seems to be affected this time. It happened during manipulation with managed repository modules. Let me know if more info is needed.
*** Bug 1194103 has been marked as a duplicate of this bug. ***
Additional improvements: (master) http://github.com/uberfire/uberfire/commit/f656d837f Here a change to remove a missing sync method: (master) http://github.com/droolsjbpm/kie-wb-common/commit/0ab922f2d
Pushed to product branches: (6.2.x) https://github.com/droolsjbpm/kie-wb-common/commit/0be965d088f0deee49f63cf0cd1391c32fe1efda (0.5.x) https://github.com/droolsjbpm/kie-wb-common/commit/0be965d088f0deee49f63cf0cd1391c32fe1efda
Not observed in CRx builds.