Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 79204 invoked from network); 3 Jul 2006 16:18:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Jul 2006 16:18:11 -0000 Received: (qmail 80800 invoked by uid 500); 3 Jul 2006 16:18:08 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 80757 invoked by uid 500); 3 Jul 2006 16:18:08 -0000 Mailing-List: contact harmony-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-dev@incubator.apache.org Received: (qmail 80744 invoked by uid 99); 3 Jul 2006 16:18:08 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Jul 2006 09:18:08 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of a.y.chernyshev@gmail.com designates 72.14.204.224 as permitted sender) Received: from [72.14.204.224] (HELO qb-out-0506.google.com) (72.14.204.224) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Jul 2006 09:18:05 -0700 Received: by qb-out-0506.google.com with SMTP id q11so62641qbq for ; Mon, 03 Jul 2006 09:17:44 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=p2V1qHgB1w0qK9BdVZUpxdiSMZo3aITPNKrONk6bpv9HgzWOijn+maqkS1h7tYDGk/7IccTcXSjmkzdBcirjjunwsVdsJ5NWcnF8R4a9cXSMwFfc2kxmJSVIvEdbNbWhACrKwAIvNqJMzsppEq9l4fKnCZ6NATE8zLKHt3lPDtU= Received: by 10.64.208.15 with SMTP id f15mr3337551qbg; Mon, 03 Jul 2006 09:17:44 -0700 (PDT) Received: by 10.65.73.19 with HTTP; Mon, 3 Jul 2006 09:17:44 -0700 (PDT) Message-ID: <6928c5160607030917u1828e1d4t92b2966b8dc80bbc@mail.gmail.com> Date: Mon, 3 Jul 2006 20:17:44 +0400 From: "Andrey Chernyshev" To: harmony-dev@incubator.apache.org Subject: Re: [drlvm] DRLVM segfaults in hythread_tls_get() In-Reply-To: <200607031231.k63CVBC0019802@d06av02.portsmouth.uk.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <6928c5160607030414q5873eee3wbcbba1ce447e6bad@mail.gmail.com> <200607031231.k63CVBC0019802@d06av02.portsmouth.uk.ibm.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On 7/3/06, Mark Hindess wrote: > > On 3 July 2006 at 15:14, "Andrey Chernyshev" > wrote: > > > > I didn't find the exact reason why this happens, looks like a drlvm > > > ant scripts work differently. > > > > It could be a side effect of the recent adoption of DRLVM build > > for classlib binaries. The trick is that drlvm should put it's own > > hythread library into the deploy JRE. Before that change drlvm wasn't > > building the original hythread library at all, but now libhythr.so is > > copied from the class libraries into the deploy directory along with > > all other native class libraries. > > > > There could be two ways to resolve it: > > > > (a) Do a quick-fix in build.xml / deploy.copy_classlib target - add a > > filter which will will exclude hythr from copying; > > > > (b) More graceful fix - split the "process.components" target in > > build.xml into compilation of the components and their copying > > into deploy directory, and then update the dependencies order for > > the "build" target to make sure that class libraries are always > > copied first and then the compiled drlvm binaries are copied second, > > overwriting the classlib binaries if needed. > > c) Call the drlvm thread library something else to avoid the name clash > with the existing library? (As IBM VME does with it's thread library.) I'm not sure it is just a name clash problem - drlvm won't give the hythread library if the class lib hadn't requested it. The problem is that, the classlib will not work with it's original hythread library if the classlib is run with drlvm. This happens because, for example, monitor_enter() implementation of the hythread requires each thread be attached to the hythread library first (it requires a pointer to HyThread structure be stored in the TLS), but this can only be done by VM during thread creation. To solve this, VM either has to always register every new Java thread with the classlib's hythread library, or provide it's own implementation of the hythread. It seems that classlib's hythread implementation assumes that the hythread is shared between VM and classlib and VM is building it's threading subsystem on top of the hythread. Thanks, Andrey. > > > I would prefer to do (a) for now since these kind of dependencies > > between classlib and drlvm are supposed to be handled by the top level > > build anyways. > > I don't think we should expect the top-level build to fix any problems > like this. The top-level build should be completely dumb. > > My preference for the top-level build to just do a recursive copy of the > drlvm/deploy tree and the classlib/deploy tree to a top-level deploy > tree - which means it has to know nothing about the structure of the > deploy directories. (And I don't think we should rely on the order > in which the recursive copies happen - i.e. the set of files under > deploy/drlvm and deploy/ classlib trees should not intersect.) > > Regards, > Mark. > > > > --------------------------------------------------------------------- > Terms of use : http://incubator.apache.org/harmony/mailing.html > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org > For additional commands, e-mail: harmony-dev-help@incubator.apache.org > > -- Andrey Chernyshev Intel Middleware Products Division --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org For additional commands, e-mail: harmony-dev-help@incubator.apache.org