Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 74491 invoked from network); 27 Jun 2006 18:00:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 27 Jun 2006 18:00:42 -0000 Received: (qmail 94126 invoked by uid 500); 27 Jun 2006 18:00:38 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 94087 invoked by uid 500); 27 Jun 2006 18:00:38 -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 94076 invoked by uid 99); 27 Jun 2006 18:00:38 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Jun 2006 11:00:38 -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 gshimansky@gmail.com designates 66.249.92.174 as permitted sender) Received: from [66.249.92.174] (HELO ug-out-1314.google.com) (66.249.92.174) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Jun 2006 11:00:34 -0700 Received: by ug-out-1314.google.com with SMTP id q2so2098311uge for ; Tue, 27 Jun 2006 11:00:12 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:reply-to:to:subject:date:user-agent:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=sZPzfrUB/h7a1XSo5aWI8otsPv56H6cnyvEOgYrkhWYmBkuvHra99qsueSm2vr5bkYez6kPD0XB5SP4CdcAu/W/zXcHcvh7najW+BO9lCr+dqJwBBuwqOl/dzzNSzOGiyTel2K7RAi15cUS5OKznO2IlI7H52kt/qRgDTFswl4Y= Received: by 10.66.244.10 with SMTP id r10mr6292908ugh; Tue, 27 Jun 2006 11:00:12 -0700 (PDT) Received: from ppp83-237-124-133.pppoe.mtu-net.ru ( [83.237.124.133]) by mx.gmail.com with ESMTP id a1sm5861464ugf.2006.06.27.11.00.11; Tue, 27 Jun 2006 11:00:12 -0700 (PDT) From: Gregory Shimansky Reply-To: harmony-dev@incubator.apache.org To: harmony-dev@incubator.apache.org Subject: Re: [depends] mark and I were chatting Date: Tue, 27 Jun 2006 22:00:08 +0400 User-Agent: KMail/1.9.1 References: <44A10FE4.1050401@pobox.com> In-Reply-To: <44A10FE4.1050401@pobox.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200606272200.09581.gshimansky@gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hello Geir I am not sure if it is appropriate to write in this thread, but it is about external resources as well. I've recently stumbled upon a strange problem with libhyzlib.so. For its build this library uses zlib sources downloaded and unpacked directly in classlib. The problem which I have is on SuSE 9 (gcc-3.3.3). 3 drlvm tests and specjvm98 segfault inside of inflate code from libhyzlib.so. The bug is not easy to reproduce, when I changed -O1 option to -O0 the problem went away. I've tried to investigate the problem and the general consensus in intel team was that it is likely to be because of symbols collison between libhyzlib.so and the system /lib/libz.so which drlvm is linked with. This has been proved by linking libhyzlib.so with -Wl,-Bsymbolic option. This option makes linker to attempt to resolve all internal symbol references inside of library upon linking as opposed to the normal way of resolving all symbols at runtime. The library linked with -Bsymbolic does not cause any crashes. Symbol collisions like this may really be a problem on linux and we've encountered the problem several times already with drlvm. On linux it has a quite imperfect linking procedure between its components like vmcore and gc. The problem is that all libraries export all of the symbols (linked with -Wl,-export-dynamic). Symbols are the same, in vmcore there is a variable, in gc library it is a function. When a library is first loaded into the process (e.g. vmcore), its symbols are considered resolved, then when gc library is loaded, only those symbols which names are new in the process space are resolved. Then when vmcore calls gc, which calls some of its functions which are named with the same name as a symbol in vmcore, the call goes to a variable in vmcore (it was first) and this causes a crash. This is avoided by using -Wl,-Bsymbolic which resolves all internal cross references at link it, so all internal calls inside of gc are resolved already before library is loaded. On windows this seems to be the default way. The problem mentioned above in VM should be fixed at some point, using -Bsymbolic is really a crutch. Only necessary symbols should be exported using linking scripts or recently added gcc capabilities [1] to control symbols visibility at source level. The symbols collision is possible between libhyzlib.so and system installed libz because libz is loaded first into the process space when vm is initialized. I didn't find the exact prove that this is really symbols collosion (maybe it is a gcc-3.3.3 bug after all, at home classlib compiled with gcc-3.4.6 and gcc-4.1.0 doesn't give any segfaults) but still. Why does classlib require its own zlib to be built from sources? Shouldn't it be another external dependency provided in binary form or by the system? [1] http://gcc.gnu.org/wiki/Visibility On Tuesday 27 June 2006 15:00 Geir Magnusson Jr wrote: > Just a note to get some more discussion going. > > Mark and I were talking about how to start refactoring out dependencies > to a 'peer' to drlvm and classlib. And Tim and I have discussed this > too... I just want to capture and get the conversation out here... > > So, the idea is that it would be nice to have a common place for > dependencies that parts of Harmony can point to w/ an assist in filling > in. (I.e - make it easy to get stuff.) > > Second, we also want to give each subcomponent (drlvm, jchevm, classlib) > full freedom for dependencies via a simple property setting, so that > people have full freedom to do what they want... > > So as a starting point... (names are open to change) ... something like : > > /deps > deps.properties > build.xml > /build > /external > /ecj > /3.2 > /3.3 > /apr > /2.1 > /2.2 > > etc > > > where > > deps.properties is something like > > ECJJAR = ... path to 'default' verison > APRINCLUDE = ... etc... > > So that people can reconfigure locally, and even override in a > build.properties or something > > Big issue here is that each artifact will have different things, like > libs and includes, jars, etc.. > > the build.xml will be the top-level ant script that can fetch, update > and build the deps... -- Gregory Shimansky, 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