Problem with UDP receive

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with UDP receive

John Dougan
I'm porting a UDP server framework over from Squeak so I can port the SSDP package I wrote for OpenCobalt. During the test runs, I'm getting a UDP receive issue where I can't receive a packet over 792 bytes. I'm now reasonably certain isn't my system config as the Squeak version still works. I tried adjusting SO_RCVBUF option which didn't seem to help. Sniffing the protocol stack, wireshark saw the too-long packets being sent. Odd part: When I get and dump the SO_RCVBUF socket option, the method returns a length 4 and all zero byte array both before and after I do the #setOptionsLevel:name:value:.
Tried cross version testing. The VW version sends just fine to the Squeak version, all packets are received. When going the other way the long packets don't show up.

Anyone have any idea what I or VW might be doing wrong or where I could look next? This is on Mac OS 10.6.8 with VW 7.10PUL.

Cheers,
  -- John
--
John Dougan
[hidden email]

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Problem with UDP receive

Holger Kleinsorgen
I dug out some old 7.6-based SSDP code and ran it with a 7.10 VM on two machines, one runnning Windows 7 , the other OS X. An M-SEARCH request with a search string of size 2048 bytes was received by the other machine.

The socket is initialized the following way:

   socket  := SocketAccessor family: SocketAccessor AF_INET type: SocketAccessor SOCK_DGRAM.
   socket mLoop: true.
   socket ttl: 4.

Data is received with:
   socket receiveFrom: IPSocketAddress new buffer: readBuffer start: 1 for: readBuffer size.

John Dougan wrote
I'm porting a UDP server framework over from Squeak so I can port the SSDP
package I wrote for OpenCobalt. During the test runs, I'm getting a UDP
receive issue where I can't receive a packet over 792 bytes. I'm now
reasonably certain isn't my system config as the Squeak version still
works. I tried adjusting SO_RCVBUF option which didn't seem to help.
Sniffing the protocol stack, wireshark saw the too-long packets being sent.
Odd part: When I get and dump the SO_RCVBUF socket option, the method
returns a length 4 and all zero byte array both before and after I do the
#setOptionsLevel:name:value:.
Tried cross version testing. The VW version sends just fine to the Squeak
version, all packets are received. When going the other way the long
packets don't show up.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with UDP receive

John Dougan
Holger, thanks for checking.  I've dug around some more and I think I see the issues now, one surprising and one not.  The unsurprising one is that the POSIX spec  isn't interpreted consistently and it looks like the original platform this was built on was one of the systems with a variant interpretation (many Linux versions actually allocate double the memory requested.).  The surprising issue is that it looks like the Squeak I was using (an ancient 3.8 interpreter VM) is enough more efficient in UDP socket handling that there are fewer packets outstanding to use up the kernel buffer space limit set by SO_RCVBUF.

Cheers
 -- John


On Thu, Jan 23, 2014 at 1:28 PM, Holger Kleinsorgen <[hidden email]> wrote:
I dug out some old 7.6-based SSDP code and ran it with a 7.10 VM on two
machines, one runnning Windows 7 , the other OS X. An M-SEARCH request with
a search string of size 2048 bytes was received by the other machine.

The socket is initialized the following way:

   socket  := SocketAccessor family: SocketAccessor AF_INET type:
SocketAccessor SOCK_DGRAM.
   socket mLoop: true.
   socket ttl: 4.

Data is received with:
   socket receiveFrom: IPSocketAddress new buffer: readBuffer start: 1 for:
readBuffer size.


John Dougan wrote
> I'm porting a UDP server framework over from Squeak so I can port the SSDP
> package I wrote for OpenCobalt. During the test runs, I'm getting a UDP
> receive issue where I can't receive a packet over 792 bytes. I'm now
> reasonably certain isn't my system config as the Squeak version still
> works. I tried adjusting SO_RCVBUF option which didn't seem to help.
> Sniffing the protocol stack, wireshark saw the too-long packets being
> sent.
> Odd part: When I get and dump the SO_RCVBUF socket option, the method
> returns a length 4 and all zero byte array both before and after I do the
> #setOptionsLevel:name:value:.
> Tried cross version testing. The VW version sends just fine to the Squeak
> version, all packets are received. When going the other way the long
> packets don't show up.





--
View this message in context: http://forum.world.st/Problem-with-UDP-receive-tp4738332p4738854.html
Sent from the VisualWorks mailing list archive at Nabble.com.
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc



--
John Dougan
[hidden email]

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc