From owner-cvs-all Mon Oct 22 5:56:20 2001 Delivered-To: cvs-all@freebsd.org Received: from ipcard.iptcom.net (ipcard.iptcom.net [212.9.224.5]) by hub.freebsd.org (Postfix) with ESMTP id 15B1D37B405; Mon, 22 Oct 2001 05:56:08 -0700 (PDT) Received: from vega.vega.com (h217.227.dialup.iptcom.net [212.9.227.217]) by ipcard.iptcom.net (8.9.3/8.9.3) with ESMTP id PAA95146; Mon, 22 Oct 2001 15:55:59 +0300 (EEST) (envelope-from sobomax@FreeBSD.org) Received: from FreeBSD.org (big_brother.vega.com [192.168.1.1]) by vega.vega.com (8.11.6/8.11.3) with ESMTP id f9MCaDU87399; Mon, 22 Oct 2001 15:36:13 +0300 (EEST) (envelope-from sobomax@FreeBSD.org) Message-ID: <3BD41338.C4252B7C@FreeBSD.org> Date: Mon, 22 Oct 2001 15:38:16 +0300 From: Maxim Sobolev Organization: Vega International Capital X-Mailer: Mozilla 4.78 [en] (Windows NT 5.0; U) X-Accept-Language: en,uk,ru MIME-Version: 1.0 To: Alfred Perlstein Cc: deischen@FreeBSD.org, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, gnome@FreeBSD.org Subject: Re: cvs commit: src/lib/libc_r/uthread uthread_fd.c References: <200110211823.f9LINo559434@freefall.freebsd.org> <200110220554.IAA49045@ipcard.iptcom.net> <20011022010626.G15052@elvis.mu.org> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Alfred Perlstein wrote: > > * Maxim Sobolev [011022 00:55] wrote: > > > > This causes many big GNOME programs not work on 5-CURRENT > > because GNOME's Object Activation Framework is actively using > > fd's passed to a fork'ed copy. Perhaps you have any ideas on > > how to debug this problem, please let me know if so. > > Hmm, if fd's are being passed, are they being passed using > sendmsg/recvmsg? If so you might want to check if libc_r > catches this and properly initializes the fd array. It seems that I did not properly explain the problem. The programs in question usually create a pipe via a pipe(2) syscall, then spawn a child and use one end of that pipe in the parent and second one in the child for communication. For some strange reason, when program is linked with -pthread, the child's copy of _thread_fd_table[fd] sometimes gets corrupted around high fd numbers (11 and more), so when the child passes a fd of its end of the pipe to any syscall it leads to a segfault (usually a null-pointer derefernce). I'm ready to provide a stack trace if somebody is interested. -Maxim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message