From owner-freebsd-threads@FreeBSD.ORG Wed Apr 16 09:30:18 2003 Return-Path: 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 1908437B401; Wed, 16 Apr 2003 09:30:18 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0BF1743FBD; Wed, 16 Apr 2003 09:30:17 -0700 (PDT) (envelope-from eischen@pcnet1.pcnet.com) Received: from pcnet1.pcnet.com (localhost [127.0.0.1]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h3GGUFBg016017; Wed, 16 Apr 2003 12:30:15 -0400 (EDT) Received: from localhost (eischen@localhost)h3GGUFHo016014; Wed, 16 Apr 2003 12:30:15 -0400 (EDT) Date: Wed, 16 Apr 2003 12:30:15 -0400 (EDT) From: Daniel Eischen To: David Xu In-Reply-To: <00f501c303dc$969bfec0$f001a8c0@davidw2k> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-threads@freebsd.org Subject: Re: libpthread patch X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Apr 2003 16:30:18 -0000 On Wed, 16 Apr 2003, David Xu wrote: > > ----- Original Message ----- > From: "Daniel Eischen" > To: "David Xu" > Cc: ; ""Craig Rodrigues"" > Sent: Wednesday, April 16, 2003 10:58 AM > Subject: Re: libpthread patch > > > I thought it might also be the UTS trying to interrupt > > the thread (kse_thr_interruot) while it was in the kernel > > (assuming the UTS did get the signal). > > Can you try a patch for kern_exit.c ? > http://people.freebsd.org/~davidxu/kern_exit.c.diff No, it didn't work. Same thing. The application is calling waitpid() with WNOHANG and pid -1. I am pretty sure there is a child process because I added some debugging statements and could see that it was spawned, saw it with top(1), and also saw when the waitpid() was called. Everything looks good on this end. The next call to waitpid(-1) returns the missed process id. I am not sure why WNOHANG is causing waitpid to return 0 for libkse and -1 for libc_r. It seems as if the process is still running so waitpid with WNOHANG _should_ return 0. I am not sure why ACE expects it to return the process id if it is still active. The test seems to do the right thing with libc_r, so that's kind of confusing. See if you can figure it out. The test is Process_Manager_Test. I'll continue to debug it also, and clean up my patches in general. I'd like to commit soon so we can get other testers going. -- Dan Eischen