From owner-freebsd-bugs@FreeBSD.ORG Sat Apr 25 02:50:03 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EAE4106566C for ; Sat, 25 Apr 2009 02:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 072088FC14 for ; Sat, 25 Apr 2009 02:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n3P2o2gu024783 for ; Sat, 25 Apr 2009 02:50:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n3P2o2TU024782; Sat, 25 Apr 2009 02:50:02 GMT (envelope-from gnats) Resent-Date: Sat, 25 Apr 2009 02:50:02 GMT Resent-Message-Id: <200904250250.n3P2o2TU024782@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dmitry Marakasov Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18B8A1065670 for ; Sat, 25 Apr 2009 02:45:25 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from smtp.timeweb.ru (smtp.timeweb.ru [217.170.79.85]) by mx1.freebsd.org (Postfix) with ESMTP id 98A938FC19 for ; Sat, 25 Apr 2009 02:45:24 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from [213.148.20.85] (helo=hive.panopticon) by smtp.timeweb.ru with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1LxXtM-0003ip-C8 for FreeBSD-gnats-submit@freebsd.org; Sat, 25 Apr 2009 06:45:24 +0400 Received: from hades.panopticon (hades.panopticon [192.168.0.32]) by hive.panopticon (Postfix) with ESMTP id 37B486C48 for ; Sat, 25 Apr 2009 06:45:57 +0400 (MSD) Received: by hades.panopticon (Postfix, from userid 1000) id 0EE10108841; Sat, 25 Apr 2009 06:44:43 +0400 (MSD) Message-Id: <20090425024443.0EE10108841@hades.panopticon> Date: Sat, 25 Apr 2009 06:44:43 +0400 (MSD) From: Dmitry Marakasov To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: bin/133987: [rc.d] defaultroute broken with DHCP in some cases X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Dmitry Marakasov List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2009 02:50:03 -0000 >Number: 133987 >Category: bin >Synopsis: [rc.d] defaultroute broken with DHCP in some cases >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Apr 25 02:50:02 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Dmitry Marakasov >Release: FreeBSD 8.0-CURRENT i386 >Organization: >Environment: System: FreeBSD hades.panopticon 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Sat Apr 25 04:57:52 MSD 2009 root@hades.panopticon:/async/obj/usr/src/sys/HADES i386 >Description: There's problem when using DHCP at least with ale(4) interface: unless using synchronous_dhclient="YES", interface won't get IP address at all on boot -> the box will end up without default route and with most of network services failing to start. The cause of this is the check at the start of defaultroute_start (/etc/rc.d/defaultroute): it will only wait for default route if there's DHCP-configured interface with carrier. ale, however, usually happens to be DOWN by the time defaultroute is executed -> no wait for default route -> broken boot. Here's the boot log for the case when synchronous_dhclient="YES" is used. Note interface being DOWN by the time rc is executed, and going UP couple of seconds after. --- ale0: port 0xdc00-0xdc7f mem 0xfe9c0000-0xfe9fffff irq 17 at device 0.0 on pci2 ale0: 960 Tx FIFO, 1024 Rx FIFO ale0: Using 1 MSI messages. miibus0: on ale0 atphy0: PHY 0 on miibus0 atphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, auto ale0: Ethernet address: 00:22:15:75:15:b2 ale0: [FILTER] ... (many other devices) ale0: changing name to 'panopticon' panopticon: link state changed to DOWN panopticon: no link .....panopticon: link state changed to UP got link DHCPREQUEST on panopticon to 255.255.255.255 port 67 DHCPREQUEST on panopticon to 255.255.255.255 port 67 DHCPACK from 192.168.0.2 bound to 192.168.0.32 -- renewal in 43200 seconds. --- >How-To-Repeat: Boot with single ale(4) interface configured with DHCP. >Fix: The solution is probably to remove check for carrier in defaultroute_start() at all. That'll lead to extra 30 second wait for the people booting with no net access at all, but will ensure correct boot for others. brooks@ has even better idea: http://www.mail-archive.com/svn-src-all@freebsd.org/msg08127.html >Release-Note: >Audit-Trail: >Unformatted: