NetBSD Problem Report #47782
From www@NetBSD.org Mon Apr 29 13:54:20 2013
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
by www.NetBSD.org (Postfix) with ESMTP id A390463EC86
for <gnats-bugs@gnats.NetBSD.org>; Mon, 29 Apr 2013 13:54:20 +0000 (UTC)
Message-Id: <20130429135419.DE9D563EC86@www.NetBSD.org>
Date: Mon, 29 Apr 2013 13:54:19 +0000 (UTC)
From: smj@cirr.com
Reply-To: smj@cirr.com
To: gnats-bugs@NetBSD.org
Subject: intermittent issue ifconfig cannot assign link-local address
X-Send-Pr-Version: www-1.0
>Number: 47782
>Category: kern
>Synopsis: intermittent issue with bge(4): ifconfig cannot assign link-local address
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: msaitoh
>State: analyzed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Apr 29 13:55:00 +0000 2013
>Closed-Date:
>Last-Modified: Fri Aug 30 02:54:25 +0000 2013
>Originator: Stephen Jones
>Release: 6.0.1, 6.1_RC3
>Organization:
>Environment:
NetBSD testhost 6.0.1 NetBSD 6.0.1 (GENERIC) amd64
>Description:
I'm seeing an issue with ifconfig failing in an unpredictable way which may be related to inet6.
For instance:
$ ksh network stop
Stopping network.
Deleting aliases.
Downing network interfaces: bge0 bge1.
$ ksh network start
Starting network.
Hostname: NetBSD
NIS domainname: NetBSD
IPv6 mode: host
Configuring network interfaces: bge0 bge1.
Adding interface aliases:.
add net default: gateway x.x.x.x
Works fine, but then doing the same command again:
$ ksh /etc/rc.d/network stop
Stopping network.
Deleting aliases.
Downing network interfaces: bge0 bge1.
$ ksh /etc/rc.d/network start
Starting network.
Hostname: NetBSD
NIS domainname: NetBSD
bge0: cannot assign link-local address
bge0: cannot assign link-local address
IPv6 mode: host
Configuring network interfaces: bge0ifconfig: exec_matches: Invalid argument
ifconfig: SIOCSIFMEDIA: Invalid argument
bge1.
Adding interface aliases:.
route: writing to routing socket: Network is unreachable
add net default: gateway x.x.x.x: Network is unreachable
And a basic ifconfig fails as well:
$ ifconfig bge0 inet x.x.x.x netmask 255.255.255.0 media 1000baseT mediaopt full-duplex
ifconfig: SIOCSIFMEDIA: Invalid argument
bge0: cannot assign link-local address
bge0: cannot assign link-local address
I have not changed the switch or with the physical interface, so it seems to be software issue.
The odd thing is that reboot a couple of times will allow the machine to come up as it should.
NetBSD 6.0.1 and 6.1_RC3 GENERIC. This seems to only affect the bge0 interface and never the bge1 interface. Both have similar ifconfig.xxxx files (IPs differ) and it also affects the other machines I'm working with.
>How-To-Repeat:
It is intermittent, but either stopping and starting the network or just booting with auto network configuration may cause it. a simple ifconfig bge0 x.x.x.x will fail with a SIOCSIMEDIA. When the interface is in this state, ifconfig bge0 under media: will report 'Ethernet none (1000baseT full-duplex)'
/etc/ifconfig.bge0 looks like:
up
x.x.x.x netmask 255.255.255.0 media 1000baseT mediaopt full-duplex
>Fix:
None known
>Release-Note:
>Audit-Trail:
From: Masanobu SAITOH <msaitoh@execsw.org>
To: "Stephen M. Jones" <smj@cirr.com>
Cc: port-amd64@netbsd.org, msaitoh@execsw.org, gnats-bugs@NetBSD.org,
gnats-admin@netbsd.org
Subject: Re: port-amd64/47782 - ifconfig SIOCSIFMEDIA error with bge
Date: Thu, 02 May 2013 11:51:54 +0900
(2013/05/02 2:47), Stephen M. Jones wrote:
> Just a quick follow up to port-amd64/47782
>
> I did a fresh install on several SuperMicro amd64 servers with bge ethernet
> interfaces and configured both bge's in an acceptable fashion. I then clean
> booted the servers 865 times to gather some stats.
>
> Background: I'm using NetBSD ukato 6.0.1 NetBSD 6.0.1 (GENERIC) amd64. I
> was using a custom kernel with bge/brgphy, but thought for this test using
> generic would be best.
>
> ifconfig.bge0:
> up
> media autoselect
> 192.94.73.7 netmask 0xffffff00 media autoselect
>
> ifconfig.bge1:
> up
> media autoselect
> 10.0.0.7 netmask 0xffffff00 media autoselect
>
> bge1 always had its interface successfully configured. However, bge0
> failed with an ifconfig: SIOCSIFMEDIA: Invalid argument 343 times, but was
> successful 522 times (total of 865 clean boots).
>
> For media and mediaopts I did implicitly set those, but still ran into issues
> with bge0 failing iwth a SIOCSIFMEDIA. When the interface is in this state,
> you cannot even do a simple ifconfig bge0 192.94.73.7 to bring the interface
> up even by doing a ksh /etc/rc.d/network stop first. I believe that this
> is likely a serious bug. Originally I thought that this may be an autoneg
> issue with the switch, but simple ifconfigs are failing without a reboot.
>
> However, if I'm overlooking something that has changed between NetBSD 4.0.1
> and 6.x, please feel free to stick my nose in it.
Could you show me the full dmesg of the machine with BGE_DEBUG option?
--
-----------------------------------------------
SAITOH Masanobu (msaitoh@execsw.org
msaitoh@netbsd.org)
Responsible-Changed-From-To: port-amd64-maintainer->kern-bug-people
Responsible-Changed-By: dholland@NetBSD.org
Responsible-Changed-When: Thu, 02 May 2013 07:01:42 +0000
Responsible-Changed-Why:
this is a problem with the bge driver (and/or hardware) until proven
otherwise, and therefore not port-specific.
Responsible-Changed-From-To: kern-bug-people->msaitoh
Responsible-Changed-By: msaitoh@NetBSD.org
Responsible-Changed-When: Fri, 30 Aug 2013 02:54:25 +0000
Responsible-Changed-Why:
mine.
State-Changed-From-To: open->analyzed
State-Changed-By: msaitoh@NetBSD.org
State-Changed-When: Fri, 30 Aug 2013 02:54:25 +0000
State-Changed-Why:
Submitter reported me that the following mail's patch solve the problem.
http://mail-index.netbsd.org/current-users/2013/08/29/msg023236.html
This patch will be pulled up in near future.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.