Bug 1123375 - Unexpected child set message in agent debug logs
Summary: Unexpected child set message in agent debug logs
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Agent
Version: JON 3.2
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ER02
: JON 3.3.0
Assignee: Jay Shaughnessy
QA Contact: Sunil Kondkar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-25 13:03 UTC by Jay Shaughnessy
Modified: 2014-12-11 14:00 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-12-11 14:00:48 UTC
Type: Bug


Attachments (Terms of Use)

Description Jay Shaughnessy 2014-07-25 13:03:00 UTC
This is a JON bug for the issue described in Bug 801432 Comment 18:

"...I stumbled onto the log message added for Bug 801432 (see also Bug 807465).  In my agent log I saw messages like this when uninventorying resources:

2014-07-24 09:05:41,859 DEBUG [WorkerThread#0[127.0.0.1:54666]] (rhq.core.pc.inventory.InventoryManager)- [BZ 801432]
java.lang.Exception: Unexpected child set - if you see this, please notify support or log it in bugzillajava.util.HashSet:10230:test-simple.war
	at org.rhq.core.pc.inventory.InventoryManager.removeResourceAndIndicateIfScanIsNeeded(InventoryManager.java:1551)


This is a problem because it means that we are perhaps more susceptible to ConcurrentModificationException than we may have thought.  This indicates that we are working with HashSet when we are expecting to have the child resources in a safer Set impl."


The issue has been fixed upstream.  This is to track the fix for a JON release.  I would recommend 3.3 as it could prevent a troublesome ConcurrentModificationException.

Comment 1 Jay Shaughnessy 2014-08-22 20:22:06 UTC
commit 2d0cbf1e1a1d7bb9484eff06059a02ce14935bb2
Author: Jay Shaughnessy <jshaughn@redhat.com>
Date:   Fri Aug 22 16:20:46 2014 -0400

    [801432, 807465] Related Issue to these BZs
    Uninventory triggered our "assert-style" debug logging indicating that we
    were working with HashSet for child resources when we expected to be using
    a safer Set impl (wrt preventing ConcurrentModoficationException). There
    were a few issues in play:
    - When loading persisted resources from disk convert childResources to
      CopyOnWriteArraySet if necessary.  This repairs resources persisted with
      the wrong Set impl.
    - Eliminate some potential concurrent modification danger (or, at a minimum,
    - Fix a couple of other places where we weren't using CopyOnWriteArraySet
    - Fix Resource entity to ensure that when customChildResourcesCollection=tru
      that the childResources Set is truly protected. It was here that we were
      losing the proper Set impl.
      some unnecessary work) by only calling deactivateResource() on the root
      resource. It recursively deactivates the subtree, so no need to then call
      it on every node in the subtree.
    - Fix our "assert-logging" conditional, which despite finding this issue was
      actually looking for the wrong set impl. It had not been updated when we
      moved to CopyOnWriteArraySet.

    Cherry-Pick master 3e47741694b55fedecf9c904d89de11a7b92ccb2

Comment 2 Simeon Pinder 2014-09-03 20:31:25 UTC
Moving to ON_QA as available for test with the following brew build:
https://brewweb.devel.redhat.com//buildinfo?buildID=381194

Comment 3 Sunil Kondkar 2014-09-11 15:12:19 UTC
Verified on version :3.3.0.ER02 Build Number :4fbb183:7da54e2


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