Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Oct 2013 16:13:54 -0300
From:      Raimundo Santos <raitech@gmail.com>
To:        freebsd-net@freebsd.org
Subject:   Re: ifconfig: ioctl (SIOCAIFADDR): File exists - but not only with alias command
Message-ID:  <CAGQ6iC8F-WNWC6YP7-KnmWHY47ZeBKi41ksTL%2BoQ2PjDmYcxDw@mail.gmail.com>
In-Reply-To: <CAOtMX2iVnT2vmXTyqgOAEm51XhzhL6M14Nf719KotN9Oamk0fg@mail.gmail.com>
References:  <CAGQ6iC-fKZARrqQrhbswS3YGZqOfOctR9C7B6xSO43LnXh_yTw@mail.gmail.com> <CAOtMX2iVnT2vmXTyqgOAEm51XhzhL6M14Nf719KotN9Oamk0fg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 16 October 2013 15:54, Alan Somers <asomers@freebsd.org> wrote:

>
>
> I ran into the same problem, on a system with LAGGs, multiple FIBs and
> multiple aliases per interface.  I believe that the problem was due to
> a race condition in the kernel.  Two process tried to SIOCAIFADDR with
> the same address simultaneously.  The second one of them failed and
> printed the error message that you see.  But due to the race, the
> first process reported success, yet the interface did not get the
> address.  Unfortunately, I was unable to locate the race.  My solution
> was to prevent two processes from trying to initialize the interface
> at the same time.  The first process was our custom management
> software, which calls "service netif cloneup lagg0" and "service netif
> start lagg0" in rapid succession.  The second process was devd, which
> was trying to initialize the newly attached lagg0 interface.  I
> commented out the following lines in /etc/devd.conf and the problem
> went away.  I don't know if this will solve your problem, but I
> recommend that you use dtrace or some other method to determine
> whether two processes are trying to SIOCAIFADDR at the same time.
>
> notify 0 {
>         match "system"          "IFNET";
>         match "type"            "ATTACH";
>         action "/etc/pccard_ether $subsystem start";
> };
>
>
Hey Alan!

Well, I don`t think it is the problem here. I just try to do a very simple
ifconfig, nothing more, there are no private applications running (I have
postgres siting around and munin gathering sysinfo to me). I was thinking
about some problem in the interaction ifconfig/adresses + routed, but this
is very strange.

In a less destructive test (the first one took me to reboot the machine), I
see a confusing behavior:

. put a alias into an igb1
. remove this alias (-alias)
. printing the main (#0) FIB, nothing is there related to the removed alias
. put the same alias again
. get the File exists result and no configuration of an alias over the igb1
. but now, listing the main routing table, there are info about that
alias!, but in another port of the NIC, igb2

How is this possible?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGQ6iC8F-WNWC6YP7-KnmWHY47ZeBKi41ksTL%2BoQ2PjDmYcxDw>