From owner-freebsd-current@FreeBSD.ORG Wed Dec 19 02:01:12 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C446516A41B; Wed, 19 Dec 2007 02:01:12 +0000 (UTC) (envelope-from dunstan@freebsd.czest.pl) Received: from freebsd.czest.pl (freebsd.czest.pl [80.48.250.4]) by mx1.freebsd.org (Postfix) with ESMTP id 43FCD13C461; Wed, 19 Dec 2007 02:01:12 +0000 (UTC) (envelope-from dunstan@freebsd.czest.pl) Received: from freebsd.czest.pl (freebsd.czest.pl [80.48.250.4]) by freebsd.czest.pl (8.13.4/8.12.9) with ESMTP id lBJ2oPoK007019; Wed, 19 Dec 2007 02:50:25 GMT (envelope-from dunstan@freebsd.czest.pl) Received: (from dunstan@localhost) by freebsd.czest.pl (8.13.4/8.12.9/Submit) id lBJ2oPcw007018; Wed, 19 Dec 2007 02:50:25 GMT (envelope-from dunstan) Date: Wed, 19 Dec 2007 02:50:24 +0000 From: "Wojciech A. Koszek" To: freebsd-current@freebsd.org Message-ID: <20071219025024.GA6966@FreeBSD.czest.pl> Mail-Followup-To: "Wojciech A. Koszek" , freebsd-current@freebsd.org, simokawa@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-2.0.2 (freebsd.czest.pl [80.48.250.4]); Wed, 19 Dec 2007 02:50:25 +0000 (UTC) Cc: simokawa@freebsd.org Subject: FireWire causes hang at boot X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Dec 2007 02:01:12 -0000 Hello, This report is about -CURRENT (20071217). Kernel on my ASUS A7N8X motherboard (with FireWire controller) hangs after disk has been detected and GEOM_LABEL labels are probed: GEOM: new disk ad2 ad2: nVidia check1 failed ad2: Adaptec check1 failed ad2: LSI (v3) check1 failed ad2: LSI (v2) check1 failed ad2: FreeBSD check1 failed GEOM_LABEL: Label for provider ad2s2a is label/daemon.fs. GEOM_LABEL: Label for provider ad2s2b is label/daemon.swap. Sometimes, if I plug and unplug the FireWire cable (several times), boot continues. Hardware: fwohci0: <1394 Open Host Controller Interface> mem 0xe8086000-0xe80867ff,0xe8087000-0xe808703f irq 9 at device 13.0 on pci0 fwohci0: [FILTER] fwohci0: OHCI version 1.10 (ROM=0) fwohci0: No. of Isochronous channels is 4. fwohci0: EUI64 00:e0:18:00:00:6c:d5:4a fwohci0: Phy 1394a available S400, 2 ports. fwohci0: Link S400, max_rec 2048 bytes. firewire0: on fwohci0 dcons_crom0: on firewire0 dcons_crom0: bus_addr 0xbf6460 fwe0: on firewire0 if_fwe0: Fake Ethernet address: 02:e0:18:6c:d5:4a fwe0: Ethernet address: 02:e0:18:6c:d5:4a fwip0: on firewire0 fwip0: Firewire address: 00:e0:18:00:00:6c:d5:4a @ 0xfffe00000000, S400, maxrec 2048 sbp0: on firewire0 fwohci0: Initiate bus reset fwohci0: BUS reset fwohci0: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode After reboot, I jumped to the debugger, set firewire_debug = 1 and this time I saw a huge number of messages coming from: static void fw_explore(struct firewire_comm *fc): Citation of firewire.c: [cut] for (node = 0; node <= fc->max_node; node ++) { /* We don't probe myself and linkdown nodes */ if (node == fc->nodeid) continue; fwsid = fw_find_self_id(fc, node); if (!fwsid || !fwsid->p0.link_active) { if (firewire_debug) printf("node%d: link down\n", node); continue; } nodes[todo++] = node; } [cut] It's iterating infinitely on my system. I set some breakpoints and: db> c node258: link down [thread pid 19 tid 100030 ] Breakpoint at fw_bus_probe_thread+304: addl $1,4294966116(%ebp) db> step [thread pid 19 tid 100030 ] Stopped at fw_bus_probe_thread+311: movl 4294966116(%ebp),%ecx db> step [thread pid 19 tid 100030 ] Stopped at fw_bus_probe_thread+317: movl 4294966104(%ebp),%eax db> step [thread pid 19 tid 100030 ] Stopped at fw_bus_probe_thread+323: cmpl %ecx,32(%eax) db> step [thread pid 19 tid 100030 ] Stopped at fw_bus_probe_thread+326: jnb fw_bus_probe_thread+192 db> p/x $eax c2eda000 <- fc db> p/x $eax+32 c2eda020 <- fc->max_node db> p/x *0xc2eda020 ffffffff <- it looks like it's wrong db> p/x $ecx 103 db> p/d $ecx <- it's "node" it that context. 259 -- Wojciech A. Koszek wkoszek@FreeBSD.org http://FreeBSD.czest.pl/dunstan/