From owner-freebsd-current@FreeBSD.ORG Tue Feb 24 00:06:07 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A519416A4CE; Tue, 24 Feb 2004 00:06:07 -0800 (PST) Received: from mail.evip.pl (mail.evip.com.pl [212.244.157.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id 830FA43D2D; Tue, 24 Feb 2004 00:06:06 -0800 (PST) (envelope-from w@evip.pl) Received: from drwebc by mail.evip.pl with drweb-scanned (Exim 4.22) id 1AvXZq-0001c8-KY; Tue, 24 Feb 2004 09:06:02 +0100 Received: from w by mail.evip.pl with local (Exim 4.22) id 1AvXZq-0001c2-HO; Tue, 24 Feb 2004 09:06:02 +0100 Date: Tue, 24 Feb 2004 09:06:02 +0100 From: Wiktor Niesiobedzki To: Brian Fundakowski Feldman Message-ID: <20040224080602.GR41571@mail.evip.pl> References: <200402172237.i1HMbUil004964@green.homeunix.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200402172237.i1HMbUil004964@green.homeunix.org> User-Agent: Mutt/1.4i Sender: Wiktor Niesiobedzki cc: current@freebsd.org Subject: Re: pipe crash X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Tue, 24 Feb 2004 08:06:07 -0000 On Tue, Feb 17, 2004 at 05:37:29PM -0500, Brian Fundakowski Feldman wrote: > This is semi-repeatable. While doing a ports build, during the lib-dependency > -check phase, ldconfig -r is called and hangs when the port is trying to > check for a library, e.g. I see the output: > ===> xmms-imms-1.0 depends on shared library: id3 - found > ===> xmms-imms-1.0 depends on shared library: vorbis.3 > at which point that process is stuck in pipdwt. I gdb'ed my kernel at this > point and got a backtrace: > > (kgdb) bt > #0 sched_switch (td=0xc2bbebd0) at ../../../kern/sched_4bsd.c:671 > #1 0xc04a76ab in mi_switch (flags=0xc2bbebd0) at ../../../kern/kern_synch.c:518 > #2 0xc04a6e27 in msleep (ident=0xc2803480, mtx=0xc28035d8, priority=0x14c, wmesg=0xc06306b5 "pipdwt", timo=0x0) > at ../../../kern/kern_synch.c:254 > #3 0xc04cc35a in pipe_direct_write (wpipe=0xc2803480, uio=0x0) at ../../../kern/sys_pipe.c:899 > #4 0xc04cc7db in pipe_write (fp=0xc2c97d8c, uio=0xd85cec80, active_cred=0xc316a200, flags=0x0, td=0xc2bbebd0) > at ../../../kern/sys_pipe.c:1009 > #5 0xc04c929c in dofilewrite (td=0xc2bbebd0, fp=0xc2c97d8c, fd=0x0, buf=0x804f000, nbyte=0x0, offset=0x0, flags=0x0) > at ../../../sys/file.h:249 > #6 0xc04c90ce in write (td=0xc2bbebd0, uap=0xd85ced14) at ../../../kern/sys_generic.c:334 > #7 0xc0603b62 in syscall (frame= > {tf_fs = 0x2f, tf_es = 0x2f, tf_ds = 0x2f, tf_edi = 0x804f000, tf_esi = 0x4000, tf_ebp = 0xbfbfe548, tf_isp = 0xd85ced74, tf_ebx = 0x281430cc, tf_edx = 0x28142f38, tf_ecx = 0x28142f38, tf_eax = 0x4, tf_trapno = 0x0, tf_err = 0x2, tf_eip = 0x280c980f, tf_cs = 0x1f, tf_eflags = 0x216, tf_esp = 0xbfbfe52c, tf_ss = 0x2f}) at ../../../i386/i386/trap.c:1008 > > Now, here's the weird part: > > (kgdb) p *wpipe > $1 = {pipe_buffer = {cnt = 0x0, in = 0x0, out = 0x0, size = 0x4000, buffer = 0x0}, pipe_map = {kva = 0xd8760000, > cnt = 0x4000, pos = 0x0, npages = 0x4, ms = {0xc11b5030, 0xc1311c78, 0xc125dcc0, 0xc12504c0, > 0x0 }}, pipe_sel = {si_thrlist = {tqe_next = 0x0, tqe_prev = 0x0}, si_thread = 0x0, si_note = { > slh_first = 0x0}, si_flags = 0x0}, pipe_atime = {tv_sec = 0x40328142, tv_nsec = 0x0}, pipe_mtime = { > tv_sec = 0x40328142, tv_nsec = 0x0}, pipe_ctime = {tv_sec = 0x40328142, tv_nsec = 0x0}, pipe_sigio = 0x0, > pipe_peer = 0xc280352c, pipe_pair = 0xc2803480, pipe_state = 0xc00, pipe_busy = 0x1, pipe_present = 0x0} I've got similar crash, when I tried to kill today sort that was part of periodic.weekly script, and which was still hanging around. Afrter kill I got page fault, and very similar backtrace: (kgdb) bt #0 doadump () at /usr/src/sys/kern/kern_shutdown.c:240 #1 0xc0492d13 in boot (howto=256) at /usr/src/sys/kern/kern_shutdown.c:374 #2 0xc04930d7 in __panic () at /usr/src/sys/kern/kern_shutdown.c:552 #3 0xc05a3d56 in trap_fatal (frame=0xced68b6c, eva=0) at /usr/src/sys/i386/i386/trap.c:821 #4 0xc05a39e2 in trap_pfault (frame=0xced68b6c, usermode=0, eva=0) at /usr/src/sys/i386/i386/trap.c:735 #5 0xc05a35a3 in trap (frame= {tf_fs = 24, tf_es = 16, tf_ds = 16, tf_edi = 0, tf_esi = -823435264, tf_ebp = -824800300, tf_isp = -824800360, tf_ebx = -1029943936, tf_edx = 4, tf_ecx = 2666, tf_eax = 823435264, tf_trapno = 12, tf_err = 2, tf_eip = -1067836450, tf_cs = 8, tf_eflags = 66070, tf_esp = -823435264, tf_ss = 10664}) at /usr/src/sys/i386/i386/trap.c:420 #6 0xc05a1bde in generic_bcopy () at {standard input}:221 #7 0xc04c179c in pipe_direct_write (wpipe=0xc29c4d80, uio=0x0) at /usr/src/sys/kern/sys_pipe.c:907 #8 0xc04c1b69 in pipe_write (fp=0xc2b1f550, uio=0xced68c80, active_cred=0xc29ed880, flags=0, td=0xc2b3f930) at /usr/src/sys/kern/sys_pipe.c:1007 #9 0xc04be4bb in dofilewrite (td=0xc2b3f930, fp=0xc2b1f550, fd=0, buf=0x885d000, nbyte=0, offset=0, flags=0) at /usr/src/sys/sys/file.h:249 #10 0xc04be2de in write (td=0xc2b3f930, uap=0xced68d14) at /usr/src/sys/kern/sys_generic.c:334 #11 0xc05a4090 in syscall (frame= {tf_fs = 47, tf_es = 47, tf_ds = 47, tf_edi = 142987264, tf_esi = 10664, tf_ebp = -1077941448, tf_isp = -824799884, tf_ebx = 1209327852, tf_edx = 1209327448, tf_ecx = 1209327448, tf_eax = 4, tf_trapno = 0, tf_err = 2, tf_eip = 1208820031, tf_cs = 31, tf_eflags = 530, tf_esp = -1077941476, tf_ss = 47}) at /usr/src/sys/i386/i386/trap.c:1010 #12 0x480d213f in ?? () ---Can't read userspace from dump, or kernel process--- And: (kgdb) p *wpipe $1 = {pipe_buffer = {cnt = 10664, in = 10664, out = 0, size = 16384, buffer = 0x0}, pipe_map = {kva = 3471532032, cnt = 10664, pos = 0, npages = 3, ms = {0xc0fc45b0, 0xc0ff5df8, 0xc0f70dc0, 0xc0e9a008, 0x0 }}, pipe_sel = {si_thrlist = {tqe_next = 0x0, tqe_prev = 0x0}, si_thread = 0x0, si_note = {slh_first = 0x0}, si_flags = 0}, pipe_atime = {tv_sec = 1077333432, tv_nsec = 0}, pipe_mtime = {tv_sec = 1077333432, tv_nsec = 0}, pipe_ctime = {tv_sec = 1077333431, tv_nsec = 0}, pipe_sigio = 0x0, pipe_peer = 0xc29c4e2c, pipe_pair = 0xc29c4d80, pipe_state = 2304, pipe_busy = 1, pipe_present = 0} Hope that helps anyone. Cheers, Wiktor Niesiobedzki