Bug 508137 - C++ QMF agent not connecting to broker under valgrind
C++ QMF agent not connecting to broker under valgrind
Status: CLOSED ERRATA
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-qmf (Show other bugs)
1.1.1
All Linux
low Severity medium
: 1.3
: ---
Assigned To: Ted Ross
Jan Sarenik
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-25 15:29 EDT by Matthew Farrellee
Modified: 2011-08-12 12:02 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
An agent that worked continuously would not show up in a broker when run under 'valgrind' due to a race condition. With this update, this behavior no longer occurs and an agent is visible in a broker when run under 'valgrind' as expected.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-10-14 12:16:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Matthew Farrellee 2009-06-25 15:29:13 EDT
Description of problem:

An agent that consistently works will consistently not show up in the broker when run under valgrind. Possible race condition.


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

$ rpm -q qpidc qmf
qpidc-0.5.752600-5.fc10.i386
qmf-0.5.752600-5.fc10.i386


How reproducible:

non-deterministic


Steps to Reproduce:
1. write a c++ agent
2. run it under valgrind
3. maybe with env QMF_TRACE=1 QPID_LOG_ENABLE=debug+
  

Additional info:

There may be a race in the agent, note the broker and interval.

2009-jun-25 15:12:09 info QMF Agent Initialized: broker=localhost:\x00\x00\x00\x00 interval=\x00\x00 storeFile=.storefile
2009-jun-25 15:12:10 debug QMF Agent attempting to connect to the broker...
2009-jun-25 15:12:10 debug Connection failed: exception=basic_filebuf::underflow error reading the file
2009-jun-25 15:12:12 debug QMF Agent attempting to connect to the broker...
2009-jun-25 15:12:12 debug Connection failed: exception=basic_filebuf::underflow error reading the file
2009-jun-25 15:12:16 debug QMF Agent attempting to connect to the broker...
2009-jun-25 15:12:16 debug Connection failed: exception=basic_filebuf::underflow error reading the file
2009-jun-25 15:12:24 debug QMF Agent attempting to connect to the broker...
2009-jun-25 15:12:24 debug Connection failed: exception=basic_filebuf::underflow error reading the file
2009-jun-25 15:12:40 debug QMF Agent attempting to connect to the broker...
2009-jun-25 15:12:40 debug Connection failed: exception=basic_filebuf::underflow error reading the file
2009-jun-25 15:13:12 debug QMF Agent attempting to connect to the broker...
2009-jun-25 15:13:12 debug Connection failed: exception=basic_filebuf::underflow error reading the file
2009-jun-25 15:14:16 debug QMF Agent attempting to connect to the broker...
2009-jun-25 15:14:16 debug Connection failed: exception=basic_filebuf::underflow error reading the file
2009-jun-25 15:16:24 debug QMF Agent attempting to connect to the broker...
2009-jun-25 15:16:24 debug Connection failed: exception=basic_filebuf::underflow error reading the file

Also, valgrind occasionally complains about.

==3619== Thread 3:
==3619== Syscall param select(timeout) points to uninitialised byte(s)
==3619==    at 0x7CF3D1: (within /lib/libc-2.9.so)
==3619==    by 0x40E7369:
qpid::management::ManagementAgentImpl::PublishThread::run() (in
/usr/lib/libqmfagent.so.0.1.0)
==3619==    by 0xC59BA0: (within /usr/lib/libqpidcommon.so.0.1.0)
==3619==    by 0x8A151E: start_thread (pthread_create.c:297)
==3619==    by 0x7D704D: clone (clone.S:130)
==3619==  Address 0x5b9d2b0 is on thread 3's stack
Comment 2 Ted Ross 2009-11-12 09:15:03 EST
I am unable to reproduce this symptom.  Several changes to the agent code have been made since the test version.  Are you still seeing this?

-Ted
Comment 3 Matthew Farrellee 2009-11-17 14:58:43 EST
I've not tried to reproduce lately.

If you think it was fixed along the way the bug should go MODI and get verified for 1.3.
Comment 5 Martin Prpič 2010-10-07 10:07:49 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
An agent that worked continuously would not show up in a broker when run under 'valgrind' due to a race condition. With this update, this behavior no longer occurs and an agent is visible in a broker when run under 'valgrind' as expected.
Comment 7 errata-xmlrpc 2010-10-14 12:16:04 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2010-0773.html
Comment 8 Jan Sarenik 2010-10-22 11:21:47 EDT
I used C++ qmf-agent to verify it is working.

python-qmf-0.7.946106-13.el5
python-qpid-0.7.946106-14.el5
qmf-devel-0.7.946106-17.el5
qmf-0.7.946106-17.el5
qpid-cpp-client-devel-0.7.946106-17.el5
qpid-cpp-client-0.7.946106-17.el5
qpid-cpp-server-0.7.946106-17.el5
qpid-tools-0.7.946106-11.el5

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