Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 527451

Summary: failover_soak test is losing messages.
Product: Red Hat Enterprise MRG Reporter: Alan Conway <aconway>
Component: qpid-cppAssignee: mick <mgoulish>
Status: CLOSED ERRATA QA Contact: Frantisek Reznicek <freznice>
Severity: urgent Docs Contact:
Priority: high    
Version: DevelopmentCC: esammons, freznice, mgoulish
Target Milestone: 1.3Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-20 11:29:58 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: 577362    
Bug Blocks:    

Description Alan Conway 2009-10-06 13:15:39 UTC
Description of problem:

Running src/tests/run_failover_soak in a loop I see a client error like this:
Error: gap in sequence between 214365 and 215680
I'm seeing it about once per 100 runs of run_failover_soak.

How reproducible:

About once every 100 runs of run_failover_soak

Steps to Reproduce:

I run this script with nohup so it can run with no terminal: 
                                                                                
while true; do
    ../../../cpp/src/tests/run_failover_soak 2>&1 || {
        # Save logs of a failed test.                                                                                                                                                   
        DIR=`date +soak-failed-logs.%F.%T`
        mkdir -p $DIR && mv soak-*.log $DIR
        echo SAVED LOGS IN $DIR
    }
done

Actual results:

Find the above error in the logs.

Expected results:

no errors

Additional info:

Comment 2 mick 2009-12-17 09:30:49 UTC
With a newer version of the code, I cannot reproduce this.

After 1033 runs of failover_soak  ( 300,000 messages per run, 7 broker-kills per run )  I have no occurrences.  

Also, I modified replaying_sender.cpp ( which failover_soak uses ) to deliberately drop one message per run, so I could be certain that I am detecting dropped messages.   All of those were detected, but no others.


I plan to use this bug as the first of a class of perma-tests.  I will leave it running indefinitely, subject to availability of hardware, only bringing it down weekly to update the source code and rebuild.  I will re-open this bug or submit a new one.

Comment 3 mick 2009-12-18 13:55:53 UTC
I had an instance of messages dropped, while running failover_soak on mrg8:
one instance in 1500 runs  ( 300,000 message, 10-broker runs )

At the same time, Alan Conway found a flaw in MessageReplayTracker that may explain the losses.  

Refreshing code and restarting test now.

Comment 4 mick 2010-01-27 07:25:26 UTC
Alan's change to MessageReplayTracker has fixed this.

3000 iterations of failover_soak ( 30,000 total broker-kills, 9e8 total messages ) with no messages dropped.

Each run did detect the messages that was deliberately dropped -- but no others.



TO REPRODUCE:

0. have openais running.
0.5 follow usual steps to be able to run a clustered broker.
1. go to qpid/cpp/src/tests
2. build declare_queues failover_soak replaying_sender and resuming_receiver
3. run the script  run_failover_soak  repeatedly with the script included below.
4. tail -f the "overview" results file.
5. The "Total Gaps" line should always say "0".


Here is the script I used.  ( Except I have altered it to remove the counting of "expected gaps" because I do not want to check the change that would require into replaying_sender.cpp )


---- BEGINNING OF SCRIPT -------
#! /bin/csh

rm -f ./results
mkdir ./results
rm -f ./overview

set count=0
while ( $count < 3000 )
  clear
  echo "============================================================="
  echo " run $count "
  echo "============================================================"
  ./run_failover_soak |& tee results/$count
  echo " "
  echo " "
  echo " "
  echo " "
  echo " "
  echo " "
  echo " ------------------------- run $count complete ------------------------"
  # Gaps Report =======================================
  echo -n "Total gaps: "
  grep gap results/* | grep -v "no gaps" | wc -l
  # Gaps Report to overview file   ====================
  echo "====================================="      >> overview
  date                                              >> overview
  echo -n "Total gaps: "                            >> overview
  grep gap results/* | grep -v "no gaps" | wc -l    >> overview
  @ count = ($count + 1)
end

----- END OF SCRIPT ---------



also, here is how I modified run_failover_soak ( which is a file already checked into qpid/cpp/src/tests )

-------- BEGINNING OF run_failover_soak -------------
#!/bin/sh

source ./test_env.sh
. $srcdir/ais_check
  
host=127.0.0.1
  
unset QPID_NO_MODULE_DIR        # failover_soak uses --module-dir, dont want clash
MODULES=${MODULES:-$moduledir}
MESSAGES=${MESSAGES:-300000}
REPORT_FREQUENCY=${REPORT_FREQUENCY:-10000}
VERBOSITY=${VERBOSITY:-10}
DURABILITY=${DURABILITY:-0} 
N_QUEUES=${N_QUEUES:-1}
N_BROKERS=${N_BROKERS:-3}

rm -f soak-*.log
exec ./failover_soak $MODULES ./declare_queues ./replaying_sender ./resuming_receiver $MESSAGES $REPORT_FREQUENCY $VERBOSITY $DURABILITY $N_QUEUES $N_BROKERS

-------- END OF run_failover_soak -------------------

Comment 5 Frantisek Reznicek 2010-06-01 08:08:04 UTC
Test is ongoing, few more days needed, so far no gap / loast message seen.

Comment 6 Frantisek Reznicek 2010-06-04 08:27:23 UTC
Currectly stuck on bug 577362, marking as blocker for this issue.

Comment 7 Frantisek Reznicek 2010-09-08 14:46:41 UTC
The issue is proved to be fixed (no lost messages over few days cycling the test), retested on RHEL 5.5 i386 / x86_64 on packages:
python-qmf-0.7.946106-12.el5
python-qpid-0.7.946106-13.el5
qmf-0.7.946106-12.el5
qmf-devel-0.7.946106-12.el5
qpid-cpp-*-0.7.946106-12.el5
qpid-dotnet-0.4.738274-2.el5
qpid-java-*-0.7.946106-8.el5
qpid-tests-0.7.946106-1.el5
qpid-tools-0.7.946106-10.el5
ruby-qmf-0.7.946106-12.el5

-> VERIFIED