Login
Username:

Password:

Remember me



Lost Password?

Register now!
Sections
Who's Online
63 user(s) are online (52 user(s) are browsing Forums)

Members: 0
Guests: 63

more...
Support us!
Recent OS4 Files
OS4Depot.net





(solved) Roadshow puzzle - Recv() fails with EAGAIN
Home away from home
Joined:
2007/5/19 13:23
From England
Posts: 3541
I've found that after receiving several hundred MB of data using Recv(), it will eventually fails with the error "EAGAIN".

But according to the autodocs:
"If no messages are available at the socket, the receive call waits for a message to arrive, unless the socket is nonblocking (see IoctlSocket()) in which case the value -1 is returned and the external variable errno set to EAGAIN."
(This is basically repeating what's said at https://linux.die.net/man/2/recvmsg )

And no, I never enable "FIONBIO" (non-blocking mode) !


I thought this was a Roadshow bug, but it seems that once EAGAIN occurs, calling Recv() again doesn't help (as fails again).

Could this be a network driver bug (or network card issue), rather than a bug in my code? (I can't see where I could be at fault.)


Edited by ChrisH on 2018/7/10 6:23:55
Edited by ChrisH on 2018/7/10 6:24:32
Edited by ChrisH on 2018/7/16 17:48:22
_________________
Author of the PortablE programming language.
I love using Amiga OS4.1
It is pitch black. You are likely to be eaten by a grue...
   Report Go to top

Re: Roadshow puzzle - Recv() fails with EAGAIN
Home away from home
Joined:
2007/5/19 13:23
From England
Posts: 3541
After some experiments, the most likely explanation seems to be that my PCI network card is failing :(

Can anyone recommend a replacement card (for my X1000) that can still be bought?

Anyone know if a PCI-Express card with a compatible RTL chipset will work?

_________________
Author of the PortablE programming language.
I love using Amiga OS4.1
It is pitch black. You are likely to be eaten by a grue...
   Report Go to top

Re: Roadshow puzzle - Recv() fails with EAGAIN
Home away from home
Joined:
2007/5/19 13:23
From England
Posts: 3541
Looks like I was right about my PCI network card failing,
as a replacement seems to have fixed my issue.

_________________
Author of the PortablE programming language.
I love using Amiga OS4.1
It is pitch black. You are likely to be eaten by a grue...
   Report Go to top

Re: Roadshow puzzle - Recv() fails with EAGAIN
Home away from home
Joined:
2006/11/26 21:45
From A haunted Castle somewhere in the Bavarian Mountains
Posts: 3147
@ChrisH

Which card did you get?
Does it have features your broken one hasn't and is it probably faster?

_________________
If slaughterhouses had glass walls, everyone would be a vegetarian. ~ Sir Paul McCartney
-
Did everything just taste purple for a second? ~ Philip J. Fry
-
Ain't got no cash, ain't got no style, ladies vomit when I smile. ~ Dr. John Zoidberg
   Report Go to top

Re: Roadshow puzzle - Recv() fails with EAGAIN
Home away from home
Joined:
2007/5/19 13:23
From England
Posts: 3541
@Raziel
I bought two different cards, and both worked :)

http://amigakit.amiga.store/product_info.php?products_id=63
This is an RTL 8139D based PCI network card. Same chip as my old card, so basically identical.

https://www.amazon.co.uk/gp/product/B01M74CLEG
This is an RTL 8169 based PCI *Express* network card, which theoretically supports Gigabit networks.
Works fine in the PCI Express slot of my X1000.

Based on some rough measurements, the RTL 8169 PCI Express card is about 20% faster (on a 100Mbit network - maybe it's be even faster on an Gigabit network, although the Amiga's TCP/IP Stack introduces big overheads, so the speed-up may be limited).

_________________
Author of the PortablE programming language.
I love using Amiga OS4.1
It is pitch black. You are likely to be eaten by a grue...
   Report Go to top

Re: Roadshow puzzle - Recv() fails with EAGAIN
Home away from home
Joined:
2006/11/26 21:45
From A haunted Castle somewhere in the Bavarian Mountains
Posts: 3147
@ChrisH

So, the solution was to replace the card?

I think we need a GIGABit LAN driver and IPv6 support

_________________
If slaughterhouses had glass walls, everyone would be a vegetarian. ~ Sir Paul McCartney
-
Did everything just taste purple for a second? ~ Philip J. Fry
-
Ain't got no cash, ain't got no style, ladies vomit when I smile. ~ Dr. John Zoidberg
   Report Go to top

Re: Roadshow puzzle - Recv() fails with EAGAIN
Home away from home
Joined:
2007/5/19 13:23
From England
Posts: 3541
Quote:
https://www.amazon.co.uk/gp/product/B01M74CLEG
This is an RTL 8169 based PCI *Express* network card, which theoretically supports Gigabit networks.
Works fine in the PCI Express slot of my X1000

Beware: I bought 3 of these cards, but the 2nd one caused the OS4 driver to crash (despite them all appearing to be identical). So my success rate was 67% with this card.

I did test the 'faulty' one with a Linux PC, and it worked fine with that. So a bit of a mystery.

_________________
Author of the PortablE programming language.
I love using Amiga OS4.1
It is pitch black. You are likely to be eaten by a grue...
   Report Go to top

Re: (solved) Roadshow puzzle - Recv() fails with EAGAIN
Just popping in
Joined:
2017/10/28 10:03
From Netherlands
Posts: 21
I have been using this card for a while in my X5000

https://www.tp-link.com/us/products/details/cat-5519_TG-3468.html

Resized Image



_________________
On a Strict need to know Basis..
   Report Go to top





[Advanced Search]


Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project