From owner-freebsd-current@FreeBSD.ORG Mon Jul 5 19:31:01 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 5770D16A4CE; Mon, 5 Jul 2004 19:31:01 +0000 (GMT) Received: from freebee.digiware.nl (dsl390.iae.nl [212.61.63.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4471943D2D; Mon, 5 Jul 2004 19:31:00 +0000 (GMT) (envelope-from wjw@withagen.nl) Received: from dual (dual [212.61.27.71]) by freebee.digiware.nl (8.12.10/8.12.10) with SMTP id i65JNxvZ072352; Mon, 5 Jul 2004 21:23:59 +0200 (CEST) (envelope-from wjw@withagen.nl) Message-ID: <1ddd01c462c5$9adde810$471b3dd4@digiware.nl> From: "Willem Jan Withagen" To: "Robert Watson" References: Date: Mon, 5 Jul 2004 21:23:51 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 cc: freebsd-current@FreeBSD.org Subject: Re: malloc(M_WAITOK) of "Mbuf", forcing M_NOWAIT with the following non-sleepable locks held 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: Mon, 05 Jul 2004 19:31:01 -0000 From: "Robert Watson" To: "Willem Jan Withagen" Sent: Monday, July 05, 2004 8:41 PM Subject: Re: malloc(M_WAITOK) of "Mbuf", forcing M_NOWAIT with the following non-sleepable locks held > > On Mon, 5 Jul 2004, Willem Jan Withagen wrote: > > > __FBSDID("$FreeBSD: src/sys/kern/uipc_socket.c,v 1.191 2004/06/27 03:22:15 > > rwatson Exp $"); > > Could you try this patch: > > Index: uipc_socket.c > =================================================================== > RCS file: /home/ncvs/src/sys/kern/uipc_socket.c,v > retrieving revision 1.191 > diff -u -r1.191 uipc_socket.c > --- uipc_socket.c 27 Jun 2004 03:22:15 -0000 1.191 > +++ uipc_socket.c 5 Jul 2004 18:38:12 -0000 > @@ -1148,8 +1148,11 @@ > if (flags & MSG_PEEK) > moff += len; > else { > - if (mp != NULL) > + if (mp != NULL) { > + SOCKBUF_UNLOCK(&so->so_rcv); > *mp = m_copym(m, 0, len, M_TRYWAIT); > + SOCKBUF_LOCK(&so->so_rcv); > + } > m->m_data += len; > m->m_len -= len; > so->so_rcv.sb_cc -= len; > Index: uipc_socket.c > =================================================================== Not shure if we are any further, or that this in the code supped between 2 juli and this morning.... panic: mi_switch: called by old code cpuid = 1; Stack backtrace: backtrace() at backtrace+0x17 panic() at panic+0x1d2 mi_switch() at mi_switch+0xcf maybe_preempt() at maybe_preempt+0xd0 sched_add() at sched_add+0x2dd kseq_assign() at kseq_assign+0x45 sched_choose() at sched_choose+0x5b choosethread() at choosethread+0x3d sched_switch() at sched_switch+0x126 mi_switch() at mi_switch+0x23b ast() at ast+0x35f Xfast_syscall() at Xfast_syscall+0xdd --- syscall (0), rip = 0x20069afdc, rsp = 0x7fffffffe8a8, rbp = 0x7fffffffe8e0 --- Debugger("panic") timeout stopping cpus Stopped at Debugger+0x4d: xchgl %ebx,0x27d091 Writing a 2Gb dump now..... --WjW