Re: Fwd: Re: Fwd: Problem with recv syscall on socket when other side closed connection

Поиск
Список
Период
Сортировка
От kuznet@ms2.inr.ac.ru
Тема Re: Fwd: Re: Fwd: Problem with recv syscall on socket when other side closed connection
Дата
Msg-id 200006281624.UAA01004@ms2.inr.ac.ru
обсуждение исходный текст
Ответ на Re: Fwd: Re: Fwd: Problem with recv syscall on socket when other side closed connection  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Fwd: Re: Fwd: Problem with recv syscall on socket when other side closed connection  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hello!

> > This is the result of my 6 days "war" with Linux kernel people...

Alas, I did not understand that he was in the state of war.
I believed he asked for an advice and/or reported a bug. 8)


> *AND DISCARDING VALID USER DATA* at this point, the Linux kernel
> makes it impossible to retrieve the error message --- which might
> have contained essential information.

Denis was explained that Linux _never_ discards any data...
Ough, I beg pardon: Denis noticed this _himself_.
Please, do not desinform people.

BTW look at this. It is RFC1122, 4.2.2.13. 
                                   If a TCP           connection is closed by the remote site, the local
applicationMUST be informed whether it closed normally or           was aborted.
 

See? 8)


Also, David Miller explained (and Denis understood and accepted this)
that TCP does not guarantee data delivery, when an RST is issued.
It is solely due to intrinsic network unreliability and segment reordering.
The application depending on these aspects is broken.


> But what about the messages you didn't get yet, but the other end
> sent in good faith?  There's nothing in the TCP specs that says
> a program can't close its end of the connection as soon as it has
> sent the last data it intends to send.

TCP specs say directly and unabiguously, that sending data
to half-closed pipe is followed by immediate abort (RFC1122, a bit
below the cite above). More detailed explanation can be found
in current draft-ietf-tcpimpl.

> Do I need to quote RFC chapter and verse at you?

Of course.

Alexey


В списке pgsql-hackers по дате отправления:

Предыдущее
От: dbahena@tpv.com.mx
Дата:
Сообщение: regular expressions troubles with char cols
Следующее
От: Oleg Broytmann
Дата:
Сообщение: Re: Built with PostgreSQL (images)