08.11.2010 14:47, Jerome Flesch wrote:
> Hello,
> 
> On FreeBSD, when a client is disconnected by Corosync, there is an
> assert() that fails on the client side. The assert assumes that, since
> the poll() call was ok, recvmsg() will also be ok. However, this is not
> true on BSD systems. 

This is not also completely true on linux btw.

I was surprised many years ago (perhaps in 2003) when used to use
netsnmp library (client side) in a multi-threaded application. It used
recv* syscall in a blocking mode (I do not remember exactly, recvfrom or
recvmsg) after select, and I saw hanged threads sometimes. What I got
from days of digging is that linux kernel some-how optimizes receive
path and select can return fd after receive but before packet checksum
was verified. Kernel can silently drop the packet then if it is broken.
And application which relies on result from select and also uses
blocking IO can hang there.

I do not remember does it contradict what POSIX says, but that is the fact.

Best,
Vladislav
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to