Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Jul 2004 21:23:51 +0200
From:      "Willem Jan Withagen" <wjw@withagen.nl>
To:        "Robert Watson" <rwatson@FreeBSD.org>
Cc:        freebsd-current@FreeBSD.org
Subject:   Re: malloc(M_WAITOK) of "Mbuf", forcing M_NOWAIT with the following non-sleepable locks held
Message-ID:  <1ddd01c462c5$9adde810$471b3dd4@digiware.nl>
References:  <Pine.NEB.3.96L.1040705143826.48668B-100000@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
From: "Robert Watson" <rwatson@FreeBSD.org>
To: "Willem Jan Withagen" <wjw@withagen.nl>
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1ddd01c462c5$9adde810$471b3dd4>