Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1415290 - A critical section read of the worker's heartbeat information was not protected with a mutex
Summary: A critical section read of the worker's heartbeat information was not protect...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: GA
: 5.8.0
Assignee: Joe Rafaniello
QA Contact: Tasos Papaioannou
URL:
Whiteboard: worker
Depends On:
Blocks: 1415332
TreeView+ depends on / blocked
 
Reported: 2017-01-20 18:52 UTC by Joe Rafaniello
Modified: 2017-08-16 15:19 UTC (History)
6 users (show)

Fixed In Version: 5.8.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1415332 (view as bug list)
Environment:
Last Closed: 2017-06-12 16:54:04 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:


Attachments (Terms of Use)

Description Joe Rafaniello 2017-01-20 18:52:58 UTC
Description of problem:

Summary:
A critical section access to the @workers hash was not protected with a read lock, meaning a read could occur while another thread was writing to it. Workers access @workers via a DRb thread running on the server process, while the server's main thread is also accessing it.

Note, this is probably not a huge problem because a slightly incorrect last_heartbeat value will probably not be something anyone would notice.

43e9676 Wrap critical @workers reads with a read lock
fbf7007 last_heartbeat is already nil, don't check it again
18a938f Add explanation of the missing stopping workers.
caf0e77 Initial worker heartbeat wasn't saving the record.
271856d Extract a method to read the last_heartbeat.

This is only partly related to this BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1395736.
This PR doesn't resolve that BZ. I'll let @gtanzillo @Fryguy decide if we need euwe/yes on this or if a new BZ is needed...

Comment 2 Joe Rafaniello 2017-01-20 18:53:36 UTC
Above description comes up the upstream pull request to fix this:
https://github.com/ManageIQ/manageiq/pull/12932

Comment 4 Tasos Papaioannou 2017-06-05 14:22:39 UTC
Verified in 5.8.0.17.


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