From owner-freebsd-net@FreeBSD.ORG Wed Oct 16 19:14:15 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 39C28F32 for ; Wed, 16 Oct 2013 19:14:15 +0000 (UTC) (envelope-from raitech@gmail.com) Received: from mail-pa0-x232.google.com (mail-pa0-x232.google.com [IPv6:2607:f8b0:400e:c03::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 13A1A24A8 for ; Wed, 16 Oct 2013 19:14:15 +0000 (UTC) Received: by mail-pa0-f50.google.com with SMTP id fa1so1494987pad.9 for ; Wed, 16 Oct 2013 12:14:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=raEGGPgLLng9OuvKV/cnLB07WXabPM4D+ggHjxB139s=; b=VSTcwflgsBVlCMpniRhYvtpU+yX0Lk6xcW0roan9rHCZ5Wu6zDElrQLNOoQY7hNGRz 7ansrv+kMnnr4W1ZBiGL4c6ttUvviUjGR8h4d09O6qZYdPNI+ZJwmBRXSUpEsM1u0Frt rYE/MEQoI7rWPGj7BZIoh2Za0tJCw3tc7Lft/KP6tHjuNYv/P/hXx/i4W1RSE7rG4Rv5 OuSBnfbUnMTCoyPOSJcvO7vVjUYYh/HnGwqRAzH4grMvdiEULCkX7ZtqGToX5rzL2nax 1Hl8Wyi7uF5ocvvMCsmGqTdqwRaJ8edqdAM6D+F7KtEez78YyWymuRFOUh/0xVGb7zct 6Bug== X-Received: by 10.66.66.11 with SMTP id b11mr5207842pat.154.1381950854697; Wed, 16 Oct 2013 12:14:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.70.101.70 with HTTP; Wed, 16 Oct 2013 12:13:54 -0700 (PDT) In-Reply-To: References: From: Raimundo Santos Date: Wed, 16 Oct 2013 16:13:54 -0300 Message-ID: Subject: Re: ifconfig: ioctl (SIOCAIFADDR): File exists - but not only with alias command To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Oct 2013 19:14:15 -0000 On 16 October 2013 15:54, Alan Somers 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?