Date: Thu, 16 Feb 2006 08:02:07 +0800 From: David Xu <davidxu@freebsd.org> To: David Xu <davidxu@freebsd.org> Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/sys proc.h sleepqueue.h src/sys/kern kern_condvar.c kern_kse.c kern_sig.c kern_synch.c kern_thread.c subr_sleepqueue.c Message-ID: <43F3C0FF.7020002@freebsd.org> In-Reply-To: <200602152352.k1FNq1KU056133@repoman.freebsd.org> References: <200602152352.k1FNq1KU056133@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
David Xu wrote: >davidxu 2006-02-15 23:52:01 UTC > > FreeBSD src repository > > Modified files: > sys/sys proc.h sleepqueue.h > sys/kern kern_condvar.c kern_kse.c kern_sig.c > kern_synch.c kern_thread.c > subr_sleepqueue.c > Log: > Fix a long standing race between sleep queue and thread > suspension code. When a thread A is going to sleep, it calls > sleepq_catch_signals() to detect any pending signals or thread > suspension request, if nothing happens, it returns without > holding process lock or scheduler lock, this opens a race > window which allows thread B to come in and do process > suspension work, however since A is still at running state, > thread B can do nothing to A, thread A continues, and puts > itself into actually sleeping state, but B has never seen it, > and it sits there forever until B is woken up by other threads > > Should be "until thread A is woken up ... ", sigh!
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43F3C0FF.7020002>