Bug 508137 - C++ QMF agent not connecting to broker under valgrind
Summary: C++ QMF agent not connecting to broker under valgrind
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-qmf
Version: 1.1.1
Hardware: All
OS: Linux
low
medium
Target Milestone: 1.3
: ---
Assignee: Ted Ross
QA Contact: Jan Sarenik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-06-25 19:29 UTC by Matthew Farrellee
Modified: 2011-08-12 16:02 UTC (History)
2 users (show)

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.
Clone Of:
Environment:
Last Closed: 2010-10-14 16:16:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2010:0773 0 normal SHIPPED_LIVE Moderate: Red Hat Enterprise MRG Messaging and Grid Version 1.3 2010-10-14 15:56:44 UTC

Description Matthew Farrellee 2009-06-25 19:29:13 UTC
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 14:15:03 UTC
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 19:58:43 UTC
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 14:07:49 UTC
    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 16:16:04 UTC
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 15:21:47 UTC
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.