Protocol or buffering problem

Bug #318529 reported by Dan Di Spaltro
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
txAMQP
Fix Released
Undecided
Esteve Fernandez

Bug Description

First off this problem happens occurs more likely over the internet than on a LAN (I actually have been unable to reproduce the problem with a rabbitmq server locally). If I create a simple service in thrift that handles one command, ping, which is just a simple command marked 'void ping()' in thrift service, and I blast around 2000 messages, 200 at a time, I get a frame unpacking error, it looks like during the _frameUnpack function the data that gets passed in is a 1 byte string and so the decode_octect function returns a null character which the spec fails to return a valid message type . I have attached the logs of the error, I am not sure where to fix this exactly, I will update you on any progress I make. Thanks!

Related branches

Revision history for this message
Dan Di Spaltro (dan-dispaltro) wrote :
Changed in txamqp:
assignee: nobody → esteve-fernandez
Revision history for this message
Esteve Fernandez (esteve) wrote :

Sorry for the late response, somehow this report slipped through my e-mail. Anyway, could you test https://code.launchpad.net/~txamqpteam/txamqp/318529-unpack-frame?

I'm not sure if I like how I tried to fix it, but I think it should do the trick for the time being.

Thanks!

Revision history for this message
Dan Di Spaltro (dan-dispaltro) wrote :

Okay the example seems to throw an error now with the tutorial stuff. Seems that this style of creation is incorrect now. (I am using trunk by the way)
w = Work({'num1': 2, 'num2': 3, 'op': Operation.ADD})

Just an FYI, the below works now. They updated the included tutorial example code.
w = Work(num1=2, num2=3, op= Operation.DIVIDE)

Anyways, the problem seems to be fixed! Thanks for the solution you may want to double check it but it seems sound. It is also hard to tell since I am now using the v4 patch you released + updated thrift... so many moving parts.

Revision history for this message
Esteve Fernandez (esteve) wrote :

Good, although I don't like using a "greedy" except, I'll leave it as it is in the 318529-unpack-frame branch.

BTW, thanks for pointing out the constructor detail, sometimes it's hard to maintain so many moving parts (Twisted Thrift, txAMQP, etc.) and keep them synchronized.

For more info on how to construct objects in Thrift, see https://issues.apache.org/jira/browse/THRIFT-242

Changed in txamqp:
status: New → Fix Committed
Revision history for this message
Esteve Fernandez (esteve) wrote :

Could you test the current trunk branch? I committed a new revision which should fix this bug in a different way. It should be more robust and maybe a bit faster.

Changed in txamqp:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.