NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/45093: kernel deadlock between TCP and UVM involving callouts



The following reply was made to PR kern/45093; it has been noted by GNATS.

From: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: kern/45093: kernel deadlock between TCP and UVM involving
 callouts
Date: Wed, 20 Jul 2011 07:07:45 +0000

 For some reason this didn't go to gnats even though it contains the PR
 number in what I think is supposed to be a recognized format.
 
    ------
 
 From: Manuel Bouyer <bouyer%netbsd.org@localhost>
 To: source-changes%NetBSD.org@localhost
 Subject: CVS commit: src/sys
 Date: Sat, 2 Jul 2011 17:53:51 +0000
 Mail-Followup-To: source-changes-d%NetBSD.org@localhost
 
 Module Name:   src
 Committed By:  bouyer
 Date:          Sat Jul  2 17:53:51 UTC 2011
 
 Modified Files:
        src/sys/kern: init_main.c uipc_socket.c
        src/sys/sys: socketvar.h
 
 Log Message:
 Fix kern/45093 as discussed on tech-kern@:
 http://mail-index.netbsd.org/tech-kern/2011/06/17/msg010734.html
 
 The cause of the problem is that the so_pendfree is processed with
 the softnet_lock held at one point, and processing the list
 calls sodoloanfree() which may kpause(). As the thread sleeps with
 softnet_lock held, it ultimately cause a deadlock (see the PR or tech-kern
 thread for details).
 Although it should be possible to call sodopendfree() after releasing
 the socket lock, it's not so easy to know where he socket lock is held and
 where it's not, so we may hit the issue again later.
 Add a kernel thread to handle the so_pendfree list, and wake up this
 thread when adding mbufs to this list. Get rid of the various sodopendfree()
 calls, hopefully fixing definitively the problem.
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.432 -r1.433 src/sys/kern/init_main.c
 cvs rdiff -u -r1.204 -r1.205 src/sys/kern/uipc_socket.c
 cvs rdiff -u -r1.125 -r1.126 src/sys/sys/socketvar.h
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.
 


Home | Main Index | Thread Index | Old Index