From owner-svn-src-head@FreeBSD.ORG Tue Oct 26 13:35:37 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from alona.my.domain (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 5323B1065670; Tue, 26 Oct 2010 13:35:32 +0000 (UTC) (envelope-from davidxu@freebsd.org) Message-ID: <4CC6D915.3010900@freebsd.org> Date: Tue, 26 Oct 2010 21:35:17 +0800 From: David Xu User-Agent: Thunderbird 2.0.0.21 (X11/20090522) MIME-Version: 1.0 To: Anonymous References: <201010250916.o9P9G4YO058177__37512.3073034503$1287998186$gmane$org@svn.freebsd.org> <86lj5lusr1.fsf@gmail.com> In-Reply-To: <86lj5lusr1.fsf@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, src-committers@freebsd.org, Jeff Roberson Subject: Re: svn commit: r214334 - head/lib/libthr/thread X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Oct 2010 13:35:37 -0000 Anonymous wrote: > David Xu writes: > > >> Author: davidxu >> Date: Mon Oct 25 09:16:04 2010 >> New Revision: 214334 >> URL: http://svn.freebsd.org/changeset/base/214334 >> >> Log: >> Get cpuset in pthread_attr_get_np() and free it in pthread_attr_destroy(). >> >> MFC after: 7 days >> > > After this change firefox 4.0b8pre built from mozilla trunk crashes with > SIGBUS while starting, on /head@r214363M amd64. It may be related to > > $ js > Assertion failure: stackBase, at jsnativestack.cpp:217 > > and the calls preceding it > > pthread_attr_get_np(thread, &sattr); > pthread_attr_getstack(&sattr, &stackBase, &stackSize); > > java/openjdk6 doesn't start, too > > $ java > # > # A fatal error has been detected by the Java Runtime Environment: > # > # Internal Error (os_bsd_x86.cpp:876), pid=10495, tid=34389128704 > # Error: pthread_attr_get_np failed with err = 34 > > It is difficult to know which cpuset size kernel is using, for example, cpuset_getaffinity has following code: if (uap->cpusetsize < sizeof(cpuset_t) || uap->cpusetsize > CPU_MAXSIZE / NBBY) return (ERANGE); So if I provide a buffer, who can tell me what size I should use? too large or too small ? where can I get the size ? Regards, David Xu