Bug #2392

KEEPALIVE broken in curl

Added by matthiasr over 2 years ago. Updated about 2 years ago.

Status:ClosedStart date:06/28/2012
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

curl has been broken since version 7.25 on DragonFly. I've bisected it down (using https://gist.github.com/3013871) to this commit:

https://github.com/bagder/curl/commit/2a266c1c7c075f9faced0248ed3f870dac1fc749

I can't find any functional difference between the code removed there and the one added on the library side in that commit's parent, so I am at loss for producing a more minimal testcase.

Current curl works fine on both OS X and Linux and I can't see any OS-specific code there so I guess this is a DragonFly problem(?).

A workaround for using curl on DragonFly is invoking it as _curl --no-keepalive_.

History

#1 Updated by matthiasr over 2 years ago

for the record: the curl error is

(56) Recv failure: Operation timed out

#2 Updated by sepherosa over 2 years ago

On Fri, Jun 29, 2012 at 5:05 AM, Matthias Rampke via Redmine
<> wrote:
>
> Issue #2392 has been reported by Matthias Rampke.
>
> ----------------------------------------
> Bug #2392: KEEPALIVE broken in curl
> http://bugs.dragonflybsd.org/issues/2392
>
> Author: Matthias Rampke
> Status: New
> Priority: Normal
> Assignee:
> Category:
> Target version:
>
>
> curl has been broken since version 7.25 on DragonFly. I've bisected it down (using https://gist.github.com/3013871) to this commit:
>
> https://github.com/bagder/curl/commit/2a266c1c7c075f9faced0248ed3f870dac1fc749
>
> I can't find any functional difference between the code removed there and the one added on the library side in that commit's parent, so I am at loss for producing a more minimal testcase.

It is because Linux uses _second_ as the unit of the TCP_KEEPINTVL and
TCP_KEEPIDLE. In DragonFly, the unit of TCP_KEEPINIT, TCP_KEEPINTVL
and TCP_KEEPIDLE is millisecond, which is consistent w/ the related
sysctl nodes' unit. I am not going to follow Linux on this; different
systems have their own unit of TCP_KEEP*, e.g. OpenVMS uses 0.5
second. curl should be patched to fix their assumption about
TCP_KEEP* argument unit.

Best Regards,
sephe

>
> Current curl works fine on both OS X and Linux and I can't see any OS-specific code there so I guess this is a DragonFly problem(?).
>
> A workaround for using curl on DragonFly is invoking it as _curl --no-keepalive_.
>
>
> --
> You have received this notification because you have either subscribed to it, or are involved in it.
> To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account

--
Tomorrow Will Never Die

#3 Updated by marino about 2 years ago

  • Status changed from New to Closed

Sephe's patch was accepted upstream -- DragonFly fix is permanently in repository and it's already being used as of curl 7.27 in pkgsrc.

Also available in: Atom PDF