From owner-freebsd-threads@FreeBSD.ORG Thu Jul 14 16:25:24 2005 Return-Path: X-Original-To: freebsd-threads@freebsd.org Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E2ACE16A41C for ; Thu, 14 Jul 2005 16:25:24 +0000 (GMT) (envelope-from ghelmer@palisadesys.com) Received: from magellan.palisadesys.com (magellan.palisadesys.com [192.188.162.211]) by mx1.FreeBSD.org (Postfix) with ESMTP id 932C443D45 for ; Thu, 14 Jul 2005 16:25:24 +0000 (GMT) (envelope-from ghelmer@palisadesys.com) Received: from [172.16.1.108] (cetus.palisadesys.com [192.188.162.7]) (authenticated bits=0) by magellan.palisadesys.com (8.12.11/8.12.11) with ESMTP id j6EGPMcM026234 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 14 Jul 2005 11:25:22 -0500 (CDT) (envelope-from ghelmer@palisadesys.com) Message-ID: <42D691F2.3030201@palisadesys.com> Date: Thu, 14 Jul 2005 11:25:22 -0500 From: Guy Helmer User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-threads@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Palisade-MailScanner-Information: Please contact the ISP for more information X-Palisade-MailScanner: Found to be clean X-MailScanner-From: ghelmer@palisadesys.com Subject: system scope threads entering STOP state X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jul 2005 16:25:25 -0000 I have a long-running multithreaded process on FreeBSD 5.4 (SMP, PREEMTPION, SCHED_4BSD) linked with libpthread and I'm creating the threads with attribute PTHREAD_SCOPE_SYSTEM. The threads need to be processing input in near-real-time or its input buffers overflow. I've modified the program so that a thread can fork/execl/waitpid (without WNOHANG) to use an external program for further processing on a batch of input (sometimes via a pipe, other times via writing to a file). However, even under a light input load, the program is now dropping input. While running top(1) in thread mode, I occasionally find all the program's threads are in the STOP state for several consecutive seconds. Is there anything related to the frequent use of fork, execve, or wait4 that would be likely to cause such a situation? I'm not seeing anything obvious in my reading of the kernel sources. Thanks in advance for any help, Guy -- Guy Helmer, Ph.D. Principal System Architect Palisade Systems, Inc.