As Andrew said, in this case EGAIN and EWOULDBLOCK are the same errno. You
can look in /usr/include/asm/errno.h and see they are equal. (At least on
my system :) )

Ryan

> Okay, thanks :-)
>
> On Wed, Jan 7, 2009 at 11:56 PM, Andrew Armstrong
> <[email protected]>wrote:
>
>> There are several error codes that basically say 'try again later' for
>> async
>> i/o - so yes these are normal.
>>
>> -----Original Message-----
>> From: [email protected]
>> [mailto:[email protected]] On Behalf Of Tony
>> Paloma
>> Sent: Thursday, 8 January 2009 9:48 AM
>> To: 'Half-Life dedicated Linux server mailing list'
>> Subject: Re: [hlds_linux] strace -p on HLDS. Is it normal communicate?
>>
>> Should be EWOULDBLOCK is what I meant, not shouldn't.
>>
>> -----Original Message-----
>> From: [email protected]
>> [mailto:[email protected]] On Behalf Of Tony
>> Paloma
>> Sent: Wednesday, January 07, 2009 2:46 PM
>> To: [email protected]; 'Half-Life dedicated Linux server mailing
>> list'
>> Subject: Re: [hlds_linux] strace -p on HLDS. Is it normal communicate?
>>
>> I thought this too, but it shouldn't be EWOULDBLOCK not EAGAIN.
>>
>> -----Original Message-----
>> From: [email protected]
>> [mailto:[email protected]] On Behalf Of Ryan
>> Burke
>> Sent: Wednesday, January 07, 2009 12:18 PM
>> To: Half-Life dedicated Linux server mailing list
>> Subject: Re: [hlds_linux] strace -p on HLDS. Is it normal communicate?
>>
>> My educated guess is that they are using non-blocking calls to recvfrom
>> using the MSG_DONTWAIT flag. Normally recv and recvfrom will block until
>> data is received. This stops the flow of the program unless it is
>> multi-threaded with on thread dealing with network I/O and some kind of
>> parent thread to do something when network I/O occurs. Look at the
>> MSG_DONTWAIT in "man recvfrom" and it explains it. It is a pretty common
>> way to do high performance asynchronous network programming.
>>
>> Ryan
>>
>> > sorry it's much faster than 10 times per second, my terminal is slow.
>> > first that I posted is on
>> > 1231356114, 376819
>> > second
>> > 1231356114, 378804
>> > that is every ~2000 microseconds so ~500/s and that server is stable
>> > 500fps, so it happens every frame.
>> >
>> > Kveri
>> >
>> > Kveri  wrote / napísal(a):
>> >> I don't know if it is normal, but I can confirm that it's happening.
>> >>
>> >> recvfrom(4, 0xfff4ebb4, 4010, 0, 0xfff4fb60, 0xfff4eb9c) = -1 EAGAIN
>> >> (Resource temporarily unavailable)
>> >> gettimeofday({1231356114, 376819}, NULL) = 0
>> >> gettimeofday({1231356114, 376846}, NULL) = 0
>> >> gettimeofday({1231356114, 376873}, NULL) = 0
>> >> gettimeofday({1231356114, 376900}, NULL) = 0
>> >> gettimeofday({1231356114, 376928}, NULL) = 0
>> >> gettimeofday({1231356114, 376953}, NULL) = 0
>> >> gettimeofday({1231356114, 376976}, NULL) = 0
>> >> select(5, [4], NULL, NULL, {0, 1000})   = 0 (Timeout)
>> >> select(1, [0], NULL, NULL, {0, 0})      = 0 (Timeout)
>> >> gettimeofday({1231356114, 377713}, NULL) = 0
>> >> gettimeofday({1231356114, 377738}, NULL) = 0
>> >> select(5, [4], NULL, NULL, {0, 1000})   = 0 (Timeout)
>> >> select(1, [0], NULL, NULL, {0, 0})      = 0 (Timeout)
>> >> gettimeofday({1231356114, 378711}, NULL) = 0
>> >> gettimeofday({1231356114, 378738}, NULL) = 0
>> >> recvfrom(4, 0xfff4ebb4, 4010, 0, 0xfff4fb60, 0xfff4eb9c) = -1 EAGAIN
>> >> (Resource temporarily unavailable)
>> >> gettimeofday({1231356114, 378804}, NULL) = 0
>> >> gettimeofday({1231356114, 378831}, NULL) = 0
>> >> gettimeofday({1231356114, 378855}, NULL) = 0
>> >> gettimeofday({1231356114, 378878}, NULL) = 0
>> >> gettimeofday({1231356114, 378902}, NULL) = 0
>> >> gettimeofday({1231356114, 378925}, NULL) = 0
>> >> gettimeofday({1231356114, 378949}, NULL) = 0
>> >> select(0, NULL, NULL, NULL, {0, 1000})  = 0 (Timeout)
>> >> select(1, [0], NULL, NULL, {0, 0})      = 0 (Timeout)
>> >> gettimeofday({1231356114, 379714}, NULL) = 0
>> >> gettimeofday({1231356114, 379739}, NULL) = 0
>> >> recvfrom(4, 0xfff4ebb4, 4010, 0, 0xfff4fb60, 0xfff4eb9c) = -1 EAGAIN
>> >> (Resource temporarily unavailable)
>> >> gettimeofday({1231356114, 379803}, NULL) = 0
>> >> gettimeofday({1231356114, 379829}, NULL) = 0
>> >> gettimeofday({1231356114, 379855}, NULL) = 0
>> >> ^C <unfinished ...>
>> >> Process 31734 detached
>> >>
>> >> Maybe 10 times per second or so
>> >>
>> >> OS: Gentoo 64
>> >> 2x Quad Xeon, 8GB RAM
>> >> conn: 1GBit
>> >>
>> >> Kveri
>> >>
>> >> Pawel  wrote / napísal(a):
>> >>
>> >>> Hi,
>> >>>
>> >>> I'm starting new hlds process with -game cstrike etc. Normal clear
>> CS
>> >>> 1.6
>> >>> server.
>> >>> Next what i'm going to do is strace command on this process.
>> >>>
>> >>> So while using strace -p 3535353... I got many times:
>> >>>
>> >>> recvfrom(4, 0xfff43114, 4010, 0, 0xfff440c0, 0xfff430fc) = -1 EAGAIN
>> >>> (Resource temporarily unavailable)
>> >>>
>> >>> It is normal?
>> >>> My OS is Slamd64
>> >>> and hardware:
>> >>> 2x Xeon Quad-Core, 4GB RAM
>> >>> Internet connection: 100mbit up/down
>> >>>
>> >>> Thanks
>> >>> _______________________________________________
>> >>> To unsubscribe, edit your list preferences, or view the list
>> archives,
>> >>> please visit:
>> >>> http://list.valvesoftware.com/mailman/listinfo/hlds_linux
>> >>>
>> >>>
>> >>>
>> >>
>> >> _______________________________________________
>> >> To unsubscribe, edit your list preferences, or view the list
>> archives,
>> >> please visit:
>> >> http://list.valvesoftware.com/mailman/listinfo/hlds_linux
>> >>
>> >>
>> >
>> > _______________________________________________
>> > To unsubscribe, edit your list preferences, or view the list archives,
>> > please visit:
>> > http://list.valvesoftware.com/mailman/listinfo/hlds_linux
>> >
>>
>>
>> _______________________________________________
>> To unsubscribe, edit your list preferences, or view the list archives,
>> please visit:
>> http://list.valvesoftware.com/mailman/listinfo/hlds_linux
>>
>>
>> _______________________________________________
>> To unsubscribe, edit your list preferences, or view the list archives,
>> please visit:
>> http://list.valvesoftware.com/mailman/listinfo/hlds_linux
>>
>>
>> _______________________________________________
>> To unsubscribe, edit your list preferences, or view the list archives,
>> please visit:
>> http://list.valvesoftware.com/mailman/listinfo/hlds_linux
>>
>>
>> _______________________________________________
>> To unsubscribe, edit your list preferences, or view the list archives,
>> please visit:
>> http://list.valvesoftware.com/mailman/listinfo/hlds_linux
>>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlds_linux
>


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux

Reply via email to