monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] Re: usher on BSD


From: Timothy Brownawell
Subject: Re: [Monotone-devel] Re: usher on BSD
Date: Fri, 23 Oct 2009 18:01:31 -0500
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090701)

Lapo Luchini wrote:
> Lapo Luchini wrote:
>> Has anyone managed to use usher on any BSD host?

I know nothing about BSD, sorry. I suppose I should set up a VM
sometime, at least for compile testing...

>> I managed to compile it with the following patch, but is still doesn't
>> work: it hangs on the first attempt of connections and must be then
>> kill-9'ed.
> 
> ktrace/kdump shows this pattern:
> 
> ...
>  40217 usher    STRU  struct sockaddr { AF_INET, 127.0.1.1:15024 }
>  40217 usher    RET   bind -1 errno 49 Can't assign requested address
> ...
>  40217 usher    STRU  struct sockaddr { AF_INET, 127.0.1.1:15025 }
>  40217 usher    RET   bind -1 errno 49 Can't assign requested address
> ...
>  40217 usher    STRU  struct sockaddr { AF_INET, 127.0.1.1:15026 }
>  40217 usher    RET   bind -1 errno 49 Can't assign requested address
> ...
> 
> From what I see in the README I guess those addresses are used to talk
> with the spawned local mtn instances...
> I guess it could be teached to use --stdio instead?

That wouldn't work for multiple clients connected to the same server.
Also, it would have to turn off all the assumptions that stdio
connections are trusted.

> Or simply understand why 127.0.1.1 should fail...

On my (Debian unstable) machine, the loopback interface has all of
127.0.0.0/8 assigned to it. So I set it to use odd parts of that so it
couldn't collide with things binding to 127.0.0.1 (ie, "just because").
I'm guessing that your BSD binds only 127.0.0.1 itself or maybe /24 as
loopback? Regardless, since the funny addresses break things...

> While I search more on the issue, this workaround does it for me:
> 
> --- src/server.cc       55442d680c936f59823a36aea57a25443955a99b
> +++ src/server.cc       4a9084560d33bb835a77c28ad4503a9768069887
> @@ -24,8 +29,8 @@ int const maxport = 65000;
>  // ranges that dynamic (local) servers can be put on
>  int const minport = 15000;
>  int const maxport = 65000;
> -int const minaddr[] = {127, 0, 1, 1};
> -int const maxaddr[] = {127, 254, 254, 254};
> +int const minaddr[] = {127, 0, 0, 1};
> +int const maxaddr[] = {127, 0, 0, 1};
>  int currport = 0;
>  int curraddr[] = {0, 0, 0, 0};

Feel free to commit this, and the patch in your other mail.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]