Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Oct 2010 21:35:17 +0800
From:      David Xu <davidxu@freebsd.org>
To:        Anonymous <swell.k@gmail.com>
Cc:        svn-src-head@freebsd.org, src-committers@freebsd.org, Jeff Roberson <jroberson@jroberson.net>
Subject:   Re: svn commit: r214334 - head/lib/libthr/thread
Message-ID:  <4CC6D915.3010900@freebsd.org>
In-Reply-To: <86lj5lusr1.fsf@gmail.com>
References:  <201010250916.o9P9G4YO058177__37512.3073034503$1287998186$gmane$org@svn.freebsd.org> <86lj5lusr1.fsf@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Anonymous wrote:
> David Xu <davidxu@FreeBSD.org> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4CC6D915.3010900>