From owner-freebsd-net@FreeBSD.ORG Fri Sep 21 23:38:33 2007 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F16F16A41B for ; Fri, 21 Sep 2007 23:38:33 +0000 (UTC) (envelope-from muffaleta@gmail.com) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.191]) by mx1.freebsd.org (Postfix) with ESMTP id EE90A13C44B for ; Fri, 21 Sep 2007 23:38:32 +0000 (UTC) (envelope-from muffaleta@gmail.com) Received: by fk-out-0910.google.com with SMTP id b27so1171412fka for ; Fri, 21 Sep 2007 16:38:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=9sjgNGrwnr6zG5LbGOmzc6iD+nfz1KzZm5ERLa11Xao=; b=CEg5F7Y7kUyDnbg9zNZiBPfgNtCMiBW9lFN7I3oos278eCJSsBYRLLG8udvLU+Nmii5bfOYf7lOgfTtzoNx6RsjGw1xLj3MNNQAnvV5fPl7VwOqZ85bokr/ct6WG47IjTYIzWSM0T2ccPE1tV/PKbCInA1EdikB/G7TAg8N7uQc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ek+RSEmQJeY9cswUHQuPNT2QAoQUEB3pf1KaZ9Bxlpv3rD14wbWBNF7KcYDxLYjN9SUkzhy1JpDcqTZqDW91C/lcb/C8v8UsTSrFJAbg8QbeyNqZonxzw33189AV/1wIo2akYnSSfORNKxisyQxiZv2K7QNPw53rtX3wDv2kMiI= Received: by 10.82.189.6 with SMTP id m6mr5731944buf.1190417910656; Fri, 21 Sep 2007 16:38:30 -0700 (PDT) Received: by 10.82.108.1 with HTTP; Fri, 21 Sep 2007 16:38:30 -0700 (PDT) Message-ID: <7bc80d500709211638ha9d53e7ke4d3bd65471b63eb@mail.gmail.com> Date: Fri, 21 Sep 2007 16:38:30 -0700 From: "Christopher Chen" To: "Max Laier" In-Reply-To: <7bc80d500709201552r563a2708o9f2e63474bd55bcd@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <7bc80d500709201457p5be576e3hdbe0fc536493497a@mail.gmail.com> <200709210033.05263.max@love2party.net> <7bc80d500709201552r563a2708o9f2e63474bd55bcd@mail.gmail.com> Cc: freebsd-net@freebsd.org Subject: Re: Creation of carp interface on amd64 spins X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Sep 2007 23:38:33 -0000 On 9/20/07, Christopher Chen wrote: > On 9/20/07, Max Laier wrote: > > On Thursday 20 September 2007, Christopher Chen wrote: > > > Hi: > > > > > > I'm running 6.2-RELEASE on some Pentium D's running and amd64 port. > > > > > > I'm doing some mildly interesting things with vlan tagging, etc, and I > > > want to also set up carp. On identical machines running the i386 port, > > > this works correctly, but when running > > > > > > ifconfig carp0 > > > > > > For instance, the process just spins and can't be killed. The rest of > > > the machine is fine, though! > > > > > > This is 6.2-RELEASE/amd64 running in SMP mode. > > > > > > Any ideas? > > > > Can you tell me what "^T" or ps gives for the spinning process? Does it > > hang in userland or kernel? Can you try to trace the ifconfig, or - if > > the hang is in the kernel - break into the kernel debugger and get a back > > trace for the process? > > Max: > > load: 1.62 cmd: ifconfig 920 [runnable] 0.00u 96.02s 98% 920k > > That's what ^T says. I'm going to reboot and ktrace it now. So here's > the last few lines of the ktrace: > > 944 ifconfig CALL modstat(0x10a,0x7fffffffe280) > 944 ifconfig RET modstat 0 > 944 ifconfig CALL modfnext(0x10a) > 944 ifconfig RET modfnext 267/0x10b > 944 ifconfig CALL modstat(0x10b,0x7fffffffe280) > 944 ifconfig RET modstat 0 > 944 ifconfig CALL socket(0x2,0x2,0) > 944 ifconfig RET socket 3 > 944 ifconfig CALL ioctl(0x3,SIOCIFCREATE,0x514ce0) > > l# lsof -p 944 > COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME > ifconfig 944 root cwd VDIR 0,77 512 16525 /root > ifconfig 944 root rtd VDIR 0,77 512 2 / > ifconfig 944 root txt VREG 0,77 80296 48 /sbin/ifconfig > ifconfig 944 root txt VREG 0,77 192688 116 > /libexec/ld-elf.so.1 > ifconfig 944 root txt VREG 0,77 7424 24794 /lib/libipx.so.3 > ifconfig 944 root txt VREG 0,77 1083208 24786 /lib/libc.so.6 > ifconfig 944 root 0u VCHR 0,93 0t2101 93 /dev/ttyp0 > ifconfig 944 root 1u VCHR 0,93 0t2101 93 /dev/ttyp0 > ifconfig 944 root 2u VCHR 0,93 0t2101 93 /dev/ttyp0 > ifconfig 944 root 3u IPv4 0xffffff002d459130 0t0 UDP *:* > > Sorry I don't have physical access so I can't break into the kernel > debugger right now. Aha! Some data! Okay so I got the console cable attached with DDB. So far so good. But here's something else. With DDB/KDB enabled in the kernel, suddenly ifconfig carp0 create works! Sounds like some sort of race condition, maybe? But when destroying the interfaces, I get this: << kernel trap 12 with interrupts disabled Fatal trap 12: page fault while in kernel mode fault virtual address = 0x48 fault code = supervisor read, page not present instruction pointer = 0x8:0xffffffff80430035 stack pointer = 0x10:0xffffffffa54b2ab0 frame pointer = 0x10:0xffffffffa54b2af0 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags = resume, IOPL = 0 current process = 11 (swi4: clock sio) [thread pid 11 tid 100002 ] Stopped at propagate_priority+0x75: movq 0x48(%r15),%rdi db> trace Tracing pid 11 tid 100002 td 0xffffff003dba2980 propagate_priority() at propagate_priority+0x75 turnstile_wait() at turnstile_wait+0x20f _mtx_lock_sleep() at _mtx_lock_sleep+0x89 carp_send_ad() at carp_send_ad+0xa9 softclock() at softclock+0x21a ithread_loop() at ithread_loop+0x162 fork_exit() at fork_exit+0x86 fork_trampoline() at fork_trampoline+0xe --- trap 0, rip = 0, rsp = 0xffffffffa54b2d00, rbp = 0 --- >> Wow! -- Chris Chen "I want the kind of six pack you can't drink." -- Micah