Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 May 2010 09:30:07 GMT
From:      Mikolaj Golub <to.my.trociny@gmail.com>
To:        freebsd-net@FreeBSD.org
Subject:   Re: kern/146845: [libc] close(2) returns error 54 (connection reset by peer) wrongly
Message-ID:  <201005280930.o4S9U7UJ018100@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/146845; it has been noted by GNATS.

From: Mikolaj Golub <to.my.trociny@gmail.com>
To: "Lavrentiev\, Anton \(NIH\/NLM\/NCBI\) \[C\]" <lavr@ncbi.nlm.nih.gov>
Cc: "Robert N. M. Watson" <rwatson@FreeBSD.org>, freebsd-net@FreeBSD.org, bug-followup@FreeBSD.org
Subject: Re: kern/146845: [libc] close(2) returns error 54 (connection reset by peer) wrongly
Date: Fri, 28 May 2010 12:26:33 +0300

 On Fri, 28 May 2010 04:40:03 GMT Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:
 
  LA>  IMHO, it is not, unfortunately, a solution:  it seems to clear ECONNRESET
  LA>  blindly and w/o distinguishing the situation when the remote end closes the
  LA>  connection prematurely (i.e. before acknowledging all data written from the
  LA>  local end) -- and that qualifies for the true "connection reset by peer"
  LA>  from close()...
 
 I am not very familiar with the socket/tcp code but it looks for me that it
 might not make any difference.
 
 I can be wrong here but the situation you have described as true "connection
 reset by peer" seems to have the following path in the code:
 
 soclose() -> sodisconnect() -> tcp_usr_disconnect() -> tcp_disconnect()
 
 But tcp_disconnect() does not return error, so we will not have ECONNRESET
 error in any case.
 
 May be you have a good test suite to reproduce this situation? :-) 
 
 -- 
 Mikolaj Golub



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005280930.o4S9U7UJ018100>