Bug 1269969 - ConcurrentRefUpdateException when selecting first version of a process
ConcurrentRefUpdateException when selecting first version of a process
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: jBPM Designer (Show other bugs)
Unspecified Unspecified
urgent Severity high
: CR1
: ---
Assigned To: Tihomir Surdilovic
Marián Macik
: Regression
Depends On:
Blocks: 1310712
  Show dependency treegraph
Reported: 2015-10-08 12:12 EDT by Zuzana Krejčová
Modified: 2018-01-30 18:39 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1310712 (view as bug list)
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
server log (37.18 KB, text/plain)
2015-10-08 12:12 EDT, Zuzana Krejčová
no flags Details
trying to reproduce (2.95 MB, video/quicktime)
2015-10-25 22:04 EDT, Tihomir Surdilovic
no flags Details
ConcurrentRefUpdateException (154.34 KB, text/plain)
2016-01-26 03:50 EST, Jozef Marko
no flags Details

  None (edit)
Description Zuzana Krejčová 2015-10-08 12:12:46 EDT
Created attachment 1081054 [details]
server log

Description of problem:
When user selects the first version of a process in the Designer (via Overview -> Version history), the editor freezes, fails to load. All subsequent attempts at opening a process in the Designer fail. The server log shows a ConcurrentRefUpdateException from jgit.

Version-Release number of selected component (if applicable):
6.2 ER3

Steps to Reproduce:
1. Create a new business process.
2. Add an end node to the start node already present. Save and close the Designer.
3. Reopen the process in the Designer, switch to Overview, Version History.
4. Select the first version of the process.

Actual results:
Designer switches to the Editor tab but the process does not load. Closing and reopening the process does not help. No other process opens in the Designer.
Server log contains ConcurrentRefUpdateException.

Expected results:
Designer loads and displays correctly the first version of the process, without getting stuck. There is no exception in the server log, other processes can be opened in the Designer.
Comment 2 Tihomir Surdilovic 2015-10-09 15:31:16 EDT
Hi I am unable to reproduce this issue. Could you by any chance provide your repository so I can test locally? Thanks!
Comment 4 Tihomir Surdilovic 2015-10-25 22:04:04 EDT
Testing on local builds of the workbench 6.3.x with designer 6.3.x this issue does not happen (with new or provided repo). Video attached. Please let me know how I can better reproduce this.
Comment 5 Tihomir Surdilovic 2015-10-25 22:04 EDT
Created attachment 1086357 [details]
trying to reproduce
Comment 6 Tihomir Surdilovic 2015-10-27 22:42:08 EDT
master: https://github.com/droolsjbpm/jbpm-designer/commit/4cb7e162470ca2d5bb8c525094c67e5851b9cdaf

6.3.x: https://github.com/droolsjbpm/jbpm-designer/commit/5281a8e52051852f985939514e3b1c95203dd3dd

Root of problem -- Designer creates the bpmn2 asset in the repository before it creates a number of helper assets such as color themes, default workitem icons etc. When reverting to the first commit those helper assets are not available within the file system seen and Designer fails to load.

Note on testing -- In order to test you should first create a new project and test inside this new project. You will not be able to test the fix on the default evaluation bpmn2 asset inside the Evaluation project. The reason for this is that the default repository that gets loaded is initially created by creating projects and assets and this was done before this fix. The default repository should be re-created at some point with a version of the workbench which includes Designer that has this fix but IMO this should be done in a separate BZ.


Note for testing (2): This fix fixed the selection and the "Revert"functionality in both the Overview widget *as well as* the Versions dropdown in the nav bar. Both had the same issue with selecting the first version and both should be tested.


How to test:
1) Create a new Project
2) Create a new process asset in this new project
3) Change created process and save  + close it
4) Reopen and from the Versions dropdown select the first version - process first version should be opened - the Save button changes to Revert - press the revert button and process should be saved correctly
5) Repeat step 4 however instead of using the Version dropdown, click on the Overview tab and select the first version of the process there. Save thing - the process first version should be loaded and press Revert to save .
Comment 8 Marián Macik 2015-11-04 11:45:18 EST
Now everything works as intended. Verified with 6.2.0.ER5.
Comment 9 Jozef Marko 2016-01-26 03:50 EST
Created attachment 1118388 [details]
Comment 10 Jozef Marko 2016-01-26 04:15:39 EST
I have to reopen this issue after more precise investigating.

Problem is still reproducible on 6.2.1.GA

Please follow these steps:

1. Create new organizational unit: myUnit
2. Create new repository myRepository, inside of myUnit
3. Crete new project myProject inside of myRepository
4. Create new business process myProcess inside of myProject
   ! but choose package "myunit.myproject" !
   ! do not choose <default> package !

5. Append EndEvent to StartEvent of myProcess
6. Save, Close and Reopen myProcess
7. Select Overview tab
8. Select initial version of myProcess
9. In server log will be: ConcurrentRefUpdateException attachment 1118388 [details]
10. Click Restore button
11. There will be message 'Unable to save' after ~10 seconds

In general there is problem with process version management.

If is user modeling some process, he can save his work more time without closing designer. But in this case, there is still only initial version of process under button for version change.

When is process closed and reopened, button for version change offers all older versions of process properly. But then if is selected older version and clicked Restore button, Restore button is not changed back to Save button and button for version change is not changed to 'Latest Version'
Comment 11 Kirill Gaevskii 2016-02-09 08:16:26 EST
Another way to meet this problem:

1. In any OrgUnit, package, project Create Business Process (BP).
2. Make some changes and save it
3. Reopen BP (see bug 1273056)
4. Make some changes
5. Without saving select older version
6. Change it
7. Without saving select newer version
8. Again change it
9. Without saving select older version
10. Browser is not answer any more.
11. Close browser and open again
12. Log in and go to Authoring Perspective

Actual Result:
You can not create, delete, save, rename, copy BP. Some times it is also not possible to open BP.
The only way to continue work is server restart. (which is not possible with CTRL+C, I am using "kill -9" command for server shutdown)

P.S. Still valid for 6.3.0 DR1
Comment 12 Lukáš Petrovický 2016-04-05 13:13:42 EDT
Due to the intermittent nature of the issue, I am removing the blocker flag and will propose this for 6.3.1.
Comment 13 Jeremy Lindop 2016-04-18 06:27:29 EDT
Fixed on master:

The use-case in Comment10 worked even before this commit, probably because of a change in the underlying handling of resources by uberfire.

The case in Comment11 is fixed because when the user selects a previous version in the Overview tab, the version is opened in read-only mode (whereas previously it was editable).

This commit also fixes the problem where if you select a previous version of a BP, then hit "Restore", the "Restore" button didn't change back to "Save".

Note You need to log in before you can comment on or make changes to this bug.