From owner-svn-src-all@freebsd.org Wed Dec 16 13:12:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8D4EA48504 for ; Wed, 16 Dec 2015 13:12:29 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 66ECE130A for ; Wed, 16 Dec 2015 13:12:28 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-wm0-x233.google.com with SMTP id l126so38854315wml.1 for ; Wed, 16 Dec 2015 05:12:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=from:subject:to:references:cc:message-id:date:user-agent :mime-version:in-reply-to:content-type; bh=Xjc1xgAr/uuhNDjBmBFWQC0qEj7CNnRHgVgQANjBLs0=; b=pj8MbVeFYtvH6EiCJC96BRFH/JpOobwMlpw2hrcjoKXbtfPT6QN6vVUj9bb1c3mKV7 k/y6r6ngj2q+RyaLN2Z7sTt2nSstz/Eenr5VScuGlOngdQeTKGIIUOEoYZed8DMnR3f9 TMj+GjnDwcillw6GOlslSSUQz91omPnXlNK9+kapWGpqtoUPA3IAcK2zeylxQsBDGs+H JLo2oKUpXt86KNGAHL3CaU6gQwakhLhcMI2jfOeKyECGQawnKnmtCKmnGzPa6tnVAIan F0juznsKsJeaKYDisPvm68+16CBVI/bYVjV4XNdkI1GAMtMU9U44bz+CHBnBPVRsTiEp 1pZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:subject:to:references:cc:message-id:date :user-agent:mime-version:in-reply-to:content-type; bh=Xjc1xgAr/uuhNDjBmBFWQC0qEj7CNnRHgVgQANjBLs0=; b=PGBWydA4i2m5yQEMAdnMhZd0PJSu16Z8EsL/5tSSSt/Ucyy9GAq/g7hVrZ4f8w9SwG fDtT169SZYIgpELfY1tFKNhgLaTbx3G9aqRoAl1h3jfgB61eiuM7YgmwXzIZYGIOA8rD B3/ajrAKzmkT0W8AW1YcZED8woG1Cg0VdIPdW03RuYNRE/sq0d9tNmwFYLv2oc/YQRKu u1ptqBEclKmtBAs8gtNb/ms+zvBJLe9pWhHwXgzFqEzIqHV03MlkOhacjOl6OnkrPuYP Hac95+pq8GGZsC20J6QggnSVss0SC8hOctATXHhLlO26pWoYieCcLIFYRQmrBj3dCNln ahag== X-Gm-Message-State: ALoCoQnNSAho33BVXDOhAyLAqsUt3OMWr2Hk6PN5fXjhGsIcwZ4fKzZSkk4cMZWLBBj1PEnwvLoP8XcffwetZ4NshtVC3URkkg== X-Received: by 10.194.188.49 with SMTP id fx17mr54886395wjc.47.1450267778827; Wed, 16 Dec 2015 04:09:38 -0800 (PST) Received: from [10.10.1.58] (liv3d.labs.multiplay.co.uk. [82.69.141.171]) by smtp.gmail.com with ESMTPSA id m16sm25469526wmb.13.2015.12.16.04.09.36 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 16 Dec 2015 04:09:37 -0800 (PST) From: Steven Hartland X-Google-Original-From: Steven Hartland Subject: Re: svn commit: r292275 - in head/sys: net netinet netinet6 To: Kristof Provost References: <201512151602.tBFG2BTX089543@repo.freebsd.org> <8CEE530E-C08D-4BD1-B908-8EBBCEEAD1CD@FreeBSD.org> <1016D8B2-F850-44B9-B773-632BD9ABC95D@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <56715486.1000901@freebsd.org> Date: Wed, 16 Dec 2015 12:09:42 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <1016D8B2-F850-44B9-B773-632BD9ABC95D@FreeBSD.org> Content-Type: multipart/mixed; boundary="------------070407040602050101030405" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Dec 2015 13:12:30 -0000 This is a multi-part message in MIME format. --------------070407040602050101030405 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 15/12/2015 22:58, Kristof Provost wrote: >> On 15 Dec 2015, at 23:15, Kristof Provost wrote: >> Based on the arp_announce() in the backtrace this commit looks like a possible cause. > I see this in arp_announce(): > KP: arp_announce() ifp->if_addr = 0 > > So that explains why we panic in 'lladdr = IF_LLADDR(ifp);’. > > I’ve done a very quick hack: > diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c > index 2214542..9b25356 100644 > --- a/sys/netinet/if_ether.c > +++ b/sys/netinet/if_ether.c > @@ -1246,9 +1246,15 @@ arp_announce(struct ifnet *ifp) > } > IF_ADDR_RUNLOCK(ifp); > > - lladdr = IF_LLADDR(ifp); > - for (i = 0; i < cnt; i++) { > - arp_announce_addr(ifp, head + i, lladdr); > + printf("KP: %s() ifp = %p\n", __FUNCTION__, ifp); > + printf("KP: %s() ifp->if_addr = %p\n", __FUNCTION__, ifp->if_addr); > + > + if (ifp->if_addr) { > + printf("KP: %s() ifp->if_addr->ifa_addr = %p\n", __FUNCTION__, ifp->if_addr->ifa_addr); > + lladdr = IF_LLADDR(ifp); > + for (i = 0; i < cnt; i++) { > + arp_announce_addr(ifp, head + i, lladdr); > + } > } > free(head, M_TEMP); > } > > With this patch the device boots. I haven’t been able to verify if everything works because of a different issue ("Shared object "lib80211.so.1" not found, required by “ifconfig””, no doubt just a small problem with the freebsd-wifi-build scripts). > > Regards, > Kristof Thanks for all the info Kristof appreciated. It seems really odd that you're getting a link up event for an interface that doesn't have a LLA, so I'm wondering if this is the result of an issue elsewhere which this change brings to light, its as though if_attach hasn't been called. Looking at your trace the device seems to be an arswitch. If it never allocates a LLA to each port then maybe the more correct fix would be to ensure it IFF_NOARP in if_flags? I've attached a patch which should fix if you could test that would be great, but I'd still like to understand if there is something wrong elsewhere before I do. Regards Steve --------------070407040602050101030405 Content-Type: text/plain; charset=UTF-8; name="if_ether_arp.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="if_ether_arp.patch" SW5kZXg6IHN5cy9uZXRpbmV0L2lmX2V0aGVyLmMKPT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gc3lzL25l dGluZXQvaWZfZXRoZXIuYwkocmV2aXNpb24gMjkyMjc1KQorKysgc3lzL25ldGluZXQvaWZf ZXRoZXIuYwkod29ya2luZyBjb3B5KQpAQCAtMTIwOSw3ICsxMjA5LDggQEAgYXJwX2Fubm91 bmNlKHN0cnVjdCBpZm5ldCAqaWZwKQogCXN0cnVjdCBpZmFkZHIgKmlmYTsKIAlzdHJ1Y3Qg aW5fYWRkciAqYWRkciwgKmhlYWQ7CiAKLQlpZiAoIShpZnAtPmlmX2ZsYWdzICYgSUZGX1VQ KSB8fCAoaWZwLT5pZl9mbGFncyAmIElGRl9OT0FSUCkpCisJaWYgKCEoaWZwLT5pZl9mbGFn cyAmIElGRl9VUCkgfHwgKGlmcC0+aWZfZmxhZ3MgJiBJRkZfTk9BUlApIHx8CisJICAgIGlm cC0+aWZfYWRkciA9PSBOVUxMKQogCQlyZXR1cm47CiAKIAllbnRyaWVzID0gODsKQEAgLTEy NDYsOSArMTI0NywxMSBAQCBhcnBfYW5ub3VuY2Uoc3RydWN0IGlmbmV0ICppZnApCiAJfQog CUlGX0FERFJfUlVOTE9DSyhpZnApOwogCi0JbGxhZGRyID0gSUZfTExBRERSKGlmcCk7Ci0J Zm9yIChpID0gMDsgaSA8IGNudDsgaSsrKSB7Ci0JCWFycF9hbm5vdW5jZV9hZGRyKGlmcCwg aGVhZCArIGksIGxsYWRkcik7CisJaWYgKGNudCA+IDApIHsKKwkJbGxhZGRyID0gSUZfTExB RERSKGlmcCk7CisJCWZvciAoaSA9IDA7IGkgPCBjbnQ7IGkrKykgeworCQkJYXJwX2Fubm91 bmNlX2FkZHIoaWZwLCBoZWFkICsgaSwgbGxhZGRyKTsKKwkJfQogCX0KIAlmcmVlKGhlYWQs IE1fVEVNUCk7CiB9Cg== --------------070407040602050101030405--