[rabbitmq-discuss] rabbitmq-c corrupt content frame from ARM client

Marco Scoffier marco at metm.org
Tue Apr 8 01:34:36 BST 2014


Hey Alan,

I'm sorry but I will have to get back to you in a day or two. I would 
love to help get to the bottom of this.

Marco

On 4/7/14, 1:40 PM, Alan Antonuk wrote:
> Marco - Thanks I got the file and was able to look at it in Wireshark.
> Upon first glance I see two issues: the frame type is wrong (the first
> byte should be 0x01 instead of 0x02), and there appears to be an added
> 0x05 octet right at the beginning of the frame payload (it should be
> 0x00, 0x0a, 0x00, 0x0b). There may also be some other issues as I didn't
> look more deeply than that.  Question for you: is your armv6 system
> running in little or big-endian mode? It appears that we've correctly
> detected the endianness of the system, but I'm not 100% sure on that.
>
> Also when compiling the library did you notice any compiler warnings?
> (Enable -Wall -Wextra if necessary).
>
> *To one of the RabbitMQ broker developers*: for the following message in
> the RabbitMQ broker logs:
>
>      =ERROR REPORT==== 3-Apr-2014::15:05:35 ===
>      closing AMQP connection <0.380.0> (192.168.1.117:52890
> <http://192.168.1.117:52890/>
>      <http://192.168.1.117:52890 <http://192.168.1.117:52890/>> ->
> 192.168.1.133:5672 <http://192.168.1.133:5672/>
>      <http://192.168.1.133:5672 <http://192.168.1.133:5672/>>):
>
>      {handshake_error,starting,0,
>                        {amqp_error,frame_error,
>                                    "type 0, first 16 octets =
>      <<5,10,0,11,0,0,0,80,98,112,____114,111,100,117,99,116>>...",
>
>                                    none}}
>
> Are those first 16 octets including or not including the frame header?
>
> -Alan
>
>
>
> On Sun, Apr 6, 2014 at 2:25 AM, Marco Scoffier <marco at metm.org
> <mailto:marco at metm.org>> wrote:
>
>     Hi Alan,
>
>     I just re-uploaded the file to include all the packets around the
>     handshake (not just the 3 I get when filtering for AMQP) as you
>     mentioned wireshark itself might also have parsing issues.
>
>     Marco
>
>
>     On 04/06/2014 03:16 AM, Marco Scoffier wrote:
>
>         Sure,
>
>         I dumped the 3 packets to a separate file. This is the binary
>         data which
>         you can open in wireshark:
>
>         http://metm.org/images/amqp___handshake_wireshark.log
>         <http://metm.org/images/amqp_handshake_wireshark.log>
>
>         Thanks for looking into this and happy to provide any additional
>         tests,
>
>         Marco
>
>         On 04/06/2014 12:48 AM, Alan Antonuk wrote:
>
>             Marco;
>
>               From the wireshark info, it sounds like the rabbitmq-c
>             client is
>             sending completely the wrong data. It should send a
>             Connection.Start-Ok
>             method and not a content-header frame (e.g., the frame type
>             should be 1
>             first few bytes of that frame should be: 0x01 {Method
>             Frame}, 0x00, 0x00
>             {Channel 0}, 0x00, 0x00 0xXX, 0xXX {Big Endian length of
>             frame in bytes}
>             ). I'm also not sure what to to think about the sent header
>             length: that
>             should be 8 bytes or 64 bits, I suspect thats a wireshark
>             oddity though.
>
>             The octets reported by the RabbitMQ server error message
>             don't really
>             make sense to me: I'm having trouble correlating what is
>             reported vs
>             what I think should be, even if the system is doing an incorrect
>             byteswap. I'm not 100% sure we're clear of any unaligned
>             access issues,
>             but I would guess we'd be hitting bus-errors in that case,
>             though I'm
>             not quite sure
>
>             Would you be willing to send me a filtered down wireshark
>             log of the
>             failed handshake?
>
>             -Alan
>
>
>             On Fri, Apr 4, 2014 at 6:38 PM, Marco Scoffier
>             <marco at metm.org <mailto:marco at metm.org>
>             <mailto:marco at metm.org <mailto:marco at metm.org>>> wrote:
>
>                  Hello,
>
>                  I apologize if this has been discussed before. I
>             checked the
>                  archives but did not find any mention of the issue.
>
>                  I've compiled rabbitmq-c [1] for the arm architecture
>             [2]  from and
>                  am trying to send messages to a broker running on
>             another machine
>                  [3]. The rabbitmq-c examples run perfectly on the 64bit
>             linux, same
>                  code compiled for arm device and running there sends a
>             corrupt
>             packet.
>
>                  [1] https://github.com/alanxz/____rabbitmq-c
>             <https://github.com/alanxz/__rabbitmq-c>
>                  <https://github.com/alanxz/__rabbitmq-c
>             <https://github.com/alanxz/rabbitmq-c>>
>                  [2] armv6 linaro toolchain
>                  [3] linux 64bit rabbitmq-server ppa for ubuntu. running
>             on 12.04
>
>                  I'm a little stuck about how to debug further and am
>             looking for
>                  some pointers where to look in the code or what extra
>             information I
>                  can provide.
>
>                  Wireshark shows three packets for the amqp_sendstring
>             example
>
>                  ARM device/Source = 192.168.1.117
>                  64bit broker/Destination = 192.168.1.133
>
>                  Source          Destination    protocol length info
>
>             --------------+---------------____+--------+------+-----------__-
>                  192.168.1.117   192.168.1.133   AMQP    74
>               Protocol-Header 9-1
>                  192.168.1.133   192.168.1.117   AMQP    522
>             Connection.Start
>                  192.168.1.117   192.168.1.133   AMQP    190
>             Content-Header
>
>                  wireshark's amqp frame dissection shows an error on the 3rd
>                  Content-Header packet:
>
>                  Expert Info (Error/Protocol): Unknown header class 1290
>                  Message: Unknown header class 1290
>                  Severity level: Error
>                  Group: Protocol
>
>                  the rabbitmq-server on the linux machine provides this
>             log message:
>
>                  =ERROR REPORT==== 3-Apr-2014::15:05:35 ===
>                  closing AMQP connection <0.380.0> (192.168.1.117:52890
>             <http://192.168.1.117:52890>
>                  <http://192.168.1.117:52890> -> 192.168.1.133:5672
>             <http://192.168.1.133:5672>
>                  <http://192.168.1.133:5672>):
>                  {handshake_error,starting,0,
>                                    {amqp_error,frame_error,
>                                                "type 0, first 16 octets =
>
>             <<5,10,0,11,0,0,0,80,98,112,____114,111,100,117,99,116>>...",
>                                                none}}
>
>                  repeat that the same code compiled for 64bit linux same
>             command
>                  works as expected.
>
>                  Thanks for any pointers,
>
>                  Marco
>                  ___________________________________________________
>                  rabbitmq-discuss mailing list
>                  rabbitmq-discuss at lists.__rabbi__tmq.com
>             <http://rabbitmq.com>
>                  <mailto:rabbitmq-discuss at __lists.rabbitmq.com
>             <mailto:rabbitmq-discuss at lists.rabbitmq.com>>
>
>             https://lists.rabbitmq.com/____cgi-bin/mailman/listinfo/____rabbitmq-discuss
>             <https://lists.rabbitmq.com/__cgi-bin/mailman/listinfo/__rabbitmq-discuss>
>
>             <https://lists.rabbitmq.com/__cgi-bin/mailman/listinfo/__rabbitmq-discuss
>             <https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss>>
>
>
>
>
>             _________________________________________________
>             rabbitmq-discuss mailing list
>             rabbitmq-discuss at lists.__rabbitmq.com
>             <mailto:rabbitmq-discuss at lists.rabbitmq.com>
>             https://lists.rabbitmq.com/__cgi-bin/mailman/listinfo/__rabbitmq-discuss
>             <https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss>
>
>
>         _________________________________________________
>         rabbitmq-discuss mailing list
>         rabbitmq-discuss at lists.__rabbitmq.com
>         <mailto:rabbitmq-discuss at lists.rabbitmq.com>
>         https://lists.rabbitmq.com/__cgi-bin/mailman/listinfo/__rabbitmq-discuss
>         <https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss>
>
>
>     _________________________________________________
>     rabbitmq-discuss mailing list
>     rabbitmq-discuss at lists.__rabbitmq.com
>     <mailto:rabbitmq-discuss at lists.rabbitmq.com>
>     https://lists.rabbitmq.com/__cgi-bin/mailman/listinfo/__rabbitmq-discuss
>     <https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss>
>
>
>
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>


More information about the rabbitmq-discuss mailing list