[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MirageOS-devel] mirage-www on xen and networking (on ARM)





On Sun, Mar 29, 2015 at 7:52 PM, Magnus Therning <magnus@xxxxxxxxxxxx> wrote:
On Sun, Mar 29, 2015 at 05:36:33PM +0100, David Scott wrote:
> On Sun, Mar 29, 2015 at 5:02 PM, Magnus Therning <magnus@xxxxxxxxxxxx>
> wrote:
[..]
> So it looks like you're receiving truncated IP frames. It would be helpful
> to know what the frames actually are-- could you do something like:
>
> git clone git://github.com/mirage/mirage-tcpip
> cd mirage-tcpip
> git checkout v2.3.0
>
> perhaps change the assert into something like
>
> if Cstruct.len data <> payload_len then begin
>Â Âprintf "argh, it's all broken! len = %d payload_len = %d\n" (Cstruct.len
> data) payload_len;
>Â ÂCstruct.hexdump buf;
> end
>
> (quoting the Cstruct manual:
>Â " when the going gets tough, the tough hexdump their cstructs
>  Âand peer at it until the bug disappears. This will directly
>Â Â Âprettyprint the contents of the cstruct to the standard output. ")
>
> opam pin add tcpip .
>
> .. and then rebuild your app with the new code.

After doing that, rebuilding and starting the VM again I get this on
the console

  ...
  argh, it's all broken! len = 26 payload_len = 20

  45 00 00 28 2b af 40 00 40 06 8d af c0 a8 00 0b
  c0 a8 00 16 ea 30 00 50 d0 90 08 dc 1a fe 26 b0
  50 11 00 e5 27 e1 00 00 00 00 00 00 00 00
  argh, it's all broken! len = 26 payload_len = 20

(peering at the hex dump, with wikipedia in another window)

IP version = 4
Protocol = 6 = TCP
IHL = 5 words (ie no options)
Total length = 0x28

payload_len = 0x28 - 5 * 4 = 20 (looks ok)

It looks like the mirage-net-xen driver is supplying an extra 6 bytes for some reason.
Â

  45 00 00 28 2b b0 40 00 40 06 8d ae c0 a8 00 0b
  c0 a8 00 16 ea 30 00 50 d0 90 08 dc 1a fe 26 b0
  50 11 00 e5 27 e1 00 00 00 00 00 00 00 00
  argh, it's all broken! len = 26 payload_len = 20

  45 00 00 28 2b b1 40 00 40 06 8d ad c0 a8 00 0b
  c0 a8 00 16 ea 30 00 50 d0 90 08 dc 1a fe 26 b0
  50 11 00 e5 27 e1 00 00 00 00 00 00 00 00
  argh, it's all broken! len = 26 payload_len = 20

  45 00 00 28 2b b2 40 00 40 06 8d ac c0 a8 00 0b
  c0 a8 00 16 ea 30 00 50 d0 90 08 dc 1a fe 26 b0
  50 11 00 e5 27 e1 00 00 00 00 00 00 00 00
  argh, it's all broken! len = 26 payload_len = 20

  45 00 00 28 2b b3 40 00 40 06 8d ab c0 a8 00 0b
  c0 a8 00 16 ea 30 00 50 d0 90 08 dc 1a fe 26 b0
  50 11 00 e5 27 e1 00 00 00 00 00 00 00 00
  argh, it's all broken! len = 26 payload_len = 20

  45 00 00 28 2b b4 40 00 40 06 8d aa c0 a8 00 0b
  c0 a8 00 16 ea 30 00 50 d0 90 08 dc 1a fe 26 b0
  50 11 00 e5 27 e1 00 00 00 00 00 00 00 00
  ARP responding to: who-has 192.168.0.22?
  argh, it's all broken! len = 26 payload_len = 8

  45 00 00 1c 00 00 00 00 01 02 19 36 c0 a8 00 01
  e0 00 00 01 11 0a ee f5 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00
  argh, it's all broken! len = 26 payload_len = 12

Even though this packet has a shorter total length (0x1c), the frame has the same length as the previous ones.

  45 00 00 20 00 00 00 00 01 02 19 32 c0 a8 00 01
  e0 00 00 01 11 0a ec 78 00 00 00 00 02 7d 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00Â
  ...

This time around I don't get anything in reply to my requests though.

This is probably because my debug suggestion removed the assert and probably confused the higher layers.

Unless I'm misreading this, I think it must be a bug in mirage-net-xen (the ethernet driver) misreading the ethernet frames somehow? Or perhaps the peer host is sending extra junk on the end of its IP packets but within the ethernet frames?

What kind of network are you using?

I've filed this issue for now:



Cheers,
Dave

/M

--
Magnus Therning           OpenPGP: 0xAB4DFBA4
email: magnus@xxxxxxxxxxxx Âjabber: magnus@xxxxxxxxxxxx
twitter: magthe       Âhttp://therning.org/magnus

As long as there are ill-defined goals, bizarre bugs, and unrealistic
schedules, there will be Real Programmers willing to jump in and Solve The
Problem, saving the documentation for later. Long live Fortran!
  Â-- Ed Post



--
Dave Scott
_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.