Bug 786980
Summary: | ConcurrentModificationException during resource deactivation on agent | ||
---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | Lukas Krejci <lkrejci> |
Component: | Plugin Container | Assignee: | Charles Crouch <ccrouch> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Mike Foley <mfoley> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 4.2 | CC: | ccrouch, hbrock, hrupp, mazz |
Target Milestone: | --- | ||
Target Release: | RHQ 4.3.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | 4.3 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-09-04 09:37:51 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 782579 |
Description
Lukas Krejci
2012-02-02 19:54:44 UTC
I was too quick to hit "Save", so here's some more info. This happened to me with a secured EAP resource that didn't have the credentials filled in in the connection settings, i.e. it was permanently down. Also I might have debugged another thread. Still this is a race condition that shouldn't occur. we've had several of these concurrent mod exceptions in the Inventory Manager over the years. It always had to do with things like looping through the collection of resources while another thread comes in and wants to modify the same collection. To solve, we typically copy the collection of resources prior to looping through them to allow another thread to come in and concurrent want to modify that collection. I'm sure if you search bugzilla for "rhq ConcurrentModificationException" you'll find them. Fixed in master by copying the members of the Set to an array and then iterating the array instead of the Set - http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commitdiff;h=4ef5591 However, there are a whole bunch more places where Resource.getChildResources() is directly iterated that need to be fixed similarly. We should create a BZ for finding all such occurrences and fixing them. Ian, any reason this can't go ON_QA, given we have https://bugzilla.redhat.com/show_bug.cgi?id=794790 for dealing with the other instances? Closing as this has been implemented for a long time. |