You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Bert Huijben <be...@qqmail.nl> on 2011/03/10 20:18:02 UTC
Serf gets stuck on ECONNREFUSED on Windows
Hi,
On Windows serf doesn't see the difference between a failed connect and a
lingering close. This causes serf to automatically reconnect. See
http://subversion.tigris.org/issues/show_bug.cgi?id=3832 for a few more
details.
Reproduction:
svn ls http://127.0.0.1:23456/svn
On FreeBSD this gives a proper 'Connection Refused' error, but on Windows
the application just gets in a loop.
I found this issue because this sometimes causes the buildbot to get stuck
when the httpd instance crashes on some assertion.
Once I start using 1.7.0 for real use this problem will be much worse
because there is no clean way to get out of this error. (Only killing the
application works; which would include losing work for Subclipse and AnkhSVN
users).
Either Serf should detect the right error, or Apr should implement a real
poll handler on Windows (available since Windows Vista) which should provide
more error information.
Bert
Re: Serf gets stuck on ECONNREFUSED on Windows
Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
On Tue, May 24, 2011 at 3:10 PM, Justin Erenkrantz
<ju...@erenkrantz.com> wrote:
>> Either Serf should detect the right error, or Apr should implement a real
>> poll handler on Windows (available since Windows Vista) which should provide
>> more error information.
Well...that's exactly what APR 1.4.x did - but WSAPoll() doesn't seem
to allow for reporting non-blocking connect failures. There are
plenty of MSDN forum posts about this not working. I managed to get a
VS2008 build env up on Windows 7. When I connect to a non-existent
port, nothing ever gets reported back from the apr_pollset_poll()
call. The connect() call (correctly) returns EINPROGRESS, so serf has
no way of knowing anything is wrong.
I've posted separately to the APR list - this is an APR issue and is a
regression only in APR 1.4.x+ (which added WSAPoll() support) - not a
Serf issue. Serf is asking for all of the correct flags, but Windows
Vista+ has no way of indicating that the connect() failed via this new
interface. (As such, this is a new issue - APR 1.3.x and earlier
wouldn't have had this issue as they use select().)
For older Windows platforms using select(), the fix I committed
earlier should still work....but, I'll still try to confirm locally.
-- justin
Re: Serf gets stuck on ECONNREFUSED on Windows
Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
See r1470 of serf - this should stop the infinite loop.
As I don't have a Windows build environment, I'd appreciate if you can
confirm if this resolves the issue.
Thanks for the report! -- justin
On Thu, Mar 10, 2011 at 9:18 AM, Bert Huijben <be...@qqmail.nl> wrote:
> Hi,
>
>
>
> On Windows serf doesn't see the difference between a failed connect and a
> lingering close. This causes serf to automatically reconnect. See
>
> http://subversion.tigris.org/issues/show_bug.cgi?id=3832 for a few more
> details.
>
>
>
> Reproduction:
>
> svn ls http://127.0.0.1:23456/svn
>
>
>
> On FreeBSD this gives a proper 'Connection Refused' error, but on Windows
> the application just gets in a loop.
>
>
>
> I found this issue because this sometimes causes the buildbot to get stuck
> when the httpd instance crashes on some assertion.
>
>
>
> Once I start using 1.7.0 for real use this problem will be much worse
> because there is no clean way to get out of this error. (Only killing the
> application works; which would include losing work for Subclipse and AnkhSVN
> users).
>
>
>
> Either Serf should detect the right error, or Apr should implement a real
> poll handler on Windows (available since Windows Vista) which should provide
> more error information.
>
>
>
> Bert
>
>
>
>
>
>