Bug 1323572 - AsyncWatchService dies when a RuntimeException is thrown from IOWatchServiceExecutorImpl.execute()
Summary: AsyncWatchService dies when a RuntimeException is thrown from IOWatchServiceE...
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: CR1
: 6.3.0
Assignee: manstis
QA Contact: Jiri Locker
URL:
Whiteboard:
Depends On:
Blocks: 1323878
TreeView+ depends on / blocked
 
Reported: 2016-04-04 07:06 UTC by Toshiya Kobayashi
Modified: 2020-03-27 19:03 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1323878 (view as bug list)
Environment:
Last Closed: 2020-03-27 19:03:58 UTC
Type: Bug


Attachments (Terms of Use)
throwRuntimeExceptionIOService.rule (168 bytes, text/plain)
2016-04-04 07:06 UTC, Toshiya Kobayashi
no flags Details
throwRuntimeExceptionIOServiceOnProjectDeleteBRMS622.rule (196 bytes, text/plain)
2016-04-08 07:13 UTC, Toshiya Kobayashi
no flags Details
throwRuntimeExceptionIOServiceOnProjectDeleteBRMS630.rule (204 bytes, text/plain)
2016-04-29 10:11 UTC, Jiri Locker
no flags Details

Description Toshiya Kobayashi 2016-04-04 07:06:38 UTC
Created attachment 1143195 [details]
throwRuntimeExceptionIOService.rule

Description of problem:

AsyncWatchService dies when a RuntimeException is thrown from IOWatchServiceExecutorImpl.execute().

So you will see problems like:

- Incremental build is not triggered
- A newly created Data Object is not listed in Guided Rule editor
etc...

1. Start BRMS 6.2.2.
2. Log in to business-central
3. Create a Data Object (e.g. 'Pojo1') in pacakge "org.kie.example.project1" in "project1" in "repository1"
4. Save
5. Confirm ResourceChangeIncrementalBuilder log
====
15:37:55,326 INFO  [org.guvnor.common.services.builder.ResourceChangeIncrementalBuilder] (Thread-101) Incremental build request received for: default://master@repository1/project1/src/main/java/org/kie/example/project1/Pojo1.java (added).
====
6. Create a Guided Rule (e.g. 'gr1') in the same package
7. Click the plus icon in the right side of WHEN.
8. Confirm that 'Pojo1' is listed.
9. Enable the attached Byteman rule "throwRuntimeExceptionIOService.rule"
$ bin/bminstall.sh <PID>
$ bin/bmsubmit.sh -l throwRuntimeExceptionIOService.rule
10. Create a new project (e.g. 'project2')
 -> It throws a RuntimeException by the attached Byteman rule 
11. Disable the Byteman rule
$ bin/bmsubmit.sh -u throwRuntimeExceptionIOService.rule
12. Go back to 'project1'
13. Create a Data Object (e.g. 'Pojo2') in pacakge "org.kie.example.project1" in "project1" in "repository1"
14. Save
15. Create a Guided Rule (e.g. 'gr2') in the same package
16. Click the plus icon in the right side of WHEN.
17. Confirm if 'Pojo2' is listed.

Actual results:

- ResourceChangeIncrementalBuilder log is no longer printed
- 'Pojo2' is not listed in Guided Rule Editor

Expected results:

- ResourceChangeIncrementalBuilder log is printed
- 'Pojo2' is listed in Guided Rule Editor

Comment 3 Toshiya Kobayashi 2016-04-08 07:13:23 UTC
Created attachment 1145031 [details]
throwRuntimeExceptionIOServiceOnProjectDeleteBRMS622.rule

Comment 4 Toshiya Kobayashi 2016-04-08 07:21:03 UTC
[IMPORTANT]

Here is a new reproduce step which is closer to the real issue. Please use this instead.

1. Start BRMS 6.2.2.
2. Log in to business-central
3. Create a Data Object (e.g. 'Pojo1') in pacakge "org.kie.example.project1" in "project1" in "repository1"
4. Save
5. Confirm ResourceChangeIncrementalBuilder log
====
15:37:55,326 INFO  [org.guvnor.common.services.builder.ResourceChangeIncrementalBuilder] (Thread-101) Incremental build request received for: default://master@repository1/project1/src/main/java/org/kie/example/project1/Pojo1.java (added).
====
6. Create a Guided Rule (e.g. 'gr1') in the same package
7. Click the plus icon in the right side of WHEN.
8. Confirm that 'Pojo1' is listed.
9. Create a new project (e.g. 'project2')
10. Enable the attached Byteman rule "throwRuntimeExceptionIOServiceOnProjectDeleteBRMS622.rule"
$ bin/bminstall.sh <PID>
$ bin/bmsubmit.sh -l throwRuntimeExceptionIOServiceOnProjectDeleteBRMS622.rule
11. Delete the new project
 -> It throws a RuntimeException by the attached Byteman rule 
12. Disable the Byteman rule
$ bin/bmsubmit.sh -u throwRuntimeExceptionIOServiceOnProjectDeleteBRMS622.rule
13. Go back to 'project1'
14. Create a Data Object (e.g. 'Pojo2') in pacakge "org.kie.example.project1" in "project1" in "repository1"
15. Save
16. Create a Guided Rule (e.g. 'gr2') in the same package
17. Click the plus icon in the right side of WHEN.
18. Confirm if 'Pojo2' is listed.

Actual results:

- ResourceChangeIncrementalBuilder log is no longer printed
- 'Pojo2' is not listed in Guided Rule Editor

Expected results:

- ResourceChangeIncrementalBuilder log is printed
- 'Pojo2' is listed in Guided Rule Editor

Comment 5 Toshiya Kobayashi 2016-04-08 07:41:18 UTC
Sent a PR
https://github.com/uberfire/uberfire/pull/343

Confirmed that it fixes the issue in BRMS 6.2.2.

Comment 7 Edson Tirelli 2016-04-19 14:40:39 UTC
Michael, can you confirm if this was merged into 6.4.x? If not, can you please do it?

Comment 10 Jiri Locker 2016-04-29 10:11:21 UTC
Created attachment 1152207 [details]
throwRuntimeExceptionIOServiceOnProjectDeleteBRMS630.rule

Successfully reproduced with 6.3.0 ER3 and this slightly modified rule.

Comment 11 Jiri Locker 2016-04-29 10:18:38 UTC
Fix verified in BRMS 6.3.0 CR1.


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