Ganesh Murthy created DISPATCH-646:
--------------------------------------

             Summary: Link route tests which test the drain feature fail 
intermittently
                 Key: DISPATCH-646
                 URL: https://issues.apache.org/jira/browse/DISPATCH-646
             Project: Qpid Dispatch
          Issue Type: Bug
          Components: Container
    Affects Versions: 0.8.0
            Reporter: Ganesh Murthy
            Assignee: Ted Ross


There is test called test_www_drain_support_all_messages in 
system_tests_link_routes that fails intermittently. Here is the output of the 
test
{noformat}
[gmurthy@localhost build]$  /usr/bin/python 
"/home/gmurthy/opensource/dispatch/build/tests/run.py" "-m" "unittest" "-v" 
"system_tests_link_routes.LinkRouteTest.test_www_drain_support_all_messages"
test_www_drain_support_all_messages (system_tests_link_routes.LinkRouteTest) 
... 
FAIL

======================================================================
FAIL: test_www_drain_support_all_messages 
(system_tests_link_routes.LinkRouteTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/gmurthy/opensource/dispatch/tests/system_tests_link_routes.py", 
line 542, in test_www_drain_support_all_messages
    self.assertEqual(None, drain_support.error)
AssertionError: None != 'Timeout Expired: sent: 10 rcvd: 7'

----------------------------------------------------------------------
Ran 1 test in 9.421s

FAILED (failures=1)
{noformat}

The test uses 3 routers (routers A, B and C) with router A acting as the broker 
and the senders and receivers connected router C and they send/receive on link 
routed addresses. The messages sent to router C are link-routed to router B and 
go on to router A and are eventually link routed back to router B and finally 
to a receiver attached to router C.

The sender sends 10 messages and the receiver initially issues a flow of 4 
followed by a drain of 20. This means that the remaining 6 messages must come 
thru to the receiver. The problem in that in router B, the 6 transfers from 
router A to router B are followed by a response flow frame (drain=true). In 
router B, this flow frame sometimes  gets ahead of the transfers and shuts down 
the remaining transfers.

The following frame trace shows the flow frame coming in from router C and 
being sent to router A which followed by 6 transfer frames and a response flow 
frame arriving from router A. Note now that the router B forwards 3 of the 6 
transfers to router C and tries sending the response flow frame before the 
remaining 3 transfers. Because of this the receiver is not seeing all 10 
messages.

{noformat}
Fri Mar  3 13:49:11 2017 SERVER (trace) [3]:4 <- @flow(19) [next-incoming-id=4, 
incoming-window=2147483647, next-outgoing-id=0, outgoing-window=2147483647, 
handle=0, delivery-count=4, link-credit=20, drain=true] 
(/home/gmurthy/opensource/dispatch/src/server.c:197)
Fri Mar  3 13:49:11 2017 ROUTER_CORE (trace) Core action 'link_flow' 
(/home/gmurthy/opensource/dispatch/src/router_core/router_core_thread.c:82)
Fri Mar  3 13:49:11 2017 SERVER (trace) [2]:0 -> @flow(19) [next-incoming-id=4, 
incoming-window=2147483647, next-outgoing-id=0, outgoing-window=2147483647, 
handle=0, delivery-count=4, link-credit=20, drain=true] 
(/home/gmurthy/opensource/dispatch/src/server.c:197)
Fri Mar  3 13:49:11 2017 SERVER (trace) [2]:0 <- @transfer(20) [handle=0, 
delivery-id=4, delivery-tag=b"\x04\x00\x00\x00\x00\x00\x00\x00", 
message-format=0, settled=true, more=false] (96) 
"\x00Sp\xd0\x00\x00\x00\x0b\x00\x00\x00\x05BP\x04@BR\x00\x00Ss\xd0\x00\x00\x00"\x00\x00\x00\x0d@@@@@@@@\x83\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00@R\x00@\x00St\xd1\x00\x00\x00\x0b\x00\x00\x00\x02\xa0\x03seqT\x04\x00Sw\xa0\x0bHello
 World" (/home/gmurthy/opensource/dispatch/src/server.c:197)
Fri Mar  3 13:49:11 2017 SERVER (trace) [2]:0 <- @transfer(20) [handle=0, 
delivery-id=5, delivery-tag=b"\x05\x00\x00\x00\x00\x00\x00\x00", 
message-format=0, settled=true, more=false] (96) 
"\x00Sp\xd0\x00\x00\x00\x0b\x00\x00\x00\x05BP\x04@BR\x00\x00Ss\xd0\x00\x00\x00"\x00\x00\x00\x0d@@@@@@@@\x83\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00@R\x00@\x00St\xd1\x00\x00\x00\x0b\x00\x00\x00\x02\xa0\x03seqT\x05\x00Sw\xa0\x0bHello
 World" (/home/gmurthy/opensource/dispatch/src/server.c:197)
Fri Mar  3 13:49:11 2017 SERVER (trace) [2]:0 <- @transfer(20) [handle=0, 
delivery-id=6, delivery-tag=b"\x06\x00\x00\x00\x00\x00\x00\x00", 
message-format=0, settled=true, more=false] (96) 
"\x00Sp\xd0\x00\x00\x00\x0b\x00\x00\x00\x05BP\x04@BR\x00\x00Ss\xd0\x00\x00\x00"\x00\x00\x00\x0d@@@@@@@@\x83\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00@R\x00@\x00St\xd1\x00\x00\x00\x0b\x00\x00\x00\x02\xa0\x03seqT\x06\x00Sw\xa0\x0bHello
 World" (/home/gmurthy/opensource/dispatch/src/server.c:197)
Fri Mar  3 13:49:11 2017 SERVER (trace) [2]:0 <- @transfer(20) [handle=0, 
delivery-id=7, delivery-tag=b"\x07\x00\x00\x00\x00\x00\x00\x00", 
message-format=0, settled=true, more=false] (96) 
"\x00Sp\xd0\x00\x00\x00\x0b\x00\x00\x00\x05BP\x04@BR\x00\x00Ss\xd0\x00\x00\x00"\x00\x00\x00\x0d@@@@@@@@\x83\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00@R\x00@\x00St\xd1\x00\x00\x00\x0b\x00\x00\x00\x02\xa0\x03seqT\x07\x00Sw\xa0\x0bHello
 World" (/home/gmurthy/opensource/dispatch/src/server.c:197)
Fri Mar  3 13:49:11 2017 SERVER (trace) [2]:0 <- @transfer(20) [handle=0, 
delivery-id=8, delivery-tag=b"\x08\x00\x00\x00\x00\x00\x00\x00", 
message-format=0, settled=true, more=false] (96) 
"\x00Sp\xd0\x00\x00\x00\x0b\x00\x00\x00\x05BP\x04@BR\x00\x00Ss\xd0\x00\x00\x00"\x00\x00\x00\x0d@@@@@@@@\x83\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00@R\x00@\x00St\xd1\x00\x00\x00\x0b\x00\x00\x00\x02\xa0\x03seqT\x08\x00Sw\xa0\x0bHello
 World" (/home/gmurthy/opensource/dispatch/src/server.c:197)
Fri Mar  3 13:49:11 2017 SERVER (trace) [2]:0 <- @transfer(20) [handle=0, 
delivery-id=9, delivery-tag=b"\x09\x00\x00\x00\x00\x00\x00\x00", 
message-format=0, settled=true, more=false] (96) 
"\x00Sp\xd0\x00\x00\x00\x0b\x00\x00\x00\x05BP\x04@BR\x00\x00Ss\xd0\x00\x00\x00"\x00\x00\x00\x0d@@@@@@@@\x83\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00@R\x00@\x00St\xd1\x00\x00\x00\x0b\x00\x00\x00\x02\xa0\x03seqT\x09\x00Sw\xa0\x0bHello
 World" (/home/gmurthy/opensource/dispatch/src/server.c:197)
Fri Mar  3 13:49:11 2017 SERVER (trace) [2]:0 <- @flow(19) [next-incoming-id=0, 
incoming-window=2147483647, next-outgoing-id=10, outgoing-window=2147483647, 
handle=0, delivery-count=24, link-credit=0, drain=true] 
(/home/gmurthy/opensource/dispatch/src/server.c:197)
Fri Mar  3 13:49:11 2017 SERVER (trace) [3]:4 -> @transfer(20) [handle=0, 
delivery-id=4, delivery-tag=b"\x04\x00\x00\x00\x00\x00\x00\x00", 
message-format=0, settled=true, more=false] (96) 
"\x00Sp\xd0\x00\x00\x00\x0b\x00\x00\x00\x05BP\x04@BR\x00\x00Ss\xd0\x00\x00\x00"\x00\x00\x00\x0d@@@@@@@@\x83\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00@R\x00@\x00St\xd1\x00\x00\x00\x0b\x00\x00\x00\x02\xa0\x03seqT\x04\x00Sw\xa0\x0bHello
 World" (/home/gmurthy/opensource/dispatch/src/server.c:197)
Fri Mar  3 13:49:11 2017 SERVER (trace) [3]:4 -> @transfer(20) [handle=0, 
delivery-id=5, delivery-tag=b"\x05\x00\x00\x00\x00\x00\x00\x00", 
message-format=0, settled=true, more=false] (96) 
"\x00Sp\xd0\x00\x00\x00\x0b\x00\x00\x00\x05BP\x04@BR\x00\x00Ss\xd0\x00\x00\x00"\x00\x00\x00\x0d@@@@@@@@\x83\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00@R\x00@\x00St\xd1\x00\x00\x00\x0b\x00\x00\x00\x02\xa0\x03seqT\x05\x00Sw\xa0\x0bHello
 World" (/home/gmurthy/opensource/dispatch/src/server.c:197)
Fri Mar  3 13:49:11 2017 SERVER (trace) [3]:4 -> @transfer(20) [handle=0, 
delivery-id=6, delivery-tag=b"\x06\x00\x00\x00\x00\x00\x00\x00", 
message-format=0, settled=true, more=false] (96) 
"\x00Sp\xd0\x00\x00\x00\x0b\x00\x00\x00\x05BP\x04@BR\x00\x00Ss\xd0\x00\x00\x00"\x00\x00\x00\x0d@@@@@@@@\x83\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00@R\x00@\x00St\xd1\x00\x00\x00\x0b\x00\x00\x00\x02\xa0\x03seqT\x06\x00Sw\xa0\x0bHello
 World" (/home/gmurthy/opensource/dispatch/src/server.c:197)
Fri Mar  3 13:49:11 2017 SERVER (trace) [3]:4 -> @flow(19) [next-incoming-id=0, 
incoming-window=2147483647, next-outgoing-id=7, outgoing-window=2147483647, 
handle=0, delivery-count=24, link-credit=0, drain=true] 
(/home/gmurthy/opensource/dispatch/src/server.c:197)
{noformat}







--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to