Bug 1045095 - Incremental build fails intermittently when creating a new project
Summary: Incremental build fails intermittently when creating a new project
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ER1
: 6.0.2
Assignee: Toni Rikkola
QA Contact: Zuzana Krejčová
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-19 15:16 UTC by Zuzana Krejčová
Modified: 2016-08-01 01:08 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-06 19:54:52 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1055632 0 unspecified CLOSED Incremental build may fail with ConcurrentModificationException 2021-02-22 00:41:40 UTC

Internal Links: 1055632

Description Zuzana Krejčová 2013-12-19 15:16:44 UTC
Description of problem:
When creating a new project, incremental build is requested. 6 times. Sometimes, some of these builds can fail. Fortunately, this isn't a problem since nothing breaks in the GUI at this point, but it creates an unnecessary and confusing mess in the server log:

  ERROR [org.uberfire.backend.server.AbstractWatchService] (org.uberfire.backend.server.IOWatchServiceNonDotImpl(WatchService{FileSystem=git://localhost:9418/test})) Unexpected error during WatchService events fire.: org.guvnor.common.services.shared.exceptions.GenericPortableException
(No further information is given in the message, no 'Caused by' section.)

  WARN  [org.drools.compiler.kie.builder.impl.AbstractKieModule] (pool-14-thread-1) No files found for KieBase defaultKieBase

  ERROR [org.guvnor.common.services.builder.BuildServiceImpl] (pool-14-thread-1)  : input contained no data: com.thoughtworks.xstream.io.StreamException:  : input contained no data
...
  Caused by: java.io.EOFException: input contained no data
...
  ERROR [org.guvnor.common.services.builder.ResourceChangeIncrementalBuilder] (pool-14-thread-1)  : input contained no data: org.guvnor.common.services.shared.exceptions.GenericPortableException:  : input contained no data


What actually happens is this:
1. File kmodule.xml is created, with no content. Commit is made with this.
2. This triggers an incremental build.
3. Initial content is written to kmodule.xml and comitted.
4. This, again, triggers an incremental build.

5. File pom.xml is created, with no content, commited to git.
6. Incremental build.
7. Initial content is written to pom.xml and comitted.
8. Incremental build.

9. File project.imports created, no content, commit.
10. Incremental build.
11. Initial content written to project.imports, commitd.
12. Incremental build.


What, I think, causes these errors:
Sometimes, in steps 2, 6 & 10, the incremental build actually happens after the next step (3, 7, 11) - so the app manages to put the right valid content into the file, or perhaps the incremental build happens after all is done - all files created and with valid content. Then it is ok and you see no errors.
BUT - sometimes, the requested inc. build is run BEFORE that. And you try to build project with empty pom.xml, project.imports or kmodule.xml. In that case, those files are invalid and so the inc. build fails.


I'd like to propose this:
If at all possible, don't request inc. build for a project that is still being created. Perhaps simply doing one commit for all of this, or at least only one commit per file would suffice (related issue in bug 1021406).


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

Comment 1 manstis 2013-12-19 19:13:08 UTC
Toni, this should be addressed by use of the batch-commit when saving/creating a Project (that I think you've completed).

Comment 2 Toni Rikkola 2014-03-11 10:37:40 UTC
All the files for the project are now committed in one go.

Comment 3 Zuzana Krejčová 2014-05-22 14:35:28 UTC
Verified with ER2 - one commit per new project, haven't seen any failed incremental build.


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