Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1057079

Summary: Intermittent exceptions when creating a new business process
Product: [Retired] JBoss BPMS Platform 6 Reporter: Zuzana Krejčová <zkrejcov>
Component: jBPM DesignerAssignee: Tihomir Surdilovic <tsurdilo>
Status: CLOSED CURRENTRELEASE QA Contact: Zuzana Krejčová <zkrejcov>
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: kverlaen, lpetrovi, mbaluch, zkrejcov
Target Milestone: ER1   
Target Release: 6.0.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 19:49:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
part of the server log covering the process creation, showing the whole stacktrace none

Description Zuzana Krejčová 2014-01-23 12:41:19 UTC
Created attachment 854367 [details]
part of the server log covering the process creation, showing the whole stacktrace

Description of problem:
When creating a new business process, using the Designer, sometimes you get these in the server log:
ERROR [stderr] org.uberfire.java.nio.IOException: java.lang.RuntimeException: org.eclipse.jgit.api.errors.ConcurrentRefUpdateException: Could not lock HEAD. RefUpdate return code was: LOCK_FAILURE
ERROR [stderr] 	at org.uberfire.java.nio.fs.jgit.JGitFileSystemProvider.createDirectory(JGitFileSystemProvider.java:892)
ERROR [stderr] 	at org.jbpm.designer.repository.vfs.VFSRepository.createIfNotExists(VFSRepository.java:523)
ERROR [stderr] 	at org.jbpm.designer.repository.vfs.VFSRepository.createAsset(VFSRepository.java:341)
...

Followed by:
ERROR [org.jbpm.designer.web.preprocessing.impl.JbpmPreprocessingUnit]  java.lang.RuntimeException: org.eclipse.jgit.api.errors.ConcurrentRefUpdateException: Could not lock HEAD. RefUpdate return code was: LOCK_FAILURE
ERROR [org.jbpm.designer.web.preprocessing.impl.JbpmPreprocessingUnit] java.lang.RuntimeException: java.lang.RuntimeException: java.io.IOException: Creating directory /home/zkrejcov/.niogit/repository1.git/objects/d7 failed
ERROR [org.jbpm.designer.web.preprocessing.impl.JbpmPreprocessingUnit]  java.io.IOException: Creating directory /home/zkrejcov/.niogit/repository1.git/objects/0a failed
and similar. The process is created anyway.


Version-Release number of selected component (if applicable):
BPMS 6.0  CR1

Comment 1 Alexandre Porcelli 2014-02-28 12:29:30 UTC
I've been trying to reproduce but I couldn't... can you provide more info how to? Maybe more info about OS, browser...

Comment 2 Zuzana Krejčová 2014-02-28 13:33:53 UTC
(In reply to Alexandre Porcelli from comment #1)
> I've been trying to reproduce but I couldn't... can you provide more info
> how to? Maybe more info about OS, browser...

These messages appear with the addition of various *.fw, *.png, *.json and such files to 'global' folder (which is a by product of creating a new process):

14:15:35,708 INFO  [org.guvnor.common.services.builder.ResourceChangeIncrementalBuilder] (org.uberfire.backend.server.IOWatchServiceNonDotImpl(WatchService{FileSystem=git://localhost:9418/repository1
ssh://localhost:8001/repository1})) Incremental build request received for: default://master@repository1/project1/global/backbonejsinclude.fw (added).
14:15:35,740 ERROR [org.jbpm.designer.web.preprocessing.impl.JbpmPreprocessingUnit] (http-/127.0.0.1:8080-5) org.eclipse.jgit.api.errors.ConcurrentRefUpdateException: Could not lock HEAD. RefUpdate return code was: LOCK_FAILURE

Description of ConcurrentRefUpdateException:
"Exception thrown when a command wants to update a ref but failed because another process is accessing (or even also updating) the ref."

There is a lot of files being created at pretty much the same time, or so close to each other (time-wise) that it might seem like concurrent access.

It is possible that you won't see this if you already have a process in your project, created via the business-central - because in such a case, you will probably already have all those files in the 'global' folder.

Comment 3 Alexandre Porcelli 2014-02-28 18:42:02 UTC
Asked Tiho to add batch updates in order to avoid multiple commits (and avoid git corruptions).

Comment 4 Tihomir Surdilovic 2014-03-03 15:13:57 UTC
added batch updates for preprocessing steps. commits in master and 6.0.x designer branches

Comment 5 Zuzana Krejčová 2014-05-22 14:06:18 UTC
Verified with ER2.