Re: [test] Jetty integration progress ? (was Re: [classlib] jetty based tests)

2006-09-19 Thread Richard Liang

On 9/18/06, Geir Magnusson Jr. [EMAIL PROTECTED] wrote:



Andrew Zhang wrote:
 On 9/18/06, Richard Liang [EMAIL PROTECTED] wrote:

 On 9/18/06, Andrew Zhang [EMAIL PROTECTED] wrote:
  Hi,
 
  It's me again. Seems no big progress on jetty. I'd like to take the job
 if
  no one objects. Here are my suggestions:

 Great :-)

 
  1. jetty version:  I suggest that Harmony adopt jetty 6. Because many
  5.xAPIs are deprecated in jetty 6, we'd better follow latest jetty
  version.

 +1

 
  2. location to put jetty jars: support module.
 

 Do you mean we will check the jetty jars into Harmony svn?


 Yes. Is it OK? Or put the jar in depends folder?

Just make it a depends.  We should avoid checking in jars.



Yes. It's good make jetty as a depends, and we could add jetty.jar
into their build scripts if some modules (e.g., luni) require jetty.
Just thinking about another question, how shall we handle the
.classpath of luni in Eclipse? Use external jar?




 3. how to write jetty test? I suggest that we could start jetty in any
 test
  if necessary. If we found there are heavy code duplicates, we could
 extract
  them as utility methods in support module. So far, I'd like to write
 jetty
  test directly in each module, because the code is rather simple, only a
 few
  lines.[1] It's also easy to write user-customized handler for
  negative tests. Let's make it work, and then make it better. :-)
 
  Any suggestions/comments/objections?  I volunteer to upload patches
 when
 we
  reach an agreement.
 
  Best regards,
  Andrew
 
  [1]
  jetty-based test example:
  setUp code:
  port = Support_PortManager.getNextPort();
  Server server = new Server(port);
  ResourceHandler resource_handler=new ResourceHandler();
  resource_handler.setResourceBase(somewhere);
  server.setHandler(resource_handler);
  server.start();
  tearDown code:
  server.stop();
 
 


 --
 Richard Liang
 China Development Lab, IBM

 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Richard Liang
China Development Lab, IBM

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[drlvm] gc.LOS hangs on win32

2006-09-19 Thread Weldon Washburn

All,
I have noticed endless loop behavior when running gc.LOS.  It appears to go
into some sort of endless loop when I try,  build test.  Does anyone else
see this problem?

I used MSVC to break into drlvm when it gets stuck.  It shows basically
what's been reported before – a bunch of threads in JITed code.  They keep
making some system call.

Semis/vm/_smoke.tests/reports/gc.LOS_jit.out shows that somehow LOS.java is
in an infinite loop after it prints all 200 dots.  This is rather curious.

Looking at gc/LOS.java, there is a threads[i].join() where i goes from 0
to 199.  This thread join happens immediately after a notifyAll() that is
intended to tell each of the threads to start running.

I moved the trace(.) to immediately after the synchronized statement in
run().  The test now completes successfully.  It might be a bug in the
implementation of Object.wait() and Object.notifyAll() that different HW/SW
combinations are aggrevating???   Below are the mods that I made:

   public void run () {

   //trace(.);

   synchronized (this.getClass()) {

   if (!started)

   try {

   this.getClass().wait();

   } catch (InterruptedException e) {}

   }

   trace(.);  //wjw










--
Weldon Washburn
Intel Middleware Products Division


Re: [drlvm] HARMONY-1363 - status update

2006-09-19 Thread Alexey Varlamov

2006/9/18, Geir Magnusson Jr. [EMAIL PROTECTED]:



Pavel Pervov wrote:
 Tried it on Windows and found the problem which, as it looks like, have
 never been caught before.
 As I discovered, launcher uses platform specific line separators to parse
 harmonyvm.properties on a specific platform. But haromynvm.properties,
 which
 is copied into deploy, has unix line endings and is skipped. As the result,
 EM can't initialize.'

A ha!


 I workarounded this by running unix2dos on harmonyvm.properties.

Ok - we should get that in as eol-native


Actually, the same problem was already fixed for
bootclasspath.properties, and now there is shared properties parser in
luni/common. Also look at HARMONY-1376 - I believe these issues will
be fixed together - just go for a patch if you don't want to wait for
mine ;)




 Anyone else using launcher out there? :)

Yes.  We all will be. :)

geir


 Pavel.

 On 9/14/06, Geir Magnusson Jr. [EMAIL PROTECTED] wrote:

 I now have things building and running with the 1363 patch - more work
 for the launcher was needed.

 I'm now using the harmonyvm.properties file in the vmdir, and this is
 working well.

 I am now able to run tests, although I have one failure in StackTest,
 and interestingly, the new testsuite that came with the thread manager
 isn't running.

 So progress.

 geir

 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [classlib][io][nio] Sync issue of java.io.FileOutputStream and java.nio.channels.FileChannel

2006-09-19 Thread Andrew Zhang

I just found another bug of sync. Harmony throws SyncFailedException when fd
is read-only while RI returns silently. Spec doesn't explictly describe the
behaviour in such case[1]. But, it seems intended behaviour of RI, because
it requires additional check before invoke os sync. Following test
reproduces the bug:

   public void testSyncReadOnly() throws Exception {
   String TESTFILE = tempFile;
   try {
   FileOutputStream fos = new FileOutputStream(TESTFILE);
   fos.write(something.getBytes());
   fos.close();

   RandomAccessFile raf = new RandomAccessFile(TESTFILE, rw);
   raf.getFD().sync();
   raf.close();

   FileInputStream fis = new FileInputStream(TESTFILE);
   fis.getFD().sync();
   fis.close();
   } finally {
   new File(TESTFILE).delete();
   }
   }

I'll file a JIRA to record this bug soon!
[1] SyncFailedException - Thrown when the buffers cannot be flushed, or
because the system cannot guarantee that all the buffers have been
synchronized with physical media.


On 9/19/06, Richard Liang [EMAIL PROTECTED] wrote:


On 9/18/06, Andrew Zhang [EMAIL PROTECTED] wrote:
 On 9/18/06, Richard Liang [EMAIL PROTECTED] wrote:
 
  Hello,
 
  One Apache Derby test[1] fails on Harmony. It seems that RI always
  sync the FileOutputStream and FileChannel after each write, which is
  different from Harmony. But there is no explicit description in Java
  Spec. Shall we follow RI? Thanks a lot.
 
  The following test cases could demonstrate this issue.
 
 public void testFile() {
 File derbyLog = new File(d:\\, derby1.log);
 
 try {
 FileOutputStream fos = new FileOutputStream(derbyLog);
 fos.write(0x41);
 assertEquals(1, derbyLog.length());
 } catch (Exception e) {
 e.printStackTrace();
 }
 }
 
 public void testFileChannel() {
 File derbyLog = new File(d:\\, derby2.log);
 
 try {
 FileOutputStream fos = new FileOutputStream(derbyLog);
 FileChannel fc = fos.getChannel();
 fc.write(ByteBuffer.wrap(new byte[]{0x41, 0x42}));
 assertEquals(2, derbyLog.length());
 } catch (Exception e) {
 e.printStackTrace();
 }
 }


 Interesting. I think we'd better follow RI although it's implementation
 dependent. Otherwise, it breaks existing application.

 To make test more interesting, I wrote a similar test:


  public void testFile() throws Exception {
 File derbyLog = File.createTempFile(test, log);
 derbyLog.deleteOnExit();
 RandomAccessFile fos = new RandomAccessFile(derbyLog, rws);
 for (int i = 0; i  1000; i++) {
 fos.write(0x41);
 assertEquals(1 + i, derbyLog.length());
 }

  }

 Run it and you'll be surprised. :-)

Wow! It tooks RI 0.381 seconds, while 21.761 seconds for Harmony. We
shall improve our performance!

Let's have a more further study about this issue.


 [1]
 
http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/logStream.java?view=co
  --
  Richard Liang
  China Development Lab, IBM
 
  -
  Terms of use : http://incubator.apache.org/harmony/mailing.html
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 Andrew Zhang
 China Software Development Lab, IBM




--
Richard Liang
China Development Lab, IBM

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Andrew Zhang
China Software Development Lab, IBM


Re: [drlvm] HARMONY-1363 - status update

2006-09-19 Thread Chris Gray
On Monday 18 September 2006 18:14, Geir Magnusson Jr. wrote:
 Pavel Pervov wrote:
  Tried it on Windows and found the problem which, as it looks like, have
  never been caught before.
  As I discovered, launcher uses platform specific line separators to parse
  harmonyvm.properties on a specific platform. But haromynvm.properties,
  which
  is copied into deploy, has unix line endings and is skipped. As the
  result, EM can't initialize.'

 A ha!

  I workarounded this by running unix2dos on harmonyvm.properties.

 Ok - we should get that in as eol-native

Wouldn't it be better (and safer) to fix the parser? Normally a properties 
file can contain any kind of line separators and still be parsed correctly, 
which is a Good Thing IMHO. E.g. according to the spec for 
java.util.Properties.load(),
A natural line of input is terminated either by a set of line 
terminator 
characters (\n or \r or \r\n) or by the end of the file. 

Chris

-- 
Chris Gray/k/ Embedded Java Solutions  BE0503765045
Embedded  Mobile Java, OSGihttp://www.k-embedded-java.com/
[EMAIL PROTECTED] +32 3 216 0369


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] HARMONY-1363 - status update

2006-09-19 Thread Vladimir Gorr

On 9/19/06, Chris Gray [EMAIL PROTECTED] wrote:


On Monday 18 September 2006 18:14, Geir Magnusson Jr. wrote:
 Pavel Pervov wrote:
  Tried it on Windows and found the problem which, as it looks like,
have
  never been caught before.
  As I discovered, launcher uses platform specific line separators to
parse
  harmonyvm.properties on a specific platform. But haromynvm.properties,
  which
  is copied into deploy, has unix line endings and is skipped. As the
  result, EM can't initialize.'

 A ha!

  I workarounded this by running unix2dos on harmonyvm.properties.

 Ok - we should get that in as eol-native

Wouldn't it be better (and safer) to fix the parser?



+1. Indeed this is the good thing for doing to avoid the above-mentioned
problem in future.

Thanks,
Vladimir.

Normally a properties file can contain any kind of line separators and still

be parsed correctly,
which is a Good Thing IMHO. E.g. according to the spec for
java.util.Properties.load(),
   A natural line of input is terminated either by a set of line
terminator
characters (\n or \r or \r\n) or by the end of the file.

Chris

--
Chris Gray/k/ Embedded Java Solutions  BE0503765045
Embedded  Mobile Java, OSGihttp://www.k-embedded-java.com/
[EMAIL PROTECTED] +32 3 216 0369


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: [General VM] GC strategy:how to garbage collect short-lived objects quickly.

2006-09-19 Thread Robin Garner

Egor Pasko wrote:

On the 0x1E4 day of Apache Harmony Alexey Varlamov wrote:

Just a wild idea: a smart JIT could hint a GC during allocation if an
object is expected to be short-lived so the GC could allocate it in a
special space, 


if a JIT can prove that the object is local, it can allocate it on
stack almost without help of VM. An imprecise estimation of
short-liveness is a kind of magic. What heuristics can we use? Small
objects live shortly? :)



Stack allocation generally performs more poorly than heap allocation.

In fact the cheapest place to allocate a short-lived object is in the 
nursery where all objects are allocated - the cost of allocation is 
simply incrementing a counter and doing a bounds check.


Identifying objects (usually call sites) that are likely to live for a 
long time, and allocating them directly into the mature space is called 
pre-tenuring, and there has been a lot of work done on that.


ALl this can be done by the JIT at run-time, although feedback from the 
VM via sampling can be useful.


cheers

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] HARMONY-1363 - status update

2006-09-19 Thread Alexey Varlamov

2006/9/19, Vladimir Gorr [EMAIL PROTECTED]:

On 9/19/06, Chris Gray [EMAIL PROTECTED] wrote:

 On Monday 18 September 2006 18:14, Geir Magnusson Jr. wrote:
  Pavel Pervov wrote:
   Tried it on Windows and found the problem which, as it looks like,
 have
   never been caught before.
   As I discovered, launcher uses platform specific line separators to
 parse
   harmonyvm.properties on a specific platform. But haromynvm.properties,
   which
   is copied into deploy, has unix line endings and is skipped. As the
   result, EM can't initialize.'
 
  A ha!
 
   I workarounded this by running unix2dos on harmonyvm.properties.
 
  Ok - we should get that in as eol-native

 Wouldn't it be better (and safer) to fix the parser?


 +1. Indeed this is the good thing for doing to avoid the above-mentioned
problem in future.



This is exactly the feature shared parser has, see HARMONY-1243 and
HARMONY-1376.


Thanks,
Vladimir.

Normally a properties file can contain any kind of line separators and still
 be parsed correctly,
 which is a Good Thing IMHO. E.g. according to the spec for
 java.util.Properties.load(),
A natural line of input is terminated either by a set of line
 terminator
 characters (\n or \r or \r\n) or by the end of the file.

 Chris

 --
 Chris Gray/k/ Embedded Java Solutions  BE0503765045
 Embedded  Mobile Java, OSGihttp://www.k-embedded-java.com/
 [EMAIL PROTECTED] +32 3 216 0369


 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]






-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [General VM] GC strategy:how to garbage collect short-lived objects quickly.

2006-09-19 Thread Robin Garner

   What about the VMs here, drlvm or J9?

In a DRLVM JIT (Jitrino.OPT) there is an escape analysis prototype. It
detects objects that can be allocated on stack (and, hence, on
registers). Currently, it is switched off by default, and, when
enabled, it just marks the objects that are not escaped. This info is
never used in Jitrino.OPT yet. Sometimes, escape analyzers help, but
not very much :)



It will be great if JIT can help to allocation objects on stack.

DRLVM GC gurus will say more ;)


The JikesRVM experience was that stack allocation didn't improve 
anything, but once you can show that an object never escapes a method, 
and is 'hot', you can actually inline the fields of the object, and 
never allocate it in the first place.  This is a valuable optimization.


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [classlib][io][nio] Sync issue of java.io.FileOutputStream and java.nio.channels.FileChannel

2006-09-19 Thread Andrew Zhang

On 9/18/06, Richard Liang [EMAIL PROTECTED] wrote:


Hello,

One Apache Derby test[1] fails on Harmony. It seems that RI always
sync the FileOutputStream and FileChannel after each write, which is
different from Harmony. But there is no explicit description in Java
Spec. Shall we follow RI? Thanks a lot.

The following test cases could demonstrate this issue.

   public void testFile() {
   File derbyLog = new File(d:\\, derby1.log);

   try {
   FileOutputStream fos = new FileOutputStream(derbyLog);
   fos.write(0x41);
   assertEquals(1, derbyLog.length());
   } catch (Exception e) {
   e.printStackTrace();
   }
   }

   public void testFileChannel() {
   File derbyLog = new File(d:\\, derby2.log);

   try {
   FileOutputStream fos = new FileOutputStream(derbyLog);
   FileChannel fc = fos.getChannel();
   fc.write(ByteBuffer.wrap(new byte[]{0x41, 0x42}));
   assertEquals(2, derbyLog.length());
   } catch (Exception e) {
   e.printStackTrace();
   }
   }



Richard, we're fooled by derbyLog.length(). :-) That's the root of evil!

Harmony uses FindFirstFile to get file attribute, which may not be latest
information of file. MSND points out In rare cases, file attribute
information on NTFS file systems may not be current at the time you call
this function. That's why the test failed against Harmony. If using
GetFileAttributeEx instead, the test passes against Harmony. :-)   But I
don't think the test is theoretically stable, since the file is not opened
with sync flag. :-) We could use RandomAccessFile(file,rwd(s)) for
test.  Let's file a JIRA and fix it!

[1]

http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/logStream.java?view=co
--
Richard Liang
China Development Lab, IBM

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Andrew Zhang
China Software Development Lab, IBM


Re: [General VM] GC strategy:how to garbage collect short-lived objects quickly.

2006-09-19 Thread Robin Garner

Egor Pasko wrote:

On the 0x1E4 day of Apache Harmony Oliver Deakin wrote:

Forcing gc by hand does work, but it is difficult for code to know
when to
call gc.So I think it is better if VM can give some support since it
knows
the global situation.:)

..and of course a manual gc() call does not necessarily result in a gc


this one is easy :) make a gc2() magic in DRLVM and collect only young
objects on it.. to make code portable, implement gc2() as gc() for
other JVMs. Need to be patient until the generational GC.

Can a hack like this be widely accepted in Java community? I think, yes.



I think GC research will soon make this unnecessary.  For example the 
Sun VM has a concurrent collector for its mature space, so on a 
sufficiently lightly loaded system (or with a core to spare) you could 
eliminate most of the mature space collection pause time.


In MMTk, there is a command line switch, -X:gc:fullHeapSystemGc, used to 
specify whether System.gc() causes a full heap collection.  But no, I 
don't think this is something users should need to play with.


cheers

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



re: [jira] Commented: (HARMONY-1110) [classlib][text] ChoiceFormat(String) pattern parser differs from RI

2006-09-19 Thread Spark Shen
The following discussion occurs on JIRA 1110, may need your opinion to 
come to a conclusion:


Harmony and RI have different pattern parsers implementations of 
ChoiceFormat class. Spec hasn't any rules for pattern except a single 
example
-1#is negative| 0#is zero or fraction | 1#is one |1.0is 1+ |2#is two 
|2is more than 2.

So we have some differences in pattern processing

Test 
--- 




import java.text.*;

public class bug9411 {
   public static void main(String[] args) {
   try {
   System.out.println(new ChoiceFormat(2|).toPattern());
 } catch (Exception e) {
e.printStackTrace();
 }
 try {
 System.out.println(new ChoiceFormat(2#ok #ab).toPattern());
 } catch (Exception e) {
  e.printStackTrace();
 }
 try {
   System.out.println(new ChoiceFormat(2#ok ab).toPattern());
 } catch (Exception e) {
e.printStackTrace();
 }
   }
}

Output 
-


RI
0.0#
java.lang.IllegalArgumentException
 at 
java.text.ChoiceFormat.applyPattern(ChoiceFormat.java:197)
 at 
java.text.ChoiceFormat.init(ChoiceFormat.java:294)

 at bug9411.main(bug9411.java:12)
java.lang.IllegalArgumentException
 at 
java.text.ChoiceFormat.applyPattern(ChoiceFormat.java:197)
 at 
java.text.ChoiceFormat.init(ChoiceFormat.java:294)

 at bug9411.main(bug9411.java:17)

Harmony
java.lang.IllegalArgumentException
 at 
java.text.ChoiceFormat.applyPattern(ChoiceFormat.java:127)
 at 
java.text.ChoiceFormat.init(ChoiceFormat.java:66)

 at bug9411.main(bug9411.java:7)
2.0#ok #ab
2.0#ok ab
==
spark shen 
http://issues.apache.org/jira/secure/ViewProfile.jspa?name=spark+shen 
[18/Sep/06 07:37 PM]
On this specific case, seems the behavior of harmony is also reasonable. 
I suggest to change component to Non-bug difference.


Best regards
==
Denis Kishenko 
http://issues.apache.org/jira/secure/ViewProfile.jspa?name=dkishenko 
[18/Sep/06 11:57 PM]
Spark, which behavior is reasonable depends on point of view. For 
example for me Harmony is reasonable in the first case while RI is 
reasonable in the second and third cases.

==
spark shen 
http://issues.apache.org/jira/secure/ViewProfile.jspa?name=spark+shen 
[19/Sep/06 12:07 AM]

Hi Denis Kishenko

But I totally agree with harmony on 3 cases.
On the first, '2|' indicates that there are 2 choices, but the second 
one is missing. So throwing an IllegalArgumentException is OK.
On the second and third('2#ok #ab'  '2#ok ab') there is only one 
choice. When the formatted thing = 2, then ok#ab or ok ab should be 
used IMHO.


Best regards
==
Denis Kishenko 
http://issues.apache.org/jira/secure/ViewProfile.jspa?name=dkishenko 
[19/Sep/06 12:17 AM]
From my point of view, symbols |, # and  should be reserved as 
pattern control symbols because they influence of pattern engine 
algorithm. If user want to use such symbols let's put them in quote to 
avoid misunderstandings.


2#ok #ab = 2#ok #ab
2#ok ab = 2#ok ab

--
Spark Shen
China Software Development Lab, IBM


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [General VM] GC strategy:how to garbage collect short-lived objects quickly.

2006-09-19 Thread Robin Garner

Weldon Washburn wrote:


Its not a simple wrapper that is missing.  MMTk is written in Java.  This
Java code needs to be intergrated into the bootstrap process of DRLVM.   
For

example, initial bootstrap java code needs to run on a bootstrap java heap
until all of MMTk itself has been compiled and initialized.   I keep hoping
that the MMTk guys will volunteer to help me with this (hint, hint).  
Having
said that, I am trying to put together a TODO list of stuff that needs 
doing

on the MMTk port so that others can jump in and help.  I hope to have this
list done within one week.



Happy to help if you have specific questions :)

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [classlib][build] failure?

2006-09-19 Thread Geir Magnusson Jr.
Lets get these aligned...  I tend to work on linux, so it had no  
problem building..


geir

On Sep 18, 2006, at 10:14 PM, Leo Li wrote:


Just comment it out since it is just a warning treated as error.
It compiles successfully and runs well.
Maybe it will not lead to such an error on Linux due to the  
configuration of

make rules.:)

Good luck!


On 9/19/06, Spark Shen [EMAIL PROTECTED] wrote:


Hi All:
When building today's(Sep 19, r447671) classlib on window xp, I  
got the

following error message:
[exec] main.c
[exec] ..\shared\main.c(628) : error C2220: warning treated as
error - no o
bject file generated
[exec] ..\shared\main.c(628) : warning C4101: 'jarRunner' :
unreferenced lo
cal variable
[exec] NMAKE : fatal error U1077: 'cl' : return code '0x2'
[exec] Stop.
[exec] NMAKE : fatal error U1077: 'c:\Program Files\Microsoft
Visual Studi
o .NET 2003\VC7\BIN\nmake.exe' : return code '0x2'
[exec] Stop.

BUILD FAILED
C:\spark\harmony\build.xml:95: The following error occurred while
executing this
line:
C:\spark\harmony\make\build-native.xml:75: The following error  
occurred

while ex
ecuting this line:
C:\spark\harmony\modules\luni\build.xml:167: The following error
occurred while
executing this line:
C:\spark\harmony\make\properties.xml:258: exec returned: 2

Could any one check it?

Best regards

--
Spark Shen
China Software Development Lab, IBM


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: harmony-dev- 
[EMAIL PROTECTED]






--
Leo Li
China Software Development Lab, IBM



-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [test] Jetty integration progress ? (was Re: [classlib] jetty based tests)

2006-09-19 Thread Geir Magnusson Jr.


On Sep 19, 2006, at 2:13 AM, Richard Liang wrote:


On 9/18/06, Geir Magnusson Jr. [EMAIL PROTECTED] wrote:



Andrew Zhang wrote:
 On 9/18/06, Richard Liang [EMAIL PROTECTED] wrote:

 Do you mean we will check the jetty jars into Harmony svn?


 Yes. Is it OK? Or put the jar in depends folder?

Just make it a depends.  We should avoid checking in jars.



Yes. It's good make jetty as a depends, and we could add jetty.jar
into their build scripts if some modules (e.g., luni) require jetty.
Just thinking about another question, how shall we handle the
.classpath of luni in Eclipse? Use external jar?


I dunno, but I don't think that would be a reason to stuff jetty.jar  
in svn.


geir


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] gc.LOS hangs on win32

2006-09-19 Thread Geir Magnusson Jr.


On Sep 19, 2006, at 2:18 AM, Weldon Washburn wrote:


All,
I have noticed endless loop behavior when running gc.LOS.  It  
appears to go
into some sort of endless loop when I try,  build test.  Does  
anyone else

see this problem?

I used MSVC to break into drlvm when it gets stuck.  It shows  
basically
what's been reported before – a bunch of threads in JITed code.   
They keep

making some system call.

Semis/vm/_smoke.tests/reports/gc.LOS_jit.out shows that somehow  
LOS.java is
in an infinite loop after it prints all 200 dots.  This is rather  
curious.


Looking at gc/LOS.java, there is a threads[i].join() where i  
goes from 0
to 199.  This thread join happens immediately after a notifyAll()  
that is

intended to tell each of the threads to start running.

I moved the trace(.) to immediately after the synchronized  
statement in

run().  The test now completes successfully.  It might be a bug in the
implementation of Object.wait() and Object.notifyAll() that  
different HW/SW

combinations are aggrevating???   Below are the mods that I made:



I'd not commit this... we need this to help us find what the problem is.

geir



   public void run () {

   //trace(.);

   synchronized (this.getClass()) {

   if (!started)

   try {

   this.getClass().wait();

   } catch (InterruptedException e) {}

   }

   trace(.);  //wjw










--
Weldon Washburn
Intel Middleware Products Division



-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [classlib][build] failure?

2006-09-19 Thread Leo Li

The warning level is set to level 3 on windows, I mean.

On 9/19/06, Leo Li [EMAIL PROTECTED] wrote:


 Hi, Geir:
  The warning level is set to level 3 while the warning as error option is
off in linux.
  Actually, I would like to set it on in linux since it will help me to
pick some error out, for example, wrongly use pointers. However, I have
tried to set it on, but some unavoidable warning will lead to a failure in
Harmony building. Any good idea?:)

Good luck!

 On 9/19/06, Geir Magnusson Jr. [EMAIL PROTECTED] wrote:

 Lets get these aligned...  I tend to work on linux, so it had no
 problem building..

 geir

 On Sep 18, 2006, at 10:14 PM, Leo Li wrote:

  Just comment it out since it is just a warning treated as error.
  It compiles successfully and runs well.
  Maybe it will not lead to such an error on Linux due to the
  configuration of
  make rules.:)
 
  Good luck!
 
 
  On 9/19/06, Spark Shen [EMAIL PROTECTED] wrote:
 
  Hi All:
  When building today's(Sep 19, r447671) classlib on window xp, I
  got the
  following error message:
  [exec] main.c
  [exec] ..\shared\main.c(628) : error C2220: warning treated as
  error - no o
  bject file generated
  [exec] ..\shared\main.c(628) : warning C4101: 'jarRunner' :
  unreferenced lo
  cal variable
  [exec] NMAKE : fatal error U1077: 'cl' : return code '0x2'
  [exec] Stop.
  [exec] NMAKE : fatal error U1077: 'c:\Program Files\Microsoft
  Visual Studi
  o .NET 2003\VC7\BIN\nmake.exe' : return code '0x2'
  [exec] Stop.
 
  BUILD FAILED
  C:\spark\harmony\build.xml:95: The following error occurred while
  executing this
  line:
  C:\spark\harmony\make\build-native.xml:75: The following error
  occurred
  while ex
  ecuting this line:
  C:\spark\harmony\modules\luni\build.xml:167: The following error
  occurred while
  executing this line:
  C:\spark\harmony\make\properties.xml:258: exec returned: 2
 
  Could any one check it?
 
  Best regards
 
  --
  Spark Shen
  China Software Development Lab, IBM
 
 
  -

  Terms of use : http://incubator.apache.org/harmony/mailing.html
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: harmony-dev-
  [EMAIL PROTECTED]
 
 
 
 
  --
  Leo Li
  China Software Development Lab, IBM


 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




--
Leo Li
China Software Development Lab, IBM





--
Leo Li
China Software Development Lab, IBM


Re: [drlvm] Trouble Building DRLVM

2006-09-19 Thread Geir Magnusson Jr.


On Sep 18, 2006, at 9:58 PM, [EMAIL PROTECTED] wrote:


Geir,

Thanks. I got it the DRLVM to build now, but I'm coming across  
problems running
it.  First, let me mention a couple things about the README that I  
found, while

trying to build the VM.


Yah - if you followed the thread you started, it's clearly out of  
date :)




1.  I had to remove the revision tag (-r revision_number) for the  
downloading of
software and tools.  There were two places in the file  
lnx.properties where I
removed svn's -r tag.  Perhaps this is why I am currently having  
trouble running
it.  But without removing the -r tag, I kept getting a 'Secure  
connection

truncated' error message, causing the build to fail.


Hm.  That should be irrelevant.  You should be able to do :

$ svn co https://svn.apache.org/repos/asf/incubator/harmony/enhanced/ 
trunk

$ cd trunk
$ ant switch_svn_vm
$ ant switch_svn_classlib

which should result in a a checkout of classlib SVN head into  
'working_classlib', a checkout of DRLVM SVN head into 'working_vm'.  
(You could have done just an 'ant' w/ no arguments, that would have  
done the above, plus a full build, but that's really targetted at  
building snapshots.


Then you have each tree that you can build independently. (I'm doing  
all of this from memory, so if some of the ant targets are slightly  
wrong, I apologize in advance...) For classlib :


$ cd working_classlib
$ ant fetch-depends
$ ant

and then

$ cd working_vm/build
$ sh build.sh update
$ sh build.sh



2.  Geir's comment fixed the other problem I had (i.e. change  
drlvm.properties
to point to classlib).  I should have seen this one on my own but,  
just for the

record, I don't think there is anything in the README about this.


Nope.  The README is horribly out of date.  I'll make it a point to  
update today.




After those two things, the build is just fine.  After that, the  
README starts
talking about ij.sh, which I don't even see in the deploy/jre/bin  
directory.

What I do see is a file called java.  I have set my LD_LIBRARY_PATH to
/Harmony/enhanced/drlvm/trunk/build/deploy/jre/bin.
So, here is what happens when I tried to run it:

/Harmony/enhanced/drlvm/trunk/build/deploy/jre/bin./java
Harmony Java launcher
Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software
Foundation or its licensors, as applicable.
java [-vm:vmdll -vmdir:dir -D... [-X...]] [args]
java:
/Harmony/enhanced/drlvm/trunk/vm/thread/src/ 
thread_native_fat_monitor.c:183:

monitor_wait_impl: Assertion `saved_recursion1' failed.
Aborted


Weird.

What platform, btw?

What I do these days is build classlib, and then build drlvm.

You should then be able to do this :

$ cd workign_vm/build/deploy/jre
$ export JAVA_HOME=`pwd`
$ cd bin
$ export PATH=`pwd`:$PATH

and it should work.



Also, if I try to run a java program it just hangs.

After this, I searched the mailing list archives for this problem,  
and found

this:
http://mail-archives.apache.org/mod_mbox/incubator-harmony-commits/ 
200608.mbox/[EMAIL PROTECTED]
So, since my problem looked similar I changed the assertion, but  
now I get this:


/Harmony/enhanced/drlvm/trunk/build/deploy/jre/bin./java
Harmony Java launcher
Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software
Foundation or its licensors, as applicable.
java [-vm:vmdll -vmdir:dir -D... [-X...]] [args]
./java: relocation error:
/Harmony/enhanced/drlvm/trunk/build/deploy/jre/bin/libhyprt.so: symbol
hythread_exit, version HYTHR_0.1 not defined in file libhythr.so  
with link time

reference

This looks like I may have the wrong version of one of these lib  
files.  Any

ideas on what I am doing wrong?


Amazing.

So - what platform are you working on?  Clearly some kind of linux.

Second, what happens if you set JAVA_HOME as suggested above?

geir




Thanks in advance for your help,
Armand

Quoting Geir Magnusson Jr. [EMAIL PROTECTED]:




Morozova, Nadezhda wrote:

Geir,


Ok - it's clear I need to doc this.


This is a trigger phrase for me. We have README and Getting  
Started for
DRLVM that are terribly out-of-date. Now, if we update them, and  
keep
them up-to-date, Armand would not need to write to the mailing  
list but

would just follow the guide to successfully build DRLVM :)


Indeed!



Can you help me update those docs? README is probably of the  
greatest
urgency. I can use your explanation below, but there are other  
things in

the file that need your attention ;)


Sure. :)

geir



Best regards,
Nadya Morozova

-Original Message-
From: Geir Magnusson Jr. [mailto:[EMAIL PROTECTED]
Sent: Monday, September 18, 2006 8:20 PM
To: harmony-dev@incubator.apache.org
Subject: Re: [drlvm] Trouble Building DRLVM



Armand Navabi wrote:
I am new to using Harmony.  I am currently having trouble  
getting the

DRLVM to build.  I have a successful build of the class library.  I

have

the following error when I try to ./build.sh update:

[mkdir] Created dir:

Re: [drlvm] HARMONY-1363 - status update

2006-09-19 Thread Geir Magnusson Jr.


On Sep 19, 2006, at 3:01 AM, Chris Gray wrote:


On Monday 18 September 2006 18:14, Geir Magnusson Jr. wrote:

Pavel Pervov wrote:
Tried it on Windows and found the problem which, as it looks  
like, have

never been caught before.
As I discovered, launcher uses platform specific line separators  
to parse
harmonyvm.properties on a specific platform. But  
haromynvm.properties,

which
is copied into deploy, has unix line endings and is skipped. As the
result, EM can't initialize.'


A ha!


I workarounded this by running unix2dos on harmonyvm.properties.


Ok - we should get that in as eol-native


Wouldn't it be better (and safer) to fix the parser? Normally a  
properties
file can contain any kind of line separators and still be parsed  
correctly,

which is a Good Thing IMHO. E.g. according to the spec for
java.util.Properties.load(),
	A natural line of input is terminated either by a set of line  
terminator

characters (\n or \r or \r\n) or by the end of the file.


Yes - and I think there is a patch somewhere.  But we should keep  
little nits like this under control.


geir



Chris

--
Chris Gray/k/ Embedded Java Solutions  BE0503765045
Embedded  Mobile Java, OSGihttp://www.k-embedded-java.com/
[EMAIL PROTECTED] +32 3 216 0369


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [classlib][build] failure?

2006-09-19 Thread Geir Magnusson Jr.

There is no way to get rid of the warnings in our codebase on linux?

geir

On Sep 19, 2006, at 4:03 AM, Leo Li wrote:


Hi, Geir:
 The warning level is set to level 3 while the warning as error  
option is

off in linux.
 Actually, I would like to set it on in linux since it will help me  
to pick
some error out, for example, wrongly use pointers. However, I have  
tried to
set it on, but some unavoidable warning will lead to a failure in  
Harmony

building. Any good idea?:)

Good luck!

On 9/19/06, Geir Magnusson Jr. [EMAIL PROTECTED] wrote:


Lets get these aligned...  I tend to work on linux, so it had no
problem building..

geir

On Sep 18, 2006, at 10:14 PM, Leo Li wrote:

 Just comment it out since it is just a warning treated as error.
 It compiles successfully and runs well.
 Maybe it will not lead to such an error on Linux due to the
 configuration of
 make rules.:)

 Good luck!


 On 9/19/06, Spark Shen [EMAIL PROTECTED] wrote:

 Hi All:
 When building today's(Sep 19, r447671) classlib on window xp, I
 got the
 following error message:
 [exec] main.c
 [exec] ..\shared\main.c(628) : error C2220: warning treated as
 error - no o
 bject file generated
 [exec] ..\shared\main.c(628) : warning C4101: 'jarRunner' :
 unreferenced lo
 cal variable
 [exec] NMAKE : fatal error U1077: 'cl' : return code '0x2'
 [exec] Stop.
 [exec] NMAKE : fatal error U1077: 'c:\Program Files\Microsoft
 Visual Studi
 o .NET 2003\VC7\BIN\nmake.exe' : return code '0x2'
 [exec] Stop.

 BUILD FAILED
 C:\spark\harmony\build.xml:95: The following error occurred while
 executing this
 line:
 C:\spark\harmony\make\build-native.xml:75: The following error
 occurred
 while ex
 ecuting this line:
 C:\spark\harmony\modules\luni\build.xml:167: The following error
 occurred while
 executing this line:
 C:\spark\harmony\make\properties.xml:258: exec returned: 2

 Could any one check it?

 Best regards

 --
 Spark Shen
 China Software Development Lab, IBM


  
-

 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: harmony-dev- 
[EMAIL PROTECTED]

 For additional commands, e-mail: harmony-dev-
 [EMAIL PROTECTED]




 --
 Leo Li
 China Software Development Lab, IBM


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: harmony-dev- 
[EMAIL PROTECTED]






--
Leo Li
China Software Development Lab, IBM



-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [DRLVM][JIT] can Jitrino.JET call MMTk alloc() instead of C helper?

2006-09-19 Thread Robin Garner

Weldon Washburn wrote:

On 9/8/06, Mikhail Fursov [EMAIL PROTECTED] wrote:


Weldon,
I added 'alloc' support to JIRA 816 (magic2.zip file)
Now it supports objects allocation only, not arrays. MMTk allocation 
works
only for class named 'test'  and methods with prefix  'testAlloc'. To 
turn

it on use -Xjit jet::alloc4j option.



Thanks!  I will take a look this weekend.

I had a problem with implementation: usual 'new' vm helper does vtable 
field

initialization in allocated object space by itself. Your alloc() method
doesn't.
In the patch in JIRA I added vtable initialization code right after the
alloc() call to JIT, that is actually bad design decision (IMO).



You are correct.  Its bad design.  Writing the vtable pointer is not the
responsibility of the JIT.  MMTk is somewhat vague on who owns vtable ptr
init.  In any case, it looks like the jit should follow the call to alloc()
with a call to postAlloc().  I will make sure the postAlloc() code fixes up
the vtable ptr.  Its OK to bend the typeRef.  All I want is the hard ptr
that gets written into the object header.  We will go back later and fix
this interface hack.  See below:


Ummm ... MMTk isn't vague on who owns vtable ptr initialization - it's 
the responsibility of the VM.  MMTk strives to know as little about the 
object model as possible, apart from what is exposed through the 
ObjectModel interface.  OK, perhaps the contract isn't as clearly 
expressed as it chould be :)


In JikesRVM, the incoming interface (MM_Interface) provides the 
vm-specific features such as adding the object header size to the 
allocation request, filling in the non-GC portions of the header etc.  I 
think that approach would work for DRLVM.


MMTk definitely doesn't want to know about vtables and type pointers - 
after all there are plenty of systems it could be built into that don't 
have such things.




/**

* Perform post-allocation actions. For many allocators none are

* required.

*

* @param ref The newly allocated object

* @param typeRef the type reference for the instance being created

* @param bytes The size of the space to be allocated (in bytes)

* @param allocator The allocator number to be used for this allocation

*/

public void postAlloc(ObjectReference ref, ObjectReference typeRef,

int bytes, int allocator) throws InlinePragma {





Can we replace the 'alloc()' call with another Java method  that uses

unboxed API and behaves exactly like 'new' helper?


I think that's what I'm saying MMTk expects.

cheers

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [General VM] GC strategy:how to garbage collect short-lived objects quickly.

2006-09-19 Thread Egor Pasko
On the 0x1E9 day of Apache Harmony Robin Garner wrote:
 Egor Pasko wrote:
  On the 0x1E4 day of Apache Harmony Oliver Deakin wrote:
  Forcing gc by hand does work, but it is difficult for code to know
  when to
  call gc.So I think it is better if VM can give some support since it
  knows
  the global situation.:)
  ..and of course a manual gc() call does not necessarily result in a gc
  this one is easy :) make a gc2() magic in DRLVM and collect only
  young
  objects on it.. to make code portable, implement gc2() as gc() for
  other JVMs. Need to be patient until the generational GC.
  Can a hack like this be widely accepted in Java community? I think,
  yes.
 
 
 I think GC research will soon make this unnecessary. 

..How I am dreaming of this moment :)

 For example the Sun VM has a concurrent collector for its mature
 space, so on a sufficiently lightly loaded system (or with a core to
 spare) you could eliminate most of the mature space collection pause
 time.

Won't there always be some space to improve performance of a specific
application via user-level hints to GC? Anyway, I am glad that GC
research is making progress!

-- 
Egor Pasko, Intel Managed Runtime Division


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[drlvm] none of kernel tests passed for the recent sources

2006-09-19 Thread Vladimir Gorr

Geir,

I found out none of the DRRVM kernel tests passed recently. Although
all fine worked yet yesterday.

*build.bat -Djunit.jar=%JUNIT_HOME% kernel.test*
...
[echo]
[echo] ==
[echo] Run kernel tests using jitrino.jet
[echo] ==
[echo]
   [mkdir] Created dir:
C:\DrlSrc\drlvm\trunk\build\win_ia32_msvc_debug\semis\kernel.tests\reports\jitrino.jet
[echo] RUNNING : java.lang.Class1_5Test
   [junit] Test java.lang.Class1_5Test FAILED
   [junit] Test java.lang.Class1_5Test FAILED
[echo] FAILED on reference JRE 
[echo] RUNNING : java.lang.Class5Test
   [junit] Test java.lang.Class5Test FAILED
   [junit] Test java.lang.Class5Test FAILED
[echo] FAILED on reference JRE 
[echo] RUNNING : java.lang.ClassAnnotationsTest
   [junit] Test java.lang.ClassAnnotationsTest FAILED

^C
...

I suspect you can know a clue for this issue. Probably I missed anything
and didn't note what was modifed.

Thanks in advance,
Vladimir.


Re: [drlvm] Trouble Building DRLVM

2006-09-19 Thread Egor Pasko
On the 0x1E9 day of Apache Harmony Geir Magnusson, Jr. wrote:
 $ svn co https://svn.apache.org/repos/asf/incubator/harmony/enhanced/
 trunk
 $ cd trunk
 $ ant switch_svn_vm
 $ ant switch_svn_classlib
 
 which should result in a a checkout of classlib SVN head into
 'working_classlib', a checkout of DRLVM SVN head into 'working_vm'.
 (You could have done just an 'ant' w/ no arguments, that would have
 done the above, plus a full build, but that's really targetted at
 building snapshots.
 
 Then you have each tree that you can build independently. (I'm doing
 all of this from memory, so if some of the ant targets are slightly
 wrong, I apologize in advance...) For classlib :
 
 $ cd working_classlib
 $ ant fetch-depends
 $ ant
 
 and then
 
 $ cd working_vm/build
 $ sh build.sh update
 $ sh build.sh

Geir, thanks for clarification. I do almost the same thing, but it
does NOT solve the problem on SUSE for me yet. The most unpleasant for
me here is that GDB does not help:

$ gdb java
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for details.
This GDB was configured as i586-suse-linux...Using host libthread_db library 
/lib/tls/libthread_db.so.1.

(gdb) handle SIGSEGV stop
SignalStop  Print   Pass to program Description
SIGSEGV   Yes   Yes Yes Segmentation fault
(gdb) set args -showversion Hello
(gdb) r
Starting program: 
/export/users/evpasko/svn/2/harmony/enhanced/trunk/working_vm/build/deploy/jre/bin/java
 -showversion Hello
[Thread debugging using libthread_db enabled]
[New Thread 1080381568 (LWP 4658)]
[New Thread 1083587504 (LWP 4661)]
Cannot find user-level thread for LWP 4658: generic error
(gdb)

does GDB work for you?

-- 
Egor Pasko, Intel Managed Runtime Division


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] none of kernel tests passed for the recent sources

2006-09-19 Thread Geir Magnusson Jr


Vladimir Gorr wrote:
 Geir,
 
 I found out none of the DRRVM kernel tests passed recently. Although
 all fine worked yet yesterday.
 
 *build.bat -Djunit.jar=%JUNIT_HOME% kernel.test*
 ...
 [echo]
 [echo] ==
 [echo] Run kernel tests using jitrino.jet
 [echo] ==
 [echo]
[mkdir] Created dir:
 C:\DrlSrc\drlvm\trunk\build\win_ia32_msvc_debug\semis\kernel.tests\reports\jitrino.jet
 
 [echo] RUNNING : java.lang.Class1_5Test
[junit] Test java.lang.Class1_5Test FAILED
[junit] Test java.lang.Class1_5Test FAILED
 [echo] FAILED on reference JRE 
 [echo] RUNNING : java.lang.Class5Test
[junit] Test java.lang.Class5Test FAILED
[junit] Test java.lang.Class5Test FAILED
 [echo] FAILED on reference JRE 
 [echo] RUNNING : java.lang.ClassAnnotationsTest
[junit] Test java.lang.ClassAnnotationsTest FAILED
 
 ^C
 ...
 
 I suspect you can know a clue for this issue. Probably I missed anything
 and didn't note what was modifed.

Why are they failing?  AS of yesterday, I thought they were all passing
for me.  I wouldn't have checked anything in if I saw that they were
failing en-masse.  (We do need to have a stop the world as we
stabilize DRLVM, figure out why tests fail apparently randomly, etc...)

I'm running kernel tests now on Ubuntu 6, release build, and they are
running fine.

What platform?

geir



-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] Trouble Building DRLVM

2006-09-19 Thread Geir Magnusson Jr
What's different about how you build?  Are you building from SVN source?
 Is it release or debug?

What happens when you run?

geir


Egor Pasko wrote:
 On the 0x1E9 day of Apache Harmony Geir Magnusson, Jr. wrote:
 $ svn co https://svn.apache.org/repos/asf/incubator/harmony/enhanced/
 trunk
 $ cd trunk
 $ ant switch_svn_vm
 $ ant switch_svn_classlib

 which should result in a a checkout of classlib SVN head into
 'working_classlib', a checkout of DRLVM SVN head into 'working_vm'.
 (You could have done just an 'ant' w/ no arguments, that would have
 done the above, plus a full build, but that's really targetted at
 building snapshots.

 Then you have each tree that you can build independently. (I'm doing
 all of this from memory, so if some of the ant targets are slightly
 wrong, I apologize in advance...) For classlib :

 $ cd working_classlib
 $ ant fetch-depends
 $ ant

 and then

 $ cd working_vm/build
 $ sh build.sh update
 $ sh build.sh
 
 Geir, thanks for clarification. I do almost the same thing, but it
 does NOT solve the problem on SUSE for me yet. The most unpleasant for
 me here is that GDB does not help:
 
 $ gdb java
 GNU gdb 6.3
 Copyright 2004 Free Software Foundation, Inc.
 GDB is free software, covered by the GNU General Public License, and you are
 welcome to change it and/or distribute copies of it under certain conditions.
 Type show copying to see the conditions.
 There is absolutely no warranty for GDB.  Type show warranty for details.
 This GDB was configured as i586-suse-linux...Using host libthread_db 
 library /lib/tls/libthread_db.so.1.
 
 (gdb) handle SIGSEGV stop
 SignalStop  Print   Pass to program Description
 SIGSEGV   Yes   Yes Yes Segmentation fault
 (gdb) set args -showversion Hello
 (gdb) r
 Starting program: 
 /export/users/evpasko/svn/2/harmony/enhanced/trunk/working_vm/build/deploy/jre/bin/java
  -showversion Hello
 [Thread debugging using libthread_db enabled]
 [New Thread 1080381568 (LWP 4658)]
 [New Thread 1083587504 (LWP 4661)]
 Cannot find user-level thread for LWP 4658: generic error
 (gdb)
 
 does GDB work for you?
 

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[classlib][awt] problem w/ AWT on linux? (CaffineMark) Was (Re: [drlvm] When running caffinemark, DRLVM now crashes..)

2006-09-19 Thread Geir Magnusson Jr
Ok, so I was really tired last night when I reported this.  I've done a
little more homeork, and I get the same crash with J9.  The stack trace
is :


Generated system dump: {default OS core name}

Thread: main (priority 5) (LOCATION OF ERROR)
 NATIVE
org/apache/harmony/awt/nativebridge/linux/X11.XmuLookupStandardColormap(JIJIJII)I
 0080
org/apache/harmony/awt/gl/linux/XGraphicsConfiguration.obtainRGBColorMap()J
 0015
org/apache/harmony/awt/gl/linux/XGraphicsConfiguration.init(Lorg/apache/harmony/awt/gl/linux/XGraphicsDevice
;Lorg/apache/harmony/awt/nativebridge/linux/X11$XVisualInfo;)V
 00aa org/apache/harmony/awt/gl/linux/XGraphicsDevice.createConfigs()V
 0008
org/apache/harmony/awt/gl/linux/XGraphicsDevice.getConfigs()[Lorg/apache/harmony/awt/gl/linux/XGraphicsConfigu
ration;
 0001
org/apache/harmony/awt/gl/linux/XGraphicsDevice.getDefaultConfiguration()Ljava/awt/GraphicsConfiguration;
 000f
java/awt/Window.getGraphicsConfiguration(Ljava/awt/GraphicsConfiguration;)Ljava/awt/GraphicsConfiguration;
 0081
java/awt/Window.init(Ljava/awt/Window;Ljava/awt/GraphicsConfiguration;)V
 0003
java/awt/Frame.init(Ljava/lang/String;Ljava/awt/GraphicsConfiguration;)V
 0003 java/awt/Frame.init(Ljava/lang/String;)V
 0003 CaffeineMarkFrame.init(Ljava/applet/Applet;Z)V
 0006 CaffeineMarkApp.main([Ljava/lang/String;)V


Anyone have any idea?

geir


Geir Magnusson Jr wrote:
 On Ubuntu 6, I was trying to run CaffineMark to see where we are w/ the
 lastest set of patches and the big java 5 and other fix patch.  release
 build, r447024
 
 top of the stack trace is
 Java_org_harmony_awt_nativebridge_linux_X11_XmuLookupStandardColormap
 
 Can anyone repeat this error?
 
 geir
 
 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [jira] Created: (HARMONY-1456) [classlib][awt]java.awt.Font.hasUniformLineMetrics() return true on Harmony while RI returns false

2006-09-19 Thread Ilya Okomin

Hi, community!

I found for java.awt.Font.hasUniformLineMetrics() RI returns false for all
fonts (physical/logical) while Harmony returns true for physical and false
for logical.
Spec says: Checks whether or not this Font has uniform line metrics. A
logical Font might be a composite font, which means that it is composed of
different physical fonts to cover different code ranges. Each of these fonts
might have different LineMetrics. If the logical Font is a single font then
the metrics would be uniform. . Thus I find reasonable to return true for
physical fonts, as they are single.I assume that it is a non-bug difference
from RI.
Any thoughts on this issue?

Regards,
Ilya.


On 9/13/06, Ilya Okomin (JIRA) [EMAIL PROTECTED] wrote:


[classlib][awt]java.awt.Font.hasUniformLineMetrics() return true on
Harmony while RI returns false

--

Key: HARMONY-1456
URL: http://issues.apache.org/jira/browse/HARMONY-1456
Project: Harmony
 Issue Type: Bug
 Components: Non-bug differences from RI
Environment: Windows XP
   Reporter: Ilya Okomin
   Priority: Trivial


According to the specification method must Font.hasUniformLineMetricsreturn 
true if this Font has uniform
line metrics; false otherwise.
RI returns false for physical font Arial while Harmony returns true.
test.java
import java.awt.*;

import junit.framework.TestCase;

public class test extends TestCase {

   public void testRun() {
   final String name = Arial;

   Font f=new Font(name, Font.BOLD, 12);

   // Check if created font is physical, it's family name
   // is not logical and equals to the name parameter.
   assertEquals(f.getFamily(), name);
   assertTrue(f.hasUniformLineMetrics());
   }
}
===

Output:
RI: java version 1.5.0
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32,
R25.0.0-75, GC: System optimized over throughput (initial strategy
singleparpar))

junit.framework.AssertionFailedError
   at junit.framework.Assert.fail(Assert.java:47)
   at junit.framework.Assert.assertTrue(Assert.java:20)
   at junit.framework.Assert.assertTrue(Assert.java:27)
   at test.testRun(Test9688.java:17)
   at jrockit.reflect.VirtualNativeMethodInvoker.invoke(
Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
   at java.lang.reflect.Method.invoke(Ljava.lang.Object;[
Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
   at junit.framework.TestCase.runTest(TestCase.java:154)
   at junit.framework.TestCase.runBare(TestCase.java:127)
   at junit.framework.TestResult$1.protect(TestResult.java:106)
   at junit.framework.TestResult.runProtected(TestResult.java:124)
   at junit.framework.TestResult.run(TestResult.java:109)
   at junit.framework.TestCase.run(TestCase.java:118)
   at junit.framework.TestSuite.runTest(TestSuite.java:208)
   at junit.framework.TestSuite.run(TestSuite.java:203)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
RemoteTestRunner.java:478)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(
RemoteTestRunner.java:344)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
RemoteTestRunner.java:196)

Harmony: java version 1.5.0
pre-alpha : not complete or compatible
svn = r431938, (Aug 16 2006), Windows/ia32/msvc 1310, release build
http://incubator.apache.org/harmony

// test passed!

I would suppose that it is RI bug, since spec says:  If the logical Font
is a single font then the metrics would be uniform. In this case we have
Arial font that is a single physical font on Windows platform and
according to spec it has to have uniform metrics.



--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira






--
--
Ilya Okomin
Intel Middleware Products Division


Re: [drlvm] none of kernel tests passed for the recent sources

2006-09-19 Thread Vladimir Gorr

On 9/19/06, Geir Magnusson Jr [EMAIL PROTECTED] wrote:




Vladimir Gorr wrote:
 Geir,

 I found out none of the DRRVM kernel tests passed recently. Although
 all fine worked yet yesterday.

 *build.bat -Djunit.jar=%JUNIT_HOME% kernel.test*
 ...
 [echo]
 [echo] ==
 [echo] Run kernel tests using jitrino.jet
 [echo] ==
 [echo]
[mkdir] Created dir:

C:\DrlSrc\drlvm\trunk\build\win_ia32_msvc_debug\semis\kernel.tests\reports\jitrino.jet

 [echo] RUNNING : java.lang.Class1_5Test
[junit] Test java.lang.Class1_5Test FAILED
[junit] Test java.lang.Class1_5Test FAILED
 [echo] FAILED on reference JRE 
 [echo] RUNNING : java.lang.Class5Test
[junit] Test java.lang.Class5Test FAILED
[junit] Test java.lang.Class5Test FAILED
 [echo] FAILED on reference JRE 
 [echo] RUNNING : java.lang.ClassAnnotationsTest
[junit] Test java.lang.ClassAnnotationsTest FAILED

 ^C
 ...

 I suspect you can know a clue for this issue. Probably I missed anything
 and didn't note what was modifed.

Why are they failing?  AS of yesterday, I thought they were all passing
for me.  I wouldn't have checked anything in if I saw that they were
failing en-masse.  (We do need to have a stop the world as we
stabilize DRLVM, figure out why tests fail apparently randomly, etc...)



Agree. I also try to understand this.

I'm running kernel tests now on Ubuntu 6, release build, and they are

running fine.

What platform?



debug version on Windows platforms. I have no success on SUSE LINUX as well:

...
-run-kernel-test-batch:
   [mkdir] Created dir:
/nfs/ins/proj/drl/coreapi/vgorr/drlvm/trunk/build/lnx_ia32_gcc_debug/semis/kernel.tests/reports/batch.mode
   [junit] Running org.apache.harmony.lang.generics.ClassLoaderTest
   [junit] SIGSEGV in VM code.
   [junit] Stack trace:
   [junit] 1: properties_free (??:-1)
   [junit] 2: ?? (??:-1)
   [junit] 3: readClassPathFromPropertiesFile (??:-1)
   [junit] 4: ?? (??:-1)
   [junit] 5: ?? (??:-1)
   [junit] 6: ?? (??:-1)
   [junit] 7: ?? (??:-1)
   [junit] 8: ?? (??:-1)
   [junit] 9: ?? (??:-1)
   [junit] 10: JNI_OnLoad (??:-1)
   [junit] 11: ?? (??:-1)
   [junit] 12: ?? (??:-1)
   [junit] 13: ?? (??:-1)
   [junit] 14: ?? (??:-1)
   [junit] 15: ?? (??:-1)
   [junit] 16: ?? (??:-1)
   [junit] 17: ?? (??:-1)
   [junit] 18: ?? (??:-1)
   [junit] end of stack trace
   [junit] Tests FAILED


Thanks,
Vladimir.

geir




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: [jira] Commented: (HARMONY-286) Add build-java and build-native targets to main build.xml

2006-09-19 Thread Oliver Deakin

I've updated the patch and attached it to the JIRA. It adds 6 new targets to
the top level build.xml: clean-java, build-java, rebuild-java, clean-native,
build-native and rebuild-native.

Regards,
Oliver

Alexey Petrenko wrote:

Guys,

I suggest to close this issue as won't fix because current build
allows to build only specified module. And it is enough.

Thoughts? Objections?

SY, Alexey

2006/9/15, Alexey Petrenko (JIRA) [EMAIL PROTECTED]:
   [ 
http://issues.apache.org/jira/browse/HARMONY-286?page=comments#action_12434930 
]


Alexey Petrenko commented on HARMONY-286:
-

Current build allows to build only specified module. So I think that 
this bug should be closed as won't fix


 Add build-java and build-native targets to main build.xml
 -

 Key: HARMONY-286
 URL: http://issues.apache.org/jira/browse/HARMONY-286
 Project: Harmony
  Issue Type: Improvement
  Components: Classlib
Reporter: Oliver Deakin
Priority: Minor
 Attachments: build.targets.diff


 At the moment there are no targets in make/build.xml to clean and 
build only the native code or only the java code in classlib.
 I think it would be useful to have these as separate targets for 
convenience, so that when you are only working on Java code you need 
not recompile the native code entirely everytime, and vice versa.

 I will attach a patch with the necessary changes

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the 
administrators: http://issues.apache.org/jira/secure/Administrators.jspa

-
For more information on JIRA, see: 
http://www.atlassian.com/software/jira









--
Oliver Deakin
IBM United Kingdom Limited


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] Trouble Building DRLVM

2006-09-19 Thread Egor Pasko
On the 0x1E9 day of Apache Harmony Geir Magnusson, Jr. wrote:
 What's different about how you build? 

I just run ant from enhanced/trunk, and when it breaks, I do what
you suggested. There is almost no difference because not many things
are done additionally to switch_svn_vm and switch_svn_classlib.

 Are you building from SVN source?

yes, sure, I tried various scenarios of building, but result is the
same: segmentation fault somewhere sopposedly in launcher. At least,
Alexey Varlamov could reproduce it..

  Is it release or debug?

This is debug config. Now I am building the launcher in debug mode and
trying to investivate more...
 
 What happens when you run?

currently it is like this:

$ ./java -showversion Hello
Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software 
Foundation or its licensors, as applicable.
java version 1.5.0
pre-alpha : not complete or compatible
svn = r447722, (Sep 19 2006), Linux/ia32/gcc 3.3.3, debug build
http://incubator.apache.org/harmony
SIGSEGV in VM code.
Stack trace:
1: free (??:-1)
2: ?? (??:-1)
3: ?? (??:-1)
4: hymem_free_memory 
(/export/users/evpasko/svn/2/harmony/enhanced/trunk/working_classlib/modules/luni/src/main/native/port/linux/hymem.c:115)
5: ?? (??:-1)
6: properties_free (../shared/strhelp.c:97)
end of stack trace
Segmentation fault


 Egor Pasko wrote:
  On the 0x1E9 day of Apache Harmony Geir Magnusson, Jr. wrote:
  $ svn co https://svn.apache.org/repos/asf/incubator/harmony/enhanced/
  trunk
  $ cd trunk
  $ ant switch_svn_vm
  $ ant switch_svn_classlib
 
  which should result in a a checkout of classlib SVN head into
  'working_classlib', a checkout of DRLVM SVN head into 'working_vm'.
  (You could have done just an 'ant' w/ no arguments, that would have
  done the above, plus a full build, but that's really targetted at
  building snapshots.
 
  Then you have each tree that you can build independently. (I'm doing
  all of this from memory, so if some of the ant targets are slightly
  wrong, I apologize in advance...) For classlib :
 
  $ cd working_classlib
  $ ant fetch-depends
  $ ant
 
  and then
 
  $ cd working_vm/build
  $ sh build.sh update
  $ sh build.sh
  
  Geir, thanks for clarification. I do almost the same thing, but it
  does NOT solve the problem on SUSE for me yet. The most unpleasant for
  me here is that GDB does not help:
  
  $ gdb java
  GNU gdb 6.3
  Copyright 2004 Free Software Foundation, Inc.
  GDB is free software, covered by the GNU General Public License, and you are
  welcome to change it and/or distribute copies of it under certain 
  conditions.
  Type show copying to see the conditions.
  There is absolutely no warranty for GDB.  Type show warranty for details.
  This GDB was configured as i586-suse-linux...Using host libthread_db 
  library /lib/tls/libthread_db.so.1.
  
  (gdb) handle SIGSEGV stop
  SignalStop  Print   Pass to program Description
  SIGSEGV   Yes   Yes Yes Segmentation fault
  (gdb) set args -showversion Hello
  (gdb) r
  Starting program: 
  /export/users/evpasko/svn/2/harmony/enhanced/trunk/working_vm/build/deploy/jre/bin/java
   -showversion Hello
  [Thread debugging using libthread_db enabled]
  [New Thread 1080381568 (LWP 4658)]
  [New Thread 1083587504 (LWP 4661)]
  Cannot find user-level thread for LWP 4658: generic error
  (gdb)
  
  does GDB work for you?
  
 
 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-- 
Egor Pasko, Intel Managed Runtime Division


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [test] Jetty integration progress ? (was Re: [classlib] jetty based tests)

2006-09-19 Thread Stepan Mishura

On 9/19/06, Richard Liang wrote:


On 9/18/06, Geir Magnusson Jr. wrote:


 Andrew Zhang wrote:
  On 9/18/06, Richard Liang [EMAIL PROTECTED] wrote:
 
  On 9/18/06, Andrew Zhang [EMAIL PROTECTED] wrote:
   Hi,
  
   It's me again. Seems no big progress on jetty. I'd like to take the
job
  if
   no one objects. Here are my suggestions:
 
  Great :-)
 
  
   1. jetty version:  I suggest that Harmony adopt jetty 6. Because
many
   5.xAPIs are deprecated in jetty 6, we'd better follow latest jetty
   version.
 
  +1
 
  
   2. location to put jetty jars: support module.
  
 
  Do you mean we will check the jetty jars into Harmony svn?
 
 
  Yes. Is it OK? Or put the jar in depends folder?

 Just make it a depends.  We should avoid checking in jars.


Yes. It's good make jetty as a depends, and we could add jetty.jar
into their build scripts if some modules (e.g., luni) require jetty.
Just thinking about another question, how shall we handle the
.classpath of luni in Eclipse? Use external jar?




I'd use it as 'support.jar' - so it is downloaded to 'depends', copied by
the build to 'deploy/build/test' and added as external jar in Eclipse.

Thanks,
Stepan.



  3. how to write jetty test? I suggest that we could start jetty in
any
  test
   if necessary. If we found there are heavy code duplicates, we could
  extract
   them as utility methods in support module. So far, I'd like to
write
  jetty
   test directly in each module, because the code is rather simple,
only a
  few
   lines.[1] It's also easy to write user-customized handler for
   negative tests. Let's make it work, and then make it better. :-)
  
   Any suggestions/comments/objections?  I volunteer to upload patches
  when
  we
   reach an agreement.
  
   Best regards,
   Andrew
  
   [1]
   jetty-based test example:
   setUp code:
   port = Support_PortManager.getNextPort();
   Server server = new Server(port);
   ResourceHandler resource_handler=new ResourceHandler();
   resource_handler.setResourceBase(somewhere);
   server.setHandler(resource_handler);
   server.start();
   tearDown code:
   server.stop();
  
  
 
 
  --
  Richard Liang
  China Development Lab, IBM



--
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [General VM] GC strategy:how to garbage collect short-lived objects quickly.

2006-09-19 Thread Oliver Deakin

Xiao-Feng Li wrote:

On 9/18/06, Oliver Deakin [EMAIL PROTECTED] wrote:

Xiao-Feng Li wrote:
 On 9/14/06, Jimmy, Jing Lv [EMAIL PROTECTED] wrote:
 Interesting topic, I'm still dreaming of free() in Java (This dream
 begins at the very beginning when I see Java, as C/C++ is my first
 program language )However, it seems RI will never give us 
free(). :)


 Only a thought, Java may offer a key word temp, indicating that 
this

 variety can be freed at once.


 Well, it is not so easy to support free() in JVM as it looks like,
 and may not really bring benefit. Even worse, it may introduce unsafe
 code, which was one of the major design goals of Java/JVM. That said,
 I agree that some hints by programmer to assist GC might be an
 interesting topic.

There are always weak references to help out with short lived objects -
you know they will be collected fairly soon (should be within a few
gc cycles) - and soft references for longer lived ones. That's
about as close to free() as youll get for now!

Regards,
Oliver



I don't understand. How can weak references help short-lived objects 
reclaim?


Really what I'm saying is that this is the closest thing we have to a
hint to GC that objects can be collected soon - but it is not anything
like a proper free() call. There is no immediate reclaim of memory,
just the possibility that it will be reclaimed soon - and the object
may be garbage collected before you are finished with it!

Regards,
Oliver



Thanks,
xiaofeng

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Oliver Deakin
IBM United Kingdom Limited


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] Trouble Building DRLVM

2006-09-19 Thread Geir Magnusson Jr
For grins, can you set JAVA_HOME to the deploy/jre directory and PATH to
 include jre/bin?

geir


Egor Pasko wrote:
 On the 0x1E9 day of Apache Harmony Geir Magnusson, Jr. wrote:
 What's different about how you build? 
 
 I just run ant from enhanced/trunk, and when it breaks, I do what
 you suggested. There is almost no difference because not many things
 are done additionally to switch_svn_vm and switch_svn_classlib.
 
 Are you building from SVN source?
 
 yes, sure, I tried various scenarios of building, but result is the
 same: segmentation fault somewhere sopposedly in launcher. At least,
 Alexey Varlamov could reproduce it..
 
  Is it release or debug?
 
 This is debug config. Now I am building the launcher in debug mode and
 trying to investivate more...
  
 What happens when you run?
 
 currently it is like this:
 
 $ ./java -showversion Hello
 Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software 
 Foundation or its licensors, as applicable.
 java version 1.5.0
 pre-alpha : not complete or compatible
 svn = r447722, (Sep 19 2006), Linux/ia32/gcc 3.3.3, debug build
 http://incubator.apache.org/harmony
 SIGSEGV in VM code.
 Stack trace:
 1: free (??:-1)
 2: ?? (??:-1)
 3: ?? (??:-1)
 4: hymem_free_memory 
 (/export/users/evpasko/svn/2/harmony/enhanced/trunk/working_classlib/modules/luni/src/main/native/port/linux/hymem.c:115)
 5: ?? (??:-1)
 6: properties_free (../shared/strhelp.c:97)
 end of stack trace
 Segmentation fault
 
 
 Egor Pasko wrote:
 On the 0x1E9 day of Apache Harmony Geir Magnusson, Jr. wrote:
 $ svn co https://svn.apache.org/repos/asf/incubator/harmony/enhanced/
 trunk
 $ cd trunk
 $ ant switch_svn_vm
 $ ant switch_svn_classlib

 which should result in a a checkout of classlib SVN head into
 'working_classlib', a checkout of DRLVM SVN head into 'working_vm'.
 (You could have done just an 'ant' w/ no arguments, that would have
 done the above, plus a full build, but that's really targetted at
 building snapshots.

 Then you have each tree that you can build independently. (I'm doing
 all of this from memory, so if some of the ant targets are slightly
 wrong, I apologize in advance...) For classlib :

 $ cd working_classlib
 $ ant fetch-depends
 $ ant

 and then

 $ cd working_vm/build
 $ sh build.sh update
 $ sh build.sh
 Geir, thanks for clarification. I do almost the same thing, but it
 does NOT solve the problem on SUSE for me yet. The most unpleasant for
 me here is that GDB does not help:

 $ gdb java
 GNU gdb 6.3
 Copyright 2004 Free Software Foundation, Inc.
 GDB is free software, covered by the GNU General Public License, and you are
 welcome to change it and/or distribute copies of it under certain 
 conditions.
 Type show copying to see the conditions.
 There is absolutely no warranty for GDB.  Type show warranty for details.
 This GDB was configured as i586-suse-linux...Using host libthread_db 
 library /lib/tls/libthread_db.so.1.

 (gdb) handle SIGSEGV stop
 SignalStop  Print   Pass to program Description
 SIGSEGV   Yes   Yes Yes Segmentation fault
 (gdb) set args -showversion Hello
 (gdb) r
 Starting program: 
 /export/users/evpasko/svn/2/harmony/enhanced/trunk/working_vm/build/deploy/jre/bin/java
  -showversion Hello
 [Thread debugging using libthread_db enabled]
 [New Thread 1080381568 (LWP 4658)]
 [New Thread 1083587504 (LWP 4661)]
 Cannot find user-level thread for LWP 4658: generic error
 (gdb)

 does GDB work for you?

 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [classlib][awt] problem w/ AWT on linux? (CaffineMark) Was (Re: [drlvm] When running caffinemark, DRLVM now crashes..)

2006-09-19 Thread Oleg Khaschansky

Do you have libxmu? Probably, fails either
void* lib = dlopen(libxmu.so, RTLD_LAZY);
or the corresponding
dlsym(lib, XmuLookupStandardColormap);
Could you, please, check if these dlopen/dlsym return non zero on your system?

On 9/19/06, Geir Magnusson Jr [EMAIL PROTECTED] wrote:

Ok, so I was really tired last night when I reported this.  I've done a
little more homeork, and I get the same crash with J9.  The stack trace
is :


Generated system dump: {default OS core name}

Thread: main (priority 5) (LOCATION OF ERROR)
 NATIVE
org/apache/harmony/awt/nativebridge/linux/X11.XmuLookupStandardColormap(JIJIJII)I
 0080
org/apache/harmony/awt/gl/linux/XGraphicsConfiguration.obtainRGBColorMap()J
 0015
org/apache/harmony/awt/gl/linux/XGraphicsConfiguration.init(Lorg/apache/harmony/awt/gl/linux/XGraphicsDevice
;Lorg/apache/harmony/awt/nativebridge/linux/X11$XVisualInfo;)V
 00aa org/apache/harmony/awt/gl/linux/XGraphicsDevice.createConfigs()V
 0008
org/apache/harmony/awt/gl/linux/XGraphicsDevice.getConfigs()[Lorg/apache/harmony/awt/gl/linux/XGraphicsConfigu
ration;
 0001
org/apache/harmony/awt/gl/linux/XGraphicsDevice.getDefaultConfiguration()Ljava/awt/GraphicsConfiguration;
 000f
java/awt/Window.getGraphicsConfiguration(Ljava/awt/GraphicsConfiguration;)Ljava/awt/GraphicsConfiguration;
 0081
java/awt/Window.init(Ljava/awt/Window;Ljava/awt/GraphicsConfiguration;)V
 0003
java/awt/Frame.init(Ljava/lang/String;Ljava/awt/GraphicsConfiguration;)V
 0003 java/awt/Frame.init(Ljava/lang/String;)V
 0003 CaffeineMarkFrame.init(Ljava/applet/Applet;Z)V
 0006 CaffeineMarkApp.main([Ljava/lang/String;)V


Anyone have any idea?

geir


Geir Magnusson Jr wrote:
 On Ubuntu 6, I was trying to run CaffineMark to see where we are w/ the
 lastest set of patches and the big java 5 and other fix patch.  release
 build, r447024

 top of the stack trace is
 Java_org_harmony_awt_nativebridge_linux_X11_XmuLookupStandardColormap

 Can anyone repeat this error?

 geir

 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] Trouble Building DRLVM

2006-09-19 Thread Egor Pasko
On the 0x1E9 day of Apache Harmony Geir Magnusson, Jr. wrote:
 Hm.  That should be irrelevant.  You should be able to do :
 
 $ svn co https://svn.apache.org/repos/asf/incubator/harmony/enhanced/
 trunk
 $ cd trunk
 $ ant switch_svn_vm
 $ ant switch_svn_classlib
 
 which should result in a a checkout of classlib SVN head into
 'working_classlib', a checkout of DRLVM SVN head into 'working_vm'.
 (You could have done just an 'ant' w/ no arguments, that would have
 done the above, plus a full build, but that's really targetted at
 building snapshots.
 
 Then you have each tree that you can build independently. (I'm doing
 all of this from memory, so if some of the ant targets are slightly
 wrong, I apologize in advance...) For classlib :
 
 $ cd working_classlib
 $ ant fetch-depends
 $ ant
 
 and then
 
 $ cd working_vm/build
 $ sh build.sh update
 $ sh build.sh

some progress:
if I comment out some freemems:

--- working_classlib/modules/luni/src/main/native/common/shared/strhelp.c   
(revision 447722)
+++ working_classlib/modules/luni/src/main/native/common/shared/strhelp.c   
(working copy)
@@ -93,12 +93,12 @@
 if (properties) {
 unsigned i = 0;
 while (properties[i].key) {
-hymem_free_memory(properties[i].key);
+//hymem_free_memory(properties[i].key);
 if (properties[i].value)
-hymem_free_memory(properties[i].value);
+//hymem_free_memory(properties[i].value);
 ++i;
 }
-hymem_free_memory(properties);
+//hymem_free_memory(properties);
 }
 }

...it runs, but hangs taking 99%CPU. Hey, I am a dummy! I unset
JAVA_HOME, and it runs well...

this is OK for running like ./java, but if I do not run from within
jre/bin dir, behaviour is like this:
$ ./jre/bin/java -cp ... Hello
java/lang/UnsatisfiedLinkError : Failed loading library libhyzlib.so: DSO 
load failed

do you observe the same with the launcher?

-- 
Egor Pasko, Intel Managed Runtime Division


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] Trouble Building DRLVM

2006-09-19 Thread Egor Pasko
On the 0x1E9 day of Apache Harmony Geir Magnusson, Jr. wrote:
 For grins, can you set JAVA_HOME to the deploy/jre directory and PATH to
  include jre/bin?

lots of grins here :)
I set them, it runs well (with my patches, but, anyway), this problem
persists:
java/lang/UnsatisfiedLinkError : Failed loading library libhyzlib.so: DSO 
load failed

whooa! I feel more comfortable now :)

-- 
Egor Pasko, Intel Managed Runtime Division


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] none of kernel tests passed for the recent sources

2006-09-19 Thread Dmitry Durnev

I observe vm crash with the similar stack trace on my SUSE Linux box,
when trying to launch Hello World app on debug version of DRLVM:

*** glibc detected *** free(): invalid pointer: 0xbfffbde8 ***
SIGSEGV in VM code.
Stack trace:
1: free (??:-1)
2: ?? (??:-1)
3: ?? (??:-1)
4: hymem_free_memory (??:-1)
5: find_call_JNI_OnLoad
(/export/workspace/drlvm/vm/vmcore/src/util/natives_support.cpp:117)
6: properties_free (??:-1)
7: find_call_JNI_OnLoad
(/export/workspace/drlvm/vm/vmcore/src/util/natives_support.cpp:117)
8: ?? (??:-1)
9: readClassPathFromPropertiesFile (??:-1)
10: ?? (??:-1)
11: ?? (??:-1)
12: ?? (??:-1)
13: ?? (??:-1)
14: ?? (??:-1)
15: _dl_runtime_resolve (??:-1)
16: ?? (??:-1)
17: JNI_OnLoad (??:-1)
18: ?? (??:-1)
end of stack trace


On 9/19/06, Vladimir Gorr [EMAIL PROTECTED] wrote:

On 9/19/06, Geir Magnusson Jr [EMAIL PROTECTED] wrote:



 Vladimir Gorr wrote:
  Geir,
 
  I found out none of the DRRVM kernel tests passed recently. Although
  all fine worked yet yesterday.
 
  *build.bat -Djunit.jar=%JUNIT_HOME% kernel.test*
  ...
  [echo]
  [echo] ==
  [echo] Run kernel tests using jitrino.jet
  [echo] ==
  [echo]
 [mkdir] Created dir:
 
 
C:\DrlSrc\drlvm\trunk\build\win_ia32_msvc_debug\semis\kernel.tests\reports\jitrino.jet
 
  [echo] RUNNING : java.lang.Class1_5Test
 [junit] Test java.lang.Class1_5Test FAILED
 [junit] Test java.lang.Class1_5Test FAILED
  [echo] FAILED on reference JRE 
  [echo] RUNNING : java.lang.Class5Test
 [junit] Test java.lang.Class5Test FAILED
 [junit] Test java.lang.Class5Test FAILED
  [echo] FAILED on reference JRE 
  [echo] RUNNING : java.lang.ClassAnnotationsTest
 [junit] Test java.lang.ClassAnnotationsTest FAILED
 
  ^C
  ...
 
  I suspect you can know a clue for this issue. Probably I missed anything
  and didn't note what was modifed.

 Why are they failing?  AS of yesterday, I thought they were all passing
 for me.  I wouldn't have checked anything in if I saw that they were
 failing en-masse.  (We do need to have a stop the world as we
 stabilize DRLVM, figure out why tests fail apparently randomly, etc...)


Agree. I also try to understand this.

I'm running kernel tests now on Ubuntu 6, release build, and they are
 running fine.

 What platform?


debug version on Windows platforms. I have no success on SUSE LINUX as well:

...
-run-kernel-test-batch:
   [mkdir] Created dir:
/nfs/ins/proj/drl/coreapi/vgorr/drlvm/trunk/build/lnx_ia32_gcc_debug/semis/kernel.tests/reports/batch.mode
   [junit] Running org.apache.harmony.lang.generics.ClassLoaderTest
   [junit] SIGSEGV in VM code.
   [junit] Stack trace:
   [junit] 1: properties_free (??:-1)
   [junit] 2: ?? (??:-1)
   [junit] 3: readClassPathFromPropertiesFile (??:-1)
   [junit] 4: ?? (??:-1)
   [junit] 5: ?? (??:-1)
   [junit] 6: ?? (??:-1)
   [junit] 7: ?? (??:-1)
   [junit] 8: ?? (??:-1)
   [junit] 9: ?? (??:-1)
   [junit] 10: JNI_OnLoad (??:-1)
   [junit] 11: ?? (??:-1)
   [junit] 12: ?? (??:-1)
   [junit] 13: ?? (??:-1)
   [junit] 14: ?? (??:-1)
   [junit] 15: ?? (??:-1)
   [junit] 16: ?? (??:-1)
   [junit] 17: ?? (??:-1)
   [junit] 18: ?? (??:-1)
   [junit] end of stack trace
   [junit] Tests FAILED


Thanks,
Vladimir.

geir



 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]







--

Dmitry A. Durnev,
Intel Middleware Products Division

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [General VM] GC strategy:how to garbage collect short-lived objects quickly.

2006-09-19 Thread Robin Garner




I don't understand. How can weak references help short-lived objects 
reclaim?


Really what I'm saying is that this is the closest thing we have to a
hint to GC that objects can be collected soon - but it is not anything
like a proper free() call. There is no immediate reclaim of memory,
just the possibility that it will be reclaimed soon - and the object
may be garbage collected before you are finished with it!

Regards,
Oliver



Actually, it's kind of the other way around isn't it ?  Nulling the last 
pointer to an object tells the GC that it can collect it (explicitly in 
the case of reference counting), whereas having a Weak Reference to an 
object says 'please tell me when on-one else wants this object', which 
results in the object staying around even longer.


cheers,
Robin

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] Trouble Building DRLVM

2006-09-19 Thread Geir Magnusson Jr.


On Sep 19, 2006, at 6:30 AM, Egor Pasko wrote:


On the 0x1E9 day of Apache Harmony Geir Magnusson, Jr. wrote:

Hm.  That should be irrelevant.  You should be able to do :

$ svn co https://svn.apache.org/repos/asf/incubator/harmony/enhanced/
trunk
$ cd trunk
$ ant switch_svn_vm
$ ant switch_svn_classlib

which should result in a a checkout of classlib SVN head into
'working_classlib', a checkout of DRLVM SVN head into 'working_vm'.
(You could have done just an 'ant' w/ no arguments, that would have
done the above, plus a full build, but that's really targetted at
building snapshots.

Then you have each tree that you can build independently. (I'm doing
all of this from memory, so if some of the ant targets are slightly
wrong, I apologize in advance...) For classlib :

$ cd working_classlib
$ ant fetch-depends
$ ant

and then

$ cd working_vm/build
$ sh build.sh update
$ sh build.sh


some progress:
if I comment out some freemems:

--- working_classlib/modules/luni/src/main/native/common/shared/ 
strhelp.c   (revision 447722)
+++ working_classlib/modules/luni/src/main/native/common/shared/ 
strhelp.c   (working copy)

@@ -93,12 +93,12 @@
 if (properties) {
 unsigned i = 0;
 while (properties[i].key) {
-hymem_free_memory(properties[i].key);
+//hymem_free_memory(properties[i].key);
 if (properties[i].value)
-hymem_free_memory(properties[i].value);
+//hymem_free_memory(properties[i].value);
 ++i;
 }
-hymem_free_memory(properties);
+//hymem_free_memory(properties);
 }
 }



Hm.  We'd need to figure out the root cause there...


...it runs, but hangs taking 99%CPU. Hey, I am a dummy! I unset
JAVA_HOME, and it runs well...


What was it set to?  When I have JAVA_HOME set to deploy/jre I don't  
see any problems.




this is OK for running like ./java, but if I do not run from within
jre/bin dir, behaviour is like this:
$ ./jre/bin/java -cp ... Hello
java/lang/UnsatisfiedLinkError : Failed loading library  
libhyzlib.so: DSO load failed


do you observe the same with the launcher?


Are you using the launcher?  If you aren't using the launcher, you  
are wasting time, because we are comparing apples and oranges.


geir


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] Trouble Building DRLVM

2006-09-19 Thread Geir Magnusson Jr.


On Sep 19, 2006, at 6:34 AM, Egor Pasko wrote:


On the 0x1E9 day of Apache Harmony Geir Magnusson, Jr. wrote:
For grins, can you set JAVA_HOME to the deploy/jre directory and  
PATH to

 include jre/bin?


lots of grins here :)
I set them, it runs well (with my patches, but, anyway), this problem


What are you patches?


persists:
java/lang/UnsatisfiedLinkError : Failed loading library  
libhyzlib.so: DSO load failed


whooa! I feel more comfortable now :)


Why?  why did the DSO load fail?

geir



--
Egor Pasko, Intel Managed Runtime Division


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] none of kernel tests passed for the recent sources

2006-09-19 Thread Geir Magnusson Jr.

That's good news (that you can reproduce it...)

Is JAVA_HOME set to /deploy/jre ?

geir

On Sep 19, 2006, at 6:42 AM, Dmitry Durnev wrote:


I observe vm crash with the similar stack trace on my SUSE Linux box,
when trying to launch Hello World app on debug version of DRLVM:

*** glibc detected *** free(): invalid pointer: 0xbfffbde8 ***
SIGSEGV in VM code.
Stack trace:
1: free (??:-1)
2: ?? (??:-1)
3: ?? (??:-1)
4: hymem_free_memory (??:-1)
5: find_call_JNI_OnLoad
(/export/workspace/drlvm/vm/vmcore/src/util/natives_support.cpp:117)
6: properties_free (??:-1)
7: find_call_JNI_OnLoad
(/export/workspace/drlvm/vm/vmcore/src/util/natives_support.cpp:117)
8: ?? (??:-1)
9: readClassPathFromPropertiesFile (??:-1)
10: ?? (??:-1)
11: ?? (??:-1)
12: ?? (??:-1)
13: ?? (??:-1)
14: ?? (??:-1)
15: _dl_runtime_resolve (??:-1)
16: ?? (??:-1)
17: JNI_OnLoad (??:-1)
18: ?? (??:-1)
end of stack trace


On 9/19/06, Vladimir Gorr [EMAIL PROTECTED] wrote:

On 9/19/06, Geir Magnusson Jr [EMAIL PROTECTED] wrote:



 Vladimir Gorr wrote:
  Geir,
 
  I found out none of the DRRVM kernel tests passed recently.  
Although

  all fine worked yet yesterday.
 
  *build.bat -Djunit.jar=%JUNIT_HOME% kernel.test*
  ...
  [echo]
  [echo] ==
  [echo] Run kernel tests using jitrino.jet
  [echo] ==
  [echo]
 [mkdir] Created dir:
 
 C:\DrlSrc\drlvm\trunk\build\win_ia32_msvc_debug\semis 
\kernel.tests\reports\jitrino.jet

 
  [echo] RUNNING : java.lang.Class1_5Test
 [junit] Test java.lang.Class1_5Test FAILED
 [junit] Test java.lang.Class1_5Test FAILED
  [echo] FAILED on reference JRE 
  [echo] RUNNING : java.lang.Class5Test
 [junit] Test java.lang.Class5Test FAILED
 [junit] Test java.lang.Class5Test FAILED
  [echo] FAILED on reference JRE 
  [echo] RUNNING : java.lang.ClassAnnotationsTest
 [junit] Test java.lang.ClassAnnotationsTest FAILED
 
  ^C
  ...
 
  I suspect you can know a clue for this issue. Probably I  
missed anything

  and didn't note what was modifed.

 Why are they failing?  AS of yesterday, I thought they were all  
passing
 for me.  I wouldn't have checked anything in if I saw that they  
were

 failing en-masse.  (We do need to have a stop the world as we
 stabilize DRLVM, figure out why tests fail apparently randomly,  
etc...)



Agree. I also try to understand this.

I'm running kernel tests now on Ubuntu 6, release build, and they are
 running fine.

 What platform?


debug version on Windows platforms. I have no success on SUSE  
LINUX as well:


...
-run-kernel-test-batch:
   [mkdir] Created dir:
/nfs/ins/proj/drl/coreapi/vgorr/drlvm/trunk/build/ 
lnx_ia32_gcc_debug/semis/kernel.tests/reports/batch.mode

   [junit] Running org.apache.harmony.lang.generics.ClassLoaderTest
   [junit] SIGSEGV in VM code.
   [junit] Stack trace:
   [junit] 1: properties_free (??:-1)
   [junit] 2: ?? (??:-1)
   [junit] 3: readClassPathFromPropertiesFile (??:-1)
   [junit] 4: ?? (??:-1)
   [junit] 5: ?? (??:-1)
   [junit] 6: ?? (??:-1)
   [junit] 7: ?? (??:-1)
   [junit] 8: ?? (??:-1)
   [junit] 9: ?? (??:-1)
   [junit] 10: JNI_OnLoad (??:-1)
   [junit] 11: ?? (??:-1)
   [junit] 12: ?? (??:-1)
   [junit] 13: ?? (??:-1)
   [junit] 14: ?? (??:-1)
   [junit] 15: ?? (??:-1)
   [junit] 16: ?? (??:-1)
   [junit] 17: ?? (??:-1)
   [junit] 18: ?? (??:-1)
   [junit] end of stack trace
   [junit] Tests FAILED


Thanks,
Vladimir.

geir



  
-

 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: harmony-dev- 
[EMAIL PROTECTED]
 For additional commands, e-mail: harmony-dev- 
[EMAIL PROTECTED]








--

Dmitry A. Durnev,
Intel Middleware Products Division

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] none of kernel tests passed for the recent sources

2006-09-19 Thread Egor Pasko
I got almost the same recently.

try 'unset JAVA_HOME'

On the 0x1E9 day of Apache Harmony Dmitry Durnev wrote:
 I observe vm crash with the similar stack trace on my SUSE Linux box,
  when trying to launch Hello World app on debug version of DRLVM:
 
 *** glibc detected *** free(): invalid pointer: 0xbfffbde8 ***
 SIGSEGV in VM code.
 Stack trace:
   1: free (??:-1)
   2: ?? (??:-1)
   3: ?? (??:-1)
   4: hymem_free_memory (??:-1)
   5: find_call_JNI_OnLoad
 (/export/workspace/drlvm/vm/vmcore/src/util/natives_support.cpp:117)
   6: properties_free (??:-1)
   7: find_call_JNI_OnLoad
 (/export/workspace/drlvm/vm/vmcore/src/util/natives_support.cpp:117)
   8: ?? (??:-1)
   9: readClassPathFromPropertiesFile (??:-1)
   10: ?? (??:-1)
   11: ?? (??:-1)
   12: ?? (??:-1)
   13: ?? (??:-1)
   14: ?? (??:-1)
   15: _dl_runtime_resolve (??:-1)
   16: ?? (??:-1)
   17: JNI_OnLoad (??:-1)
   18: ?? (??:-1)
 end of stack trace
 
 
 On 9/19/06, Vladimir Gorr [EMAIL PROTECTED] wrote:
  On 9/19/06, Geir Magnusson Jr [EMAIL PROTECTED] wrote:
  
  
  
   Vladimir Gorr wrote:
Geir,
   
I found out none of the DRRVM kernel tests passed recently. Although
all fine worked yet yesterday.
   
*build.bat -Djunit.jar=%JUNIT_HOME% kernel.test*
...
[echo]
[echo] ==
[echo] Run kernel tests using jitrino.jet
[echo] ==
[echo]
   [mkdir] Created dir:
   
   C:\DrlSrc\drlvm\trunk\build\win_ia32_msvc_debug\semis\kernel.tests\reports\jitrino.jet
   
[echo] RUNNING : java.lang.Class1_5Test
   [junit] Test java.lang.Class1_5Test FAILED
   [junit] Test java.lang.Class1_5Test FAILED
[echo] FAILED on reference JRE 
[echo] RUNNING : java.lang.Class5Test
   [junit] Test java.lang.Class5Test FAILED
   [junit] Test java.lang.Class5Test FAILED
[echo] FAILED on reference JRE 
[echo] RUNNING : java.lang.ClassAnnotationsTest
   [junit] Test java.lang.ClassAnnotationsTest FAILED
   
^C
...
   
I suspect you can know a clue for this issue. Probably I missed anything
and didn't note what was modifed.
  
   Why are they failing?  AS of yesterday, I thought they were all passing
   for me.  I wouldn't have checked anything in if I saw that they were
   failing en-masse.  (We do need to have a stop the world as we
   stabilize DRLVM, figure out why tests fail apparently randomly, etc...)
 
 
  Agree. I also try to understand this.
 
  I'm running kernel tests now on Ubuntu 6, release build, and they are
   running fine.
  
   What platform?
 
 
  debug version on Windows platforms. I have no success on SUSE LINUX as well:
 
  ...
  -run-kernel-test-batch:
 [mkdir] Created dir:
  /nfs/ins/proj/drl/coreapi/vgorr/drlvm/trunk/build/lnx_ia32_gcc_debug/semis/kernel.tests/reports/batch.mode
 [junit] Running org.apache.harmony.lang.generics.ClassLoaderTest
 [junit] SIGSEGV in VM code.
 [junit] Stack trace:
 [junit] 1: properties_free (??:-1)
 [junit] 2: ?? (??:-1)
 [junit] 3: readClassPathFromPropertiesFile (??:-1)
 [junit] 4: ?? (??:-1)
 [junit] 5: ?? (??:-1)
 [junit] 6: ?? (??:-1)
 [junit] 7: ?? (??:-1)
 [junit] 8: ?? (??:-1)
 [junit] 9: ?? (??:-1)
 [junit] 10: JNI_OnLoad (??:-1)
 [junit] 11: ?? (??:-1)
 [junit] 12: ?? (??:-1)
 [junit] 13: ?? (??:-1)
 [junit] 14: ?? (??:-1)
 [junit] 15: ?? (??:-1)
 [junit] 16: ?? (??:-1)
 [junit] 17: ?? (??:-1)
 [junit] 18: ?? (??:-1)
 [junit] end of stack trace
 [junit] Tests FAILED
 
 
  Thanks,
  Vladimir.
 
  geir
  
  
  
   -
   Terms of use : http://incubator.apache.org/harmony/mailing.html
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 
 
 -- 
 
 Dmitry A. Durnev,
 Intel Middleware Products Division
 
 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-- 
Egor Pasko, Intel Managed Runtime Division


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] none of kernel tests passed for the recent sources

2006-09-19 Thread Geir Magnusson Jr.
guys - lets be clear.  Are you unsetting it because it was pointing  
to Sun or BEA or IBM, or was it set to harmony?


have you tried setting it to harmony?

geir

On Sep 19, 2006, at 7:01 AM, Egor Pasko wrote:


I got almost the same recently.

try 'unset JAVA_HOME'

On the 0x1E9 day of Apache Harmony Dmitry Durnev wrote:

I observe vm crash with the similar stack trace on my SUSE Linux box,
 when trying to launch Hello World app on debug version of DRLVM:

*** glibc detected *** free(): invalid pointer: 0xbfffbde8 ***
SIGSEGV in VM code.
Stack trace:
1: free (??:-1)
2: ?? (??:-1)
3: ?? (??:-1)
4: hymem_free_memory (??:-1)
5: find_call_JNI_OnLoad
(/export/workspace/drlvm/vm/vmcore/src/util/natives_support.cpp:117)
6: properties_free (??:-1)
7: find_call_JNI_OnLoad
(/export/workspace/drlvm/vm/vmcore/src/util/natives_support.cpp:117)
8: ?? (??:-1)
9: readClassPathFromPropertiesFile (??:-1)
10: ?? (??:-1)
11: ?? (??:-1)
12: ?? (??:-1)
13: ?? (??:-1)
14: ?? (??:-1)
15: _dl_runtime_resolve (??:-1)
16: ?? (??:-1)
17: JNI_OnLoad (??:-1)
18: ?? (??:-1)
end of stack trace


On 9/19/06, Vladimir Gorr [EMAIL PROTECTED] wrote:

On 9/19/06, Geir Magnusson Jr [EMAIL PROTECTED] wrote:




Vladimir Gorr wrote:

Geir,

I found out none of the DRRVM kernel tests passed recently.  
Although

all fine worked yet yesterday.

*build.bat -Djunit.jar=%JUNIT_HOME% kernel.test*
...
[echo]
[echo] ==
[echo] Run kernel tests using jitrino.jet
[echo] ==
[echo]
   [mkdir] Created dir:

C:\DrlSrc\drlvm\trunk\build\win_ia32_msvc_debug\semis 
\kernel.tests\reports\jitrino.jet


[echo] RUNNING : java.lang.Class1_5Test
   [junit] Test java.lang.Class1_5Test FAILED
   [junit] Test java.lang.Class1_5Test FAILED
[echo] FAILED on reference JRE 
[echo] RUNNING : java.lang.Class5Test
   [junit] Test java.lang.Class5Test FAILED
   [junit] Test java.lang.Class5Test FAILED
[echo] FAILED on reference JRE 
[echo] RUNNING : java.lang.ClassAnnotationsTest
   [junit] Test java.lang.ClassAnnotationsTest FAILED

^C
...

I suspect you can know a clue for this issue. Probably I missed  
anything

and didn't note what was modifed.


Why are they failing?  AS of yesterday, I thought they were all  
passing
for me.  I wouldn't have checked anything in if I saw that they  
were

failing en-masse.  (We do need to have a stop the world as we
stabilize DRLVM, figure out why tests fail apparently randomly,  
etc...)



Agree. I also try to understand this.

I'm running kernel tests now on Ubuntu 6, release build, and they  
are

running fine.

What platform?



debug version on Windows platforms. I have no success on SUSE  
LINUX as well:


...
-run-kernel-test-batch:
   [mkdir] Created dir:
/nfs/ins/proj/drl/coreapi/vgorr/drlvm/trunk/build/ 
lnx_ia32_gcc_debug/semis/kernel.tests/reports/batch.mode

   [junit] Running org.apache.harmony.lang.generics.ClassLoaderTest
   [junit] SIGSEGV in VM code.
   [junit] Stack trace:
   [junit] 1: properties_free (??:-1)
   [junit] 2: ?? (??:-1)
   [junit] 3: readClassPathFromPropertiesFile (??:-1)
   [junit] 4: ?? (??:-1)
   [junit] 5: ?? (??:-1)
   [junit] 6: ?? (??:-1)
   [junit] 7: ?? (??:-1)
   [junit] 8: ?? (??:-1)
   [junit] 9: ?? (??:-1)
   [junit] 10: JNI_OnLoad (??:-1)
   [junit] 11: ?? (??:-1)
   [junit] 12: ?? (??:-1)
   [junit] 13: ?? (??:-1)
   [junit] 14: ?? (??:-1)
   [junit] 15: ?? (??:-1)
   [junit] 16: ?? (??:-1)
   [junit] 17: ?? (??:-1)
   [junit] 18: ?? (??:-1)
   [junit] end of stack trace
   [junit] Tests FAILED


Thanks,
Vladimir.

geir




--- 
--

Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev- 
[EMAIL PROTECTED]
For additional commands, e-mail: harmony-dev- 
[EMAIL PROTECTED]









--

Dmitry A. Durnev,
Intel Middleware Products Division

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: harmony-dev- 
[EMAIL PROTECTED]





--
Egor Pasko, Intel Managed Runtime Division


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [classlib][build] failure?

2006-09-19 Thread Mark Hindess

Incidentally, I had to override the default windows flags to turn off
the warnings-as-error for the awt native code in order to integrate it.
I mentioned this on the -dev list at the time hoping to see some patches
to fix the issues but there haven't been any as yet.

I agree it would be a good thing to fix for all the native code on both
platforms.

Regards,
 Mark.

On 19 September 2006 at 4:46, Geir Magnusson Jr. [EMAIL PROTECTED] wrote:
 There is no way to get rid of the warnings in our codebase on linux?
 
 geir
 
 On Sep 19, 2006, at 4:03 AM, Leo Li wrote:
 
  Hi, Geir:
   The warning level is set to level 3 while the warning as error  
  option is
  off in linux.
   Actually, I would like to set it on in linux since it will help me  
  to pick
  some error out, for example, wrongly use pointers. However, I have  
  tried to
  set it on, but some unavoidable warning will lead to a failure in  
  Harmony
  building. Any good idea?:)
 
  Good luck!
 
  On 9/19/06, Geir Magnusson Jr. [EMAIL PROTECTED] wrote:
 
  Lets get these aligned...  I tend to work on linux, so it had no
  problem building..
 
  geir
 
  On Sep 18, 2006, at 10:14 PM, Leo Li wrote:
 
   Just comment it out since it is just a warning treated as error.
   It compiles successfully and runs well.
   Maybe it will not lead to such an error on Linux due to the
   configuration of
   make rules.:)
  
   Good luck!
  
  
   On 9/19/06, Spark Shen [EMAIL PROTECTED] wrote:
  
   Hi All:
   When building today's(Sep 19, r447671) classlib on window xp, I
   got the
   following error message:
   [exec] main.c
   [exec] ..\shared\main.c(628) : error C2220: warning treated as
   error - no o
   bject file generated
   [exec] ..\shared\main.c(628) : warning C4101: 'jarRunner' :
   unreferenced lo
   cal variable
   [exec] NMAKE : fatal error U1077: 'cl' : return code '0x2'
   [exec] Stop.
   [exec] NMAKE : fatal error U1077: 'c:\Program Files\Microsoft
   Visual Studi
   o .NET 2003\VC7\BIN\nmake.exe' : return code '0x2'
   [exec] Stop.
  
   BUILD FAILED
   C:\spark\harmony\build.xml:95: The following error occurred while
   executing this
   line:
   C:\spark\harmony\make\build-native.xml:75: The following error
   occurred
   while ex
   ecuting this line:
   C:\spark\harmony\modules\luni\build.xml:167: The following error
   occurred while
   executing this line:
   C:\spark\harmony\make\properties.xml:258: exec returned: 2
  
   Could any one check it?
  
   Best regards
  
   --
   Spark Shen
   China Software Development Lab, IBM
  
  

  -
   Terms of use : http://incubator.apache.org/harmony/mailing.html
   To unsubscribe, e-mail: harmony-dev- 
  [EMAIL PROTECTED]
   For additional commands, e-mail: harmony-dev-
   [EMAIL PROTECTED]
  
  
  
  
   --
   Leo Li
   China Software Development Lab, IBM
 
 
  -
  Terms of use : http://incubator.apache.org/harmony/mailing.html
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: harmony-dev- 
  [EMAIL PROTECTED]
 
 
 
 
  -- 
  Leo Li
  China Software Development Lab, IBM
 
 
 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] none of kernel tests passed for the recent sources

2006-09-19 Thread Geir Magnusson Jr.
Ok - my debug build on winXP just passed the c-unit tests and now is  
winding through the smoke tests.  Currently hanging on LOS


I can do
   java -showversion -cp . Foo

(where Foo.class is  in . of course)

and it works fine

geir

On Sep 19, 2006, at 5:43 AM, Vladimir Gorr wrote:


On 9/19/06, Geir Magnusson Jr [EMAIL PROTECTED] wrote:




Vladimir Gorr wrote:
 Geir,

 I found out none of the DRRVM kernel tests passed recently.  
Although

 all fine worked yet yesterday.

 *build.bat -Djunit.jar=%JUNIT_HOME% kernel.test*
 ...
 [echo]
 [echo] ==
 [echo] Run kernel tests using jitrino.jet
 [echo] ==
 [echo]
[mkdir] Created dir:

C:\DrlSrc\drlvm\trunk\build\win_ia32_msvc_debug\semis\kernel.tests 
\reports\jitrino.jet


 [echo] RUNNING : java.lang.Class1_5Test
[junit] Test java.lang.Class1_5Test FAILED
[junit] Test java.lang.Class1_5Test FAILED
 [echo] FAILED on reference JRE 
 [echo] RUNNING : java.lang.Class5Test
[junit] Test java.lang.Class5Test FAILED
[junit] Test java.lang.Class5Test FAILED
 [echo] FAILED on reference JRE 
 [echo] RUNNING : java.lang.ClassAnnotationsTest
[junit] Test java.lang.ClassAnnotationsTest FAILED

 ^C
 ...

 I suspect you can know a clue for this issue. Probably I missed  
anything

 and didn't note what was modifed.

Why are they failing?  AS of yesterday, I thought they were all  
passing

for me.  I wouldn't have checked anything in if I saw that they were
failing en-masse.  (We do need to have a stop the world as we
stabilize DRLVM, figure out why tests fail apparently randomly,  
etc...)



Agree. I also try to understand this.

I'm running kernel tests now on Ubuntu 6, release build, and they are

running fine.

What platform?



debug version on Windows platforms. I have no success on SUSE LINUX  
as well:


...
-run-kernel-test-batch:
   [mkdir] Created dir:
/nfs/ins/proj/drl/coreapi/vgorr/drlvm/trunk/build/ 
lnx_ia32_gcc_debug/semis/kernel.tests/reports/batch.mode

   [junit] Running org.apache.harmony.lang.generics.ClassLoaderTest
   [junit] SIGSEGV in VM code.
   [junit] Stack trace:
   [junit] 1: properties_free (??:-1)
   [junit] 2: ?? (??:-1)
   [junit] 3: readClassPathFromPropertiesFile (??:-1)
   [junit] 4: ?? (??:-1)
   [junit] 5: ?? (??:-1)
   [junit] 6: ?? (??:-1)
   [junit] 7: ?? (??:-1)
   [junit] 8: ?? (??:-1)
   [junit] 9: ?? (??:-1)
   [junit] 10: JNI_OnLoad (??:-1)
   [junit] 11: ?? (??:-1)
   [junit] 12: ?? (??:-1)
   [junit] 13: ?? (??:-1)
   [junit] 14: ?? (??:-1)
   [junit] 15: ?? (??:-1)
   [junit] 16: ?? (??:-1)
   [junit] 17: ?? (??:-1)
   [junit] 18: ?? (??:-1)
   [junit] end of stack trace
   [junit] Tests FAILED


Thanks,
Vladimir.

geir




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: harmony-dev- 
[EMAIL PROTECTED]






-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [classlib][build] failure?

2006-09-19 Thread Geir Magnusson Jr.

Ok, good - there's a totally reasonable explanation :)

geir

On Sep 19, 2006, at 7:05 AM, Mark Hindess wrote:



Incidentally, I had to override the default windows flags to turn off
the warnings-as-error for the awt native code in order to integrate  
it.
I mentioned this on the -dev list at the time hoping to see some  
patches

to fix the issues but there haven't been any as yet.

I agree it would be a good thing to fix for all the native code on  
both

platforms.

Regards,
 Mark.

On 19 September 2006 at 4:46, Geir Magnusson Jr. [EMAIL PROTECTED]  
wrote:

There is no way to get rid of the warnings in our codebase on linux?

geir

On Sep 19, 2006, at 4:03 AM, Leo Li wrote:


Hi, Geir:
 The warning level is set to level 3 while the warning as error
option is
off in linux.
 Actually, I would like to set it on in linux since it will help me
to pick
some error out, for example, wrongly use pointers. However, I have
tried to
set it on, but some unavoidable warning will lead to a failure in
Harmony
building. Any good idea?:)

Good luck!

On 9/19/06, Geir Magnusson Jr. [EMAIL PROTECTED] wrote:


Lets get these aligned...  I tend to work on linux, so it had no
problem building..

geir

On Sep 18, 2006, at 10:14 PM, Leo Li wrote:


Just comment it out since it is just a warning treated as error.
It compiles successfully and runs well.
Maybe it will not lead to such an error on Linux due to the
configuration of
make rules.:)

Good luck!


On 9/19/06, Spark Shen [EMAIL PROTECTED] wrote:


Hi All:
When building today's(Sep 19, r447671) classlib on window xp, I
got the
following error message:
[exec] main.c
[exec] ..\shared\main.c(628) : error C2220: warning  
treated as

error - no o
bject file generated
[exec] ..\shared\main.c(628) : warning C4101: 'jarRunner' :
unreferenced lo
cal variable
[exec] NMAKE : fatal error U1077: 'cl' : return code '0x2'
[exec] Stop.
[exec] NMAKE : fatal error U1077: 'c:\Program Files 
\Microsoft

Visual Studi
o .NET 2003\VC7\BIN\nmake.exe' : return code '0x2'
[exec] Stop.

BUILD FAILED
C:\spark\harmony\build.xml:95: The following error occurred while
executing this
line:
C:\spark\harmony\make\build-native.xml:75: The following error
occurred
while ex
ecuting this line:
C:\spark\harmony\modules\luni\build.xml:167: The following error
occurred while
executing this line:
C:\spark\harmony\make\properties.xml:258: exec returned: 2

Could any one check it?

Best regards

--
Spark Shen
China Software Development Lab, IBM



--- 
--

Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-

[EMAIL PROTECTED]

For additional commands, e-mail: harmony-dev-
[EMAIL PROTECTED]





--
Leo Li
China Software Development Lab, IBM



--- 
--

Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev- 
[EMAIL PROTECTED]

For additional commands, e-mail: harmony-dev-
[EMAIL PROTECTED]





--
Leo Li
China Software Development Lab, IBM



-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: harmony-dev- 
[EMAIL PROTECTED]






-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] none of kernel tests passed for the recent sources

2006-09-19 Thread Dmitry Durnev

No, it wasn't.
Setting it to  /deploy/jre or simply unsetting solves the problem :)
Thanks! But before DRLVM was working even with JAVA_HOME pointing
somewhere else...

On 9/19/06, Geir Magnusson Jr. [EMAIL PROTECTED] wrote:

That's good news (that you can reproduce it...)

Is JAVA_HOME set to /deploy/jre ?

geir




--

Dmitry A. Durnev,
Intel Middleware Products Division

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] none of kernel tests passed for the recent sources

2006-09-19 Thread Vladimir Gorr

On 9/19/06, Geir Magnusson Jr. [EMAIL PROTECTED] wrote:


guys - lets be clear.  Are you unsetting it because it was pointing
to Sun or BEA or IBM, or was it set to harmony?




as for me JAVA_HOME refers to JRockit.

have you tried setting it to harmony?


yes, I did but w/o success:
...
Unable to find a javac compiler; com.sun.tools.javac.Main is not on the
classpath.
Perhaps JAVA_HOME does not point to the JDK
...

Thanks,
Vladimir.

geir


On Sep 19, 2006, at 7:01 AM, Egor Pasko wrote:

 I got almost the same recently.

 try 'unset JAVA_HOME'

 On the 0x1E9 day of Apache Harmony Dmitry Durnev wrote:
 I observe vm crash with the similar stack trace on my SUSE Linux box,
  when trying to launch Hello World app on debug version of DRLVM:

 *** glibc detected *** free(): invalid pointer: 0xbfffbde8 ***
 SIGSEGV in VM code.
 Stack trace:
  1: free (??:-1)
  2: ?? (??:-1)
  3: ?? (??:-1)
  4: hymem_free_memory (??:-1)
  5: find_call_JNI_OnLoad
 (/export/workspace/drlvm/vm/vmcore/src/util/natives_support.cpp:117)
  6: properties_free (??:-1)
  7: find_call_JNI_OnLoad
 (/export/workspace/drlvm/vm/vmcore/src/util/natives_support.cpp:117)
  8: ?? (??:-1)
  9: readClassPathFromPropertiesFile (??:-1)
  10: ?? (??:-1)
  11: ?? (??:-1)
  12: ?? (??:-1)
  13: ?? (??:-1)
  14: ?? (??:-1)
  15: _dl_runtime_resolve (??:-1)
  16: ?? (??:-1)
  17: JNI_OnLoad (??:-1)
  18: ?? (??:-1)
 end of stack trace


 On 9/19/06, Vladimir Gorr [EMAIL PROTECTED] wrote:
 On 9/19/06, Geir Magnusson Jr [EMAIL PROTECTED] wrote:



 Vladimir Gorr wrote:
 Geir,

 I found out none of the DRRVM kernel tests passed recently.
 Although
 all fine worked yet yesterday.

 *build.bat -Djunit.jar=%JUNIT_HOME% kernel.test*
 ...
 [echo]
 [echo] ==
 [echo] Run kernel tests using jitrino.jet
 [echo] ==
 [echo]
[mkdir] Created dir:

 C:\DrlSrc\drlvm\trunk\build\win_ia32_msvc_debug\semis
 \kernel.tests\reports\jitrino.jet

 [echo] RUNNING : java.lang.Class1_5Test
[junit] Test java.lang.Class1_5Test FAILED
[junit] Test java.lang.Class1_5Test FAILED
 [echo] FAILED on reference JRE 
 [echo] RUNNING : java.lang.Class5Test
[junit] Test java.lang.Class5Test FAILED
[junit] Test java.lang.Class5Test FAILED
 [echo] FAILED on reference JRE 
 [echo] RUNNING : java.lang.ClassAnnotationsTest
[junit] Test java.lang.ClassAnnotationsTest FAILED

 ^C
 ...

 I suspect you can know a clue for this issue. Probably I missed
 anything
 and didn't note what was modifed.

 Why are they failing?  AS of yesterday, I thought they were all
 passing
 for me.  I wouldn't have checked anything in if I saw that they
 were
 failing en-masse.  (We do need to have a stop the world as we
 stabilize DRLVM, figure out why tests fail apparently randomly,
 etc...)


 Agree. I also try to understand this.

 I'm running kernel tests now on Ubuntu 6, release build, and they
 are
 running fine.

 What platform?


 debug version on Windows platforms. I have no success on SUSE
 LINUX as well:

 ...
 -run-kernel-test-batch:
[mkdir] Created dir:
 /nfs/ins/proj/drl/coreapi/vgorr/drlvm/trunk/build/
 lnx_ia32_gcc_debug/semis/kernel.tests/reports/batch.mode
[junit] Running org.apache.harmony.lang.generics.ClassLoaderTest
[junit] SIGSEGV in VM code.
[junit] Stack trace:
[junit] 1: properties_free (??:-1)
[junit] 2: ?? (??:-1)
[junit] 3: readClassPathFromPropertiesFile (??:-1)
[junit] 4: ?? (??:-1)
[junit] 5: ?? (??:-1)
[junit] 6: ?? (??:-1)
[junit] 7: ?? (??:-1)
[junit] 8: ?? (??:-1)
[junit] 9: ?? (??:-1)
[junit] 10: JNI_OnLoad (??:-1)
[junit] 11: ?? (??:-1)
[junit] 12: ?? (??:-1)
[junit] 13: ?? (??:-1)
[junit] 14: ?? (??:-1)
[junit] 15: ?? (??:-1)
[junit] 16: ?? (??:-1)
[junit] 17: ?? (??:-1)
[junit] 18: ?? (??:-1)
[junit] end of stack trace
[junit] Tests FAILED


 Thanks,
 Vladimir.

 geir



 ---
 --
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: harmony-dev-
 [EMAIL PROTECTED]
 For additional commands, e-mail: harmony-dev-
 [EMAIL PROTECTED]






 --

 Dmitry A. Durnev,
 Intel Middleware Products Division

 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: harmony-dev-
 [EMAIL PROTECTED]



 --
 Egor Pasko, Intel Managed Runtime Division


 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 

Re: [drlvm] Trouble Building DRLVM

2006-09-19 Thread Egor Pasko
On the 0x1E9 day of Apache Harmony Geir Magnusson, Jr. wrote:
 On Sep 19, 2006, at 6:34 AM, Egor Pasko wrote:
 
  On the 0x1E9 day of Apache Harmony Geir Magnusson, Jr. wrote:
  For grins, can you set JAVA_HOME to the deploy/jre directory and
  PATH to
   include jre/bin?
 
  lots of grins here :)
  I set them, it runs well (with my patches, but, anyway), this problem
 
 What are you patches?

nothing special: 
* launcher debug mode (O0, -g)
* libhysig.so included in
  modules/luni/src/main/native/launcher/linux/makefile
* hymem_free_memory commented out in
  modules/luni/src/main/native/common/shared/strhelp.c
  (this one is rather experimantal, the root cause was incorrect
   handling of JAVA_HOME)

BTW, I was pointing JAVA_HOME to RI by mistake. Resulting in SIGSEGV
in this case is not the best idea. Can we overcome it in some way?

  persists:
  java/lang/UnsatisfiedLinkError : Failed loading library
  libhyzlib.so: DSO load failed
 
  whooa! I feel more comfortable now :)
 
 Why?  why did the DSO load fail?

I am afraid, it looks for DSO in ., which is a wrong assumption :)
I'll take a look, but do not promise to be fast))

-- 
Egor Pasko, Intel Managed Runtime Division


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] none of kernel tests passed for the recent sources

2006-09-19 Thread Vladimir Gorr

On 9/19/06, Vladimir Gorr [EMAIL PROTECTED] wrote:




 On 9/19/06, Geir Magnusson Jr. [EMAIL PROTECTED] wrote:

 guys - lets be clear.  Are you unsetting it because it was pointing
 to Sun or BEA or IBM, or was it set to harmony?



 as for me JAVA_HOME refers to JRockit.

have you tried setting it to harmony?


 yes, I did but w/o success:
...
Unable to find a javac compiler; com.sun.tools.javac.Main is not on the
classpath.
Perhaps JAVA_HOME does not point to the JDK
...



I wanted to say I tried to run our tests (build.sh test) with this setting.
If we need to set JAVA_HOME to the .../deploy/jre how we're going to get
around this.

Thanks,
Vladimir.


 Thanks,

 Vladimir.

geir

 On Sep 19, 2006, at 7:01 AM, Egor Pasko wrote:

  I got almost the same recently.
 
  try 'unset JAVA_HOME'
 
  On the 0x1E9 day of Apache Harmony Dmitry Durnev wrote:
  I observe vm crash with the similar stack trace on my SUSE Linux box,
   when trying to launch Hello World app on debug version of DRLVM:
 
  *** glibc detected *** free(): invalid pointer: 0xbfffbde8 ***
  SIGSEGV in VM code.
  Stack trace:
   1: free (??:-1)
   2: ?? (??:-1)
   3: ?? (??:-1)
   4: hymem_free_memory (??:-1)
   5: find_call_JNI_OnLoad
  (/export/workspace/drlvm/vm/vmcore/src/util/natives_support.cpp:117)
   6: properties_free (??:-1)
   7: find_call_JNI_OnLoad
  (/export/workspace/drlvm/vm/vmcore/src/util/natives_support.cpp:117)
   8: ?? (??:-1)
   9: readClassPathFromPropertiesFile (??:-1)
   10: ?? (??:-1)
   11: ?? (??:-1)
   12: ?? (??:-1)
   13: ?? (??:-1)
   14: ?? (??:-1)
   15: _dl_runtime_resolve (??:-1)
   16: ?? (??:-1)
   17: JNI_OnLoad (??:-1)
   18: ?? (??:-1)
  end of stack trace
 
 
  On 9/19/06, Vladimir Gorr [EMAIL PROTECTED] wrote:
  On 9/19/06, Geir Magnusson Jr  [EMAIL PROTECTED] wrote:
 
 
 
  Vladimir Gorr wrote:
  Geir,
 
  I found out none of the DRRVM kernel tests passed recently.
  Although
  all fine worked yet yesterday.
 
  *build.bat -Djunit.jar=%JUNIT_HOME% kernel.test*
  ...
  [echo]
  [echo] ==
  [echo] Run kernel tests using jitrino.jet
  [echo] ==
  [echo]
 [mkdir] Created dir:
 
  C:\DrlSrc\drlvm\trunk\build\win_ia32_msvc_debug\semis
  \kernel.tests\reports\jitrino.jet
 
  [echo] RUNNING : java.lang.Class1_5Test
 [junit] Test java.lang.Class1_5Test FAILED
 [junit] Test java.lang.Class1_5Test FAILED
  [echo] FAILED on reference JRE 
  [echo] RUNNING : java.lang.Class5Test
 [junit] Test java.lang.Class5Test FAILED
 [junit] Test java.lang.Class5Test FAILED
  [echo] FAILED on reference JRE 
  [echo] RUNNING : java.lang.ClassAnnotationsTest
 [junit] Test java.lang.ClassAnnotationsTest FAILED
 
  ^C
  ...
 
  I suspect you can know a clue for this issue. Probably I missed
  anything
  and didn't note what was modifed.
 
  Why are they failing?  AS of yesterday, I thought they were all
  passing
  for me.  I wouldn't have checked anything in if I saw that they
  were
  failing en-masse.  (We do need to have a stop the world as we
  stabilize DRLVM, figure out why tests fail apparently randomly,
  etc...)
 
 
  Agree. I also try to understand this.
 
  I'm running kernel tests now on Ubuntu 6, release build, and they
  are
  running fine.
 
  What platform?
 
 
  debug version on Windows platforms. I have no success on SUSE
  LINUX as well:
 
  ...
  -run-kernel-test-batch:
 [mkdir] Created dir:
  /nfs/ins/proj/drl/coreapi/vgorr/drlvm/trunk/build/
  lnx_ia32_gcc_debug/semis/kernel.tests/reports/batch.mode
 [junit] Running org.apache.harmony.lang.generics.ClassLoaderTest
 [junit] SIGSEGV in VM code.
 [junit] Stack trace:
 [junit] 1: properties_free (??:-1)
 [junit] 2: ?? (??:-1)
 [junit] 3: readClassPathFromPropertiesFile (??:-1)
 [junit] 4: ?? (??:-1)
 [junit] 5: ?? (??:-1)
 [junit] 6: ?? (??:-1)
 [junit] 7: ?? (??:-1)
 [junit] 8: ?? (??:-1)
 [junit] 9: ?? (??:-1)
 [junit] 10: JNI_OnLoad (??:-1)
 [junit] 11: ?? (??:-1)
 [junit] 12: ?? (??:-1)
 [junit] 13: ?? (??:-1)
 [junit] 14: ?? (??:-1)
 [junit] 15: ?? (??:-1)
 [junit] 16: ?? (??:-1)
 [junit] 17: ?? (??:-1)
 [junit] 18: ?? (??:-1)
 [junit] end of stack trace
 [junit] Tests FAILED
 
 
  Thanks,
  Vladimir.
 
  geir
 
 
 
  ---

  --
  Terms of use : http://incubator.apache.org/harmony/mailing.html
  To unsubscribe, e-mail: harmony-dev-
  [EMAIL PROTECTED]
  For additional commands, e-mail: harmony-dev-
  [EMAIL PROTECTED]
 
 
 
 
 
 
  --
 
  Dmitry A. Durnev,
  Intel Middleware Products Division
 
  -
  Terms 

Re: [classlib][vmi] VMI classes for Thread/Object manipulation for java.util.concurrent

2006-09-19 Thread Andrey Chernyshev

On 9/18/06, Nathan Beyer [EMAIL PROTECTED] wrote:

I've added some classes[1][2] to luni-kernel in the
org.apache.harmony.kernel.vm package that are intended the VMI replacement
for the sun.misc.Unsafe class. The intent is to provide a VMI class to
support java.util.concurrent. Initially this will be done by implementing
the sun.misc.Unsafe in 'suncompat' module in terms of these new classes.



For the most part, the methods are essentially the subset of Unsafe that's
needed for java.util.concurrent. I've separated the methods into two
classes; Threads [1] for the threading features and Objects [2] for the
object manipulation features. My initial thought is that Threads may be
extended to provide additional support needed for lang-management features.



Please take a look at the classes and provide some feedback.



[1]
http://svn.apache.org/repos/asf/incubator/harmony/enhanced/classlib/trunk/mo
dules/luni-kernel/src/main/java/org/apache/harmony/kernel/vm/Threads.java


Thanks Nathan! The Threads interface looks fine. Still, may be it
would be nice if two different methods are allocated for parkNanos and
parkUntil - passing the extra boolean parameter seems like an
overhead, though very little.

Another solution could be just to keep our own implementation of the
LockSupport in the luni-kernel (there is nothing to share for the
LockSupport with the original j.u.c, it contains almost no code). Is
there a reason why we can not do that?



[2]
http://svn.apache.org/repos/asf/incubator/harmony/enhanced/classlib/trunk/mo
dules/luni-kernel/src/main/java/org/apache/harmony/kernel/vm/Objects.java



I guess the interesting question would be how do we rearrange the
already existing classes in Harmony, e.g. ObjectAccessor [3] and
ArrayAccessor [4] from the o.a.h.misc.accessors package of the
classlib, plus the o.a.util.concurrent.Atomics [5] from the DRLVM. The
proposed Objects seems like a combination of the above three. For
example, the following API set from the Objects:

public static long objectFieldOffset(Field field)
public static void putLong(Object object, long fieldOffset, long newValue) {
public static long getLong(Object object, long fieldOffset)

is just equivalent to the one from the ObjectAccessor:

public final native long getFieldID(Field f);
public final native void setLong(Object o, long fieldID, long value);
public final native long getLong(Object o, long fieldID);

I guess j.u.concurrent won't use the direct read/write to objects,
except for volatile or atomic access?
Having two different interfaces for doing the same can be confusing -
it may not be clear, what is the relationship between fieldID from
the accessors package and fieldOffset from the Objects.

If we have a task to identify the minimum set of functionality which
is needed for j.u.concurrent, then it looks like the only object API
set we really may need to pick up is the one which is currently
contained in the o.a.util.concurrent.Atomics.

If the purpose is to propose some more generic interface for direct
object access, then why just don't move the existing XXXAccessor and
Atomics to the luni-kernel and go with their combination?

Thanks,
Andrey.


[3] 
http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/misc/src/main/java/org/apache/harmony/misc/accessors/ObjectAccessor.java?view=markup

[4] 
http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/misc/src/main/java/org/apache/harmony/misc/accessors/ArrayAccessor.java?view=markup

[5] 
http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/util/concurrent/Atomics.java?view=markup









--
Andrey Chernyshev
Intel Middleware Products Division

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] Trouble Building DRLVM

2006-09-19 Thread Egor Pasko
On the 0x1E9 day of Apache Harmony Ivan Volosyuk wrote:
 On 19 Sep 2006 18:13:28 +0700, Egor Pasko [EMAIL PROTECTED] wrote:
  On the 0x1E9 day of Apache Harmony Geir Magnusson, Jr. wrote:
   On Sep 19, 2006, at 6:34 AM, Egor Pasko wrote:
  
On the 0x1E9 day of Apache Harmony Geir Magnusson, Jr. wrote:
For grins, can you set JAVA_HOME to the deploy/jre directory and
PATH to
 include jre/bin?
   
lots of grins here :)
I set them, it runs well (with my patches, but, anyway), this problem
  
   What are you patches?
 
  nothing special:
  * launcher debug mode (O0, -g)
  * libhysig.so included in
modules/luni/src/main/native/launcher/linux/makefile
  * hymem_free_memory commented out in
modules/luni/src/main/native/common/shared/strhelp.c
(this one is rather experimantal, the root cause was incorrect
 handling of JAVA_HOME)
 
  BTW, I was pointing JAVA_HOME to RI by mistake. Resulting in SIGSEGV
  in this case is not the best idea. Can we overcome it in some way?
 
persists:
java/lang/UnsatisfiedLinkError : Failed loading library
libhyzlib.so: DSO load failed
   
whooa! I feel more comfortable now :)
  
   Why?  why did the DSO load fail?
 
  I am afraid, it looks for DSO in ., which is a wrong assumption :)
  I'll take a look, but do not promise to be fast))
 
  --
  Egor Pasko, Intel Managed Runtime Division
 
 On my computer, with fresh and clean classlib and drlvm.
 Settings:
 JAVA_HOME=./jre
 PATH=./jre/bin
 LD_LIBRARY_PATH=./jre/bin
 ./java
 
 Harmony Java launcher
 Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software
 Foundation or its licensors, as applicable.
 java [-vm:vmdll -vmdir:dir -D... [-X...]] [args]
 java: 
 /home/ivan/svn/drlvm/trunk/vm/thread/src/thread_native_fat_monitor.c:183:
 monitor_wait_impl: Assertion `saved_recursion1' failed.
 Aborted

this is what I did not see by myself, did you try commenting the
assertion out?

 unset LD_LIBRARY_PATH
 ./java
 ./java: error while loading shared libraries: libhysig.so: cannot open
 shared object file: No such file or directory

this one is repaired with this patch:
--- modules/luni/src/main/native/launcher/linux/makefile(revision 
447762)
+++ modules/luni/src/main/native/launcher/linux/makefile(working copy)
@@ -21,7 +21,7 @@
 BUILDFILES = $(SHAREDSUB)main.o $(SHAREDSUB)cmain.o \
$(SHAREDSUB)launcher_copyright.o $(SHAREDSUB)strbuf.o \
$(SHAREDSUB)libhlp.o
-MDLLIBFILES = $(DLLPATH)libhyprt.so $(DLLPATH)libhythr.so
+MDLLIBFILES = $(DLLPATH)libhyprt.so $(DLLPATH)libhythr.so $(DLLPATH)libhysig.so
 EXENAME = $(EXEPATH)java

 include $(HY_HDK)/build/make/rules.mk

(note: crlf endings in makefile)

-- 
Egor Pasko, Intel Managed Runtime Division


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[classlib][beans] Re: svn commit: r447242 - in /incubator/harmony/enhanced/classlib/trunk/modules/beans: build.xml src/main/java/java/beans/BeanInfoImpl.java src/main/java/java/beans/PropertyDescripto

2006-09-19 Thread Alexei Zakharov

Stepan, Vladimir,

About HARMONY-1435.
I have discovered that one of the tests from
org.apache.harmony.beans.tests.java.beans.PropertyDescriptorTest (that
have been removed from the exclude by this commit) still fails on RI.
But after careful examination of the problem I tend to think this is a
bug in RI.
Failed test: org.apache.harmony.beans.tests.java.beans.PropertyDescriptorTest
RI throws IntrospectionException if invalid *write* method name is
specified and throws nothing in case of invalid *read* method name. I
think this is the time for another Non-bug difference from RI JIRA
:)

Thanks,

2006/9/18, [EMAIL PROTECTED] [EMAIL PROTECTED]:

Author: smishura
Date: Sun Sep 17 22:13:28 2006
New Revision: 447242

URL: http://svn.apache.org/viewvc?view=revrev=447242
Log:
Apply patch for HARMONY-1435 ([classlib][beans] no IntrospectionException for 
PropertyDescriptor(a, Class.class))

Remove org/apache/harmony/beans/tests/java/beans/PropertyDescriptorTest.java 
from exclude list

Modified:
   incubator/harmony/enhanced/classlib/trunk/modules/beans/build.xml
   
incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/BeanInfoImpl.java
   
incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/PropertyDescriptor.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/build.xml
URL: 
http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/build.xml?view=diffrev=447242r1=447241r2=447242
==
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/build.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/build.xml Sun Sep 
17 22:13:28 2006
@@ -231,7 +231,6 @@
exclude 
name=org/apache/harmony/beans/tests/java/beans/IntrospectorTest.java /
exclude 
name=org/apache/harmony/beans/tests/java/beans/PersistenceDelegateTest.java /
exclude 
name=org/apache/harmony/beans/tests/java/beans/PropertyChangeSupportTest.java /
-exclude 
name=org/apache/harmony/beans/tests/java/beans/PropertyDescriptorTest.java /
exclude 
name=org/apache/harmony/beans/tests/java/beans/PropertyEditorManagerTest.java /
exclude 
name=org/apache/harmony/beans/tests/java/beans/VetoableChangeListenerProxyTest.java 
/
exclude 
name=org/apache/harmony/beans/tests/java/beans/VetoableChangeSupportTest.java /

Modified: 
incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/BeanInfoImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/BeanInfoImpl.java?view=diffrev=447242r1=447241r2=447242
==
--- 
incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/BeanInfoImpl.java
 (original)
+++ 
incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/BeanInfoImpl.java
 Sun Sep 17 22:13:28 2006
@@ -393,9 +393,33 @@
try {
propertyDescriptor = new PropertyDescriptor(propertyName,
beanClass);
-hmPropertyDescriptors.put(propertyName, 
propertyDescriptor);
} catch (IntrospectionException ie) {
-System.out.println(ie.getClass() + :  + 
ie.getMessage()); //$NON-NLS-1$
+//no setter or getter
+if (methodName.startsWith(set)) {
+try {
+propertyDescriptor = new PropertyDescriptor(
+propertyName, beanClass, null, methodName);
+} catch (IntrospectionException e) {
+//no getter
+}
+} else if (methodName.startsWith(get)
+|| methodName.startsWith(is)) {
+try {
+propertyDescriptor = new PropertyDescriptor(
+propertyName, beanClass, methodName, null);
+} catch (IntrospectionException e) {
+//no setter
+}
+} else {
+try {
+propertyDescriptor = new PropertyDescriptor(
+propertyName, beanClass, null, null);
+} catch (IntrospectionException e) {
+}
+}
+}
+if (propertyDescriptor != null) {
+hmPropertyDescriptors.put(propertyName, 
propertyDescriptor);
}
}
}
@@ -418,7 +442,7 @@
hmPropertyDescriptors.put(propertyName,
   

Re: [jira] Created: (HARMONY-1456) [classlib][awt]java.awt.Font.hasUniformLineMetrics() return true on Harmony while RI returns false

2006-09-19 Thread Oleg Khaschansky

+1. BTW, I can't imagine the application that could be affected by
this difference.

On 9/19/06, Ilya Okomin [EMAIL PROTECTED] wrote:

Hi, community!

I found for java.awt.Font.hasUniformLineMetrics() RI returns false for all
fonts (physical/logical) while Harmony returns true for physical and false
for logical.
Spec says: Checks whether or not this Font has uniform line metrics. A
logical Font might be a composite font, which means that it is composed of
different physical fonts to cover different code ranges. Each of these fonts
might have different LineMetrics. If the logical Font is a single font then
the metrics would be uniform. . Thus I find reasonable to return true for
physical fonts, as they are single.I assume that it is a non-bug difference
from RI.
Any thoughts on this issue?

Regards,
Ilya.


On 9/13/06, Ilya Okomin (JIRA) [EMAIL PROTECTED] wrote:

 [classlib][awt]java.awt.Font.hasUniformLineMetrics() return true on
 Harmony while RI returns false

 
--

 Key: HARMONY-1456
 URL: http://issues.apache.org/jira/browse/HARMONY-1456
 Project: Harmony
  Issue Type: Bug
  Components: Non-bug differences from RI
 Environment: Windows XP
Reporter: Ilya Okomin
Priority: Trivial


 According to the specification method must Font.hasUniformLineMetricsreturn 
true if this Font has uniform
 line metrics; false otherwise.
 RI returns false for physical font Arial while Harmony returns true.
 test.java
 import java.awt.*;

 import junit.framework.TestCase;

 public class test extends TestCase {

public void testRun() {
final String name = Arial;

Font f=new Font(name, Font.BOLD, 12);

// Check if created font is physical, it's family name
// is not logical and equals to the name parameter.
assertEquals(f.getFamily(), name);
assertTrue(f.hasUniformLineMetrics());
}
 }
 ===

 Output:
 RI: java version 1.5.0
 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
 BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32,
 R25.0.0-75, GC: System optimized over throughput (initial strategy
 singleparpar))

 junit.framework.AssertionFailedError
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.assertTrue(Assert.java:20)
at junit.framework.Assert.assertTrue(Assert.java:27)
at test.testRun(Test9688.java:17)
at jrockit.reflect.VirtualNativeMethodInvoker.invoke(
 Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
at java.lang.reflect.Method.invoke(Ljava.lang.Object;[
 Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
 RemoteTestRunner.java:478)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(
 RemoteTestRunner.java:344)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
 RemoteTestRunner.java:196)

 Harmony: java version 1.5.0
 pre-alpha : not complete or compatible
 svn = r431938, (Aug 16 2006), Windows/ia32/msvc 1310, release build
 http://incubator.apache.org/harmony

 // test passed!

 I would suppose that it is RI bug, since spec says:  If the logical Font
 is a single font then the metrics would be uniform. In this case we have
 Arial font that is a single physical font on Windows platform and
 according to spec it has to have uniform metrics.



 --
 This message is automatically generated by JIRA.
 -
 If you think it was sent incorrectly contact one of the administrators:
 http://issues.apache.org/jira/secure/Administrators.jspa
 -
 For more information on JIRA, see: http://www.atlassian.com/software/jira





--
--
Ilya Okomin
Intel Middleware Products Division




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] Trouble Building DRLVM

2006-09-19 Thread Ivan Volosyuk

On 19 Sep 2006 18:46:40 +0700, Egor Pasko [EMAIL PROTECTED] wrote:

On the 0x1E9 day of Apache Harmony Ivan Volosyuk wrote:
 On 19 Sep 2006 18:13:28 +0700, Egor Pasko [EMAIL PROTECTED] wrote:
  On the 0x1E9 day of Apache Harmony Geir Magnusson, Jr. wrote:
   On Sep 19, 2006, at 6:34 AM, Egor Pasko wrote:
  
On the 0x1E9 day of Apache Harmony Geir Magnusson, Jr. wrote:
For grins, can you set JAVA_HOME to the deploy/jre directory and
PATH to
 include jre/bin?
   
lots of grins here :)
I set them, it runs well (with my patches, but, anyway), this problem
  
   What are you patches?
 
  nothing special:
  * launcher debug mode (O0, -g)
  * libhysig.so included in
modules/luni/src/main/native/launcher/linux/makefile
  * hymem_free_memory commented out in
modules/luni/src/main/native/common/shared/strhelp.c
(this one is rather experimantal, the root cause was incorrect
 handling of JAVA_HOME)
 
  BTW, I was pointing JAVA_HOME to RI by mistake. Resulting in SIGSEGV
  in this case is not the best idea. Can we overcome it in some way?
 
persists:
java/lang/UnsatisfiedLinkError : Failed loading library
libhyzlib.so: DSO load failed
   
whooa! I feel more comfortable now :)
  
   Why?  why did the DSO load fail?
 
  I am afraid, it looks for DSO in ., which is a wrong assumption :)
  I'll take a look, but do not promise to be fast))
 
  --
  Egor Pasko, Intel Managed Runtime Division

 On my computer, with fresh and clean classlib and drlvm.
 Settings:
 JAVA_HOME=./jre
 PATH=./jre/bin
 LD_LIBRARY_PATH=./jre/bin
 ./java

 Harmony Java launcher
 Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software
 Foundation or its licensors, as applicable.
 java [-vm:vmdll -vmdir:dir -D... [-X...]] [args]
 java: 
/home/ivan/svn/drlvm/trunk/vm/thread/src/thread_native_fat_monitor.c:183:
 monitor_wait_impl: Assertion `saved_recursion1' failed.
 Aborted

this is what I did not see by myself, did you try commenting the
assertion out?


I don't, yet, going to. BTW, when I run some application: ./java
Hello - everything works fine. The problem appears when no arguments
specified.



 unset LD_LIBRARY_PATH
 ./java
 ./java: error while loading shared libraries: libhysig.so: cannot open
 shared object file: No such file or directory

this one is repaired with this patch:
--- modules/luni/src/main/native/launcher/linux/makefile(revision 
447762)
+++ modules/luni/src/main/native/launcher/linux/makefile(working copy)
@@ -21,7 +21,7 @@
 BUILDFILES = $(SHAREDSUB)main.o $(SHAREDSUB)cmain.o \
$(SHAREDSUB)launcher_copyright.o $(SHAREDSUB)strbuf.o \
$(SHAREDSUB)libhlp.o
-MDLLIBFILES = $(DLLPATH)libhyprt.so $(DLLPATH)libhythr.so
+MDLLIBFILES = $(DLLPATH)libhyprt.so $(DLLPATH)libhythr.so $(DLLPATH)libhysig.so
 EXENAME = $(EXEPATH)java

 include $(HY_HDK)/build/make/rules.mk

(note: crlf endings in makefile)


Going to try this.

--
Ivan
Intel Middleware Products Division

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] Trouble Building DRLVM

2006-09-19 Thread Geir Magnusson Jr.


On Sep 19, 2006, at 7:46 AM, Egor Pasko wrote:


On the 0x1E9 day of Apache Harmony Ivan Volosyuk wrote:
On 19 Sep 2006 18:13:28 +0700, Egor Pasko [EMAIL PROTECTED]  
wrote:

On the 0x1E9 day of Apache Harmony Geir Magnusson, Jr. wrote:

On Sep 19, 2006, at 6:34 AM, Egor Pasko wrote:


On the 0x1E9 day of Apache Harmony Geir Magnusson, Jr. wrote:

For grins, can you set JAVA_HOME to the deploy/jre directory and
PATH to
 include jre/bin?


lots of grins here :)
I set them, it runs well (with my patches, but, anyway), this  
problem


What are you patches?


nothing special:
* launcher debug mode (O0, -g)
* libhysig.so included in
  modules/luni/src/main/native/launcher/linux/makefile
* hymem_free_memory commented out in
  modules/luni/src/main/native/common/shared/strhelp.c
  (this one is rather experimantal, the root cause was incorrect
   handling of JAVA_HOME)

BTW, I was pointing JAVA_HOME to RI by mistake. Resulting in SIGSEGV
in this case is not the best idea. Can we overcome it in some way?


persists:
java/lang/UnsatisfiedLinkError : Failed loading library
libhyzlib.so: DSO load failed

whooa! I feel more comfortable now :)


Why?  why did the DSO load fail?


I am afraid, it looks for DSO in ., which is a wrong assumption :)
I'll take a look, but do not promise to be fast))

--
Egor Pasko, Intel Managed Runtime Division


On my computer, with fresh and clean classlib and drlvm.
Settings:
JAVA_HOME=./jre
PATH=./jre/bin
LD_LIBRARY_PATH=./jre/bin
./java

Harmony Java launcher
Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache  
Software

Foundation or its licensors, as applicable.
java [-vm:vmdll -vmdir:dir -D... [-X...]] [args]
java: /home/ivan/svn/drlvm/trunk/vm/thread/src/ 
thread_native_fat_monitor.c:183:

monitor_wait_impl: Assertion `saved_recursion1' failed.
Aborted


this is what I did not see by myself, did you try commenting the
assertion out?


unset LD_LIBRARY_PATH
./java
./java: error while loading shared libraries: libhysig.so: cannot  
open

shared object file: No such file or directory


this one is repaired with this patch:
--- modules/luni/src/main/native/launcher/linux/makefile 
(revision 447762)
+++ modules/luni/src/main/native/launcher/linux/makefile 
(working copy)

@@ -21,7 +21,7 @@
 BUILDFILES = $(SHAREDSUB)main.o $(SHAREDSUB)cmain.o \
$(SHAREDSUB)launcher_copyright.o $(SHAREDSUB)strbuf.o \
$(SHAREDSUB)libhlp.o
-MDLLIBFILES = $(DLLPATH)libhyprt.so $(DLLPATH)libhythr.so
+MDLLIBFILES = $(DLLPATH)libhyprt.so $(DLLPATH)libhythr.so $ 
(DLLPATH)libhysig.so

 EXENAME = $(EXEPATH)java

 include $(HY_HDK)/build/make/rules.mk


So I guess this comes about because we still haven't resolved the  
dual libhythrd problem... and the DRLVM thead library uses hysig (I  
suppose) and the classlib version doesn't, and the drlvm build uses  
the drlvm version both for the launcher and in /default


I don't understand why it isn't affecting me.   On my box, ld - 
version reports 2.16.91 and gcc -v reports 3.4.6


I'll add this as I don't think there is harm for now

geir



(note: crlf endings in makefile)

--
Egor Pasko, Intel Managed Runtime Division


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] Trouble Building DRLVM

2006-09-19 Thread Geir Magnusson Jr.


On Sep 19, 2006, at 7:27 AM, Ivan Volosyuk wrote:

On 19 Sep 2006 18:13:28 +0700, Egor Pasko [EMAIL PROTECTED]  
wrote:

On the 0x1E9 day of Apache Harmony Geir Magnusson, Jr. wrote:
 On Sep 19, 2006, at 6:34 AM, Egor Pasko wrote:

  On the 0x1E9 day of Apache Harmony Geir Magnusson, Jr. wrote:
  For grins, can you set JAVA_HOME to the deploy/jre directory and
  PATH to
   include jre/bin?
 
  lots of grins here :)
  I set them, it runs well (with my patches, but, anyway), this  
problem


 What are you patches?

nothing special:
* launcher debug mode (O0, -g)
* libhysig.so included in
  modules/luni/src/main/native/launcher/linux/makefile
* hymem_free_memory commented out in
  modules/luni/src/main/native/common/shared/strhelp.c
  (this one is rather experimantal, the root cause was incorrect
   handling of JAVA_HOME)

BTW, I was pointing JAVA_HOME to RI by mistake. Resulting in SIGSEGV
in this case is not the best idea. Can we overcome it in some way?

  persists:
  java/lang/UnsatisfiedLinkError : Failed loading library
  libhyzlib.so: DSO load failed
 
  whooa! I feel more comfortable now :)

 Why?  why did the DSO load fail?

I am afraid, it looks for DSO in ., which is a wrong assumption :)
I'll take a look, but do not promise to be fast))

--
Egor Pasko, Intel Managed Runtime Division


On my computer, with fresh and clean classlib and drlvm.
Settings:
JAVA_HOME=./jre
PATH=./jre/bin
LD_LIBRARY_PATH=./jre/bin
./java


you don't need to set LD_LIBRARY_PATH



Harmony Java launcher
Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software
Foundation or its licensors, as applicable.
java [-vm:vmdll -vmdir:dir -D... [-X...]] [args]
java: /home/ivan/svn/drlvm/trunk/vm/thread/src/ 
thread_native_fat_monitor.c:183:

monitor_wait_impl: Assertion `saved_recursion1' failed.
Aborted


Ok, so something is odd here. - it looks like the launcher can't find  
the default/libharmonyvm.so file, and the assertion is some bug in  
our version of the thread library, since that's the one being used.


What are you actually building and how?




unset LD_LIBRARY_PATH
./java
./java: error while loading shared libraries: libhysig.so: cannot open
shared object file: No such file or directory

Glibc: 2.3.6
gcc: 3.4.5
kernel: 2.6.15.6


Right, so that's weird, as I have similar versions.

I just committed the patch to the launcher make file, so please  
refresh and try again.



--
Ivan
Intel Middleware Products Division

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] none of kernel tests passed for the recent sources

2006-09-19 Thread Geir Magnusson Jr.


On Sep 19, 2006, at 7:19 AM, Vladimir Gorr wrote:


On 9/19/06, Vladimir Gorr [EMAIL PROTECTED] wrote:




 On 9/19/06, Geir Magnusson Jr. [EMAIL PROTECTED] wrote:

 guys - lets be clear.  Are you unsetting it because it was pointing
 to Sun or BEA or IBM, or was it set to harmony?



 as for me JAVA_HOME refers to JRockit.

have you tried setting it to harmony?


 yes, I did but w/o success:
...
Unable to find a javac compiler; com.sun.tools.javac.Main is not  
on the

classpath.
Perhaps JAVA_HOME does not point to the JDK
...



I wanted to say I tried to run our tests (build.sh test) with this  
setting.
If we need to set JAVA_HOME to the .../deploy/jre how we're going  
to get

around this.


Yes - I understand.  I assume you can run the tests if you unset?  We  
need to figure out why it's suddenly affecting us, with all the  
recent changes.  I'm assuming it's something I did, as I changed how  
resources are loaded..


geir



Thanks,
Vladimir.


 Thanks,

 Vladimir.

geir

 On Sep 19, 2006, at 7:01 AM, Egor Pasko wrote:

  I got almost the same recently.
 
  try 'unset JAVA_HOME'
 
  On the 0x1E9 day of Apache Harmony Dmitry Durnev wrote:
  I observe vm crash with the similar stack trace on my SUSE  
Linux box,
   when trying to launch Hello World app on debug version of  
DRLVM:

 
  *** glibc detected *** free(): invalid pointer: 0xbfffbde8 ***
  SIGSEGV in VM code.
  Stack trace:
   1: free (??:-1)
   2: ?? (??:-1)
   3: ?? (??:-1)
   4: hymem_free_memory (??:-1)
   5: find_call_JNI_OnLoad
  (/export/workspace/drlvm/vm/vmcore/src/util/ 
natives_support.cpp:117)

   6: properties_free (??:-1)
   7: find_call_JNI_OnLoad
  (/export/workspace/drlvm/vm/vmcore/src/util/ 
natives_support.cpp:117)

   8: ?? (??:-1)
   9: readClassPathFromPropertiesFile (??:-1)
   10: ?? (??:-1)
   11: ?? (??:-1)
   12: ?? (??:-1)
   13: ?? (??:-1)
   14: ?? (??:-1)
   15: _dl_runtime_resolve (??:-1)
   16: ?? (??:-1)
   17: JNI_OnLoad (??:-1)
   18: ?? (??:-1)
  end of stack trace
 
 
  On 9/19/06, Vladimir Gorr [EMAIL PROTECTED] wrote:
  On 9/19/06, Geir Magnusson Jr  [EMAIL PROTECTED] wrote:
 
 
 
  Vladimir Gorr wrote:
  Geir,
 
  I found out none of the DRRVM kernel tests passed recently.
  Although
  all fine worked yet yesterday.
 
  *build.bat -Djunit.jar=%JUNIT_HOME% kernel.test*
  ...
  [echo]
  [echo] ==
  [echo] Run kernel tests using jitrino.jet
  [echo] ==
  [echo]
 [mkdir] Created dir:
 
  C:\DrlSrc\drlvm\trunk\build\win_ia32_msvc_debug\semis
  \kernel.tests\reports\jitrino.jet
 
  [echo] RUNNING : java.lang.Class1_5Test
 [junit] Test java.lang.Class1_5Test FAILED
 [junit] Test java.lang.Class1_5Test FAILED
  [echo] FAILED on reference JRE 
  [echo] RUNNING : java.lang.Class5Test
 [junit] Test java.lang.Class5Test FAILED
 [junit] Test java.lang.Class5Test FAILED
  [echo] FAILED on reference JRE 
  [echo] RUNNING : java.lang.ClassAnnotationsTest
 [junit] Test java.lang.ClassAnnotationsTest FAILED
 
  ^C
  ...
 
  I suspect you can know a clue for this issue. Probably I  
missed

  anything
  and didn't note what was modifed.
 
  Why are they failing?  AS of yesterday, I thought they were  
all

  passing
  for me.  I wouldn't have checked anything in if I saw that  
they

  were
  failing en-masse.  (We do need to have a stop the world  
as we
  stabilize DRLVM, figure out why tests fail apparently  
randomly,

  etc...)
 
 
  Agree. I also try to understand this.
 
  I'm running kernel tests now on Ubuntu 6, release build, and  
they

  are
  running fine.
 
  What platform?
 
 
  debug version on Windows platforms. I have no success on SUSE
  LINUX as well:
 
  ...
  -run-kernel-test-batch:
 [mkdir] Created dir:
  /nfs/ins/proj/drl/coreapi/vgorr/drlvm/trunk/build/
  lnx_ia32_gcc_debug/semis/kernel.tests/reports/batch.mode
 [junit] Running  
org.apache.harmony.lang.generics.ClassLoaderTest

 [junit] SIGSEGV in VM code.
 [junit] Stack trace:
 [junit] 1: properties_free (??:-1)
 [junit] 2: ?? (??:-1)
 [junit] 3: readClassPathFromPropertiesFile (??:-1)
 [junit] 4: ?? (??:-1)
 [junit] 5: ?? (??:-1)
 [junit] 6: ?? (??:-1)
 [junit] 7: ?? (??:-1)
 [junit] 8: ?? (??:-1)
 [junit] 9: ?? (??:-1)
 [junit] 10: JNI_OnLoad (??:-1)
 [junit] 11: ?? (??:-1)
 [junit] 12: ?? (??:-1)
 [junit] 13: ?? (??:-1)
 [junit] 14: ?? (??:-1)
 [junit] 15: ?? (??:-1)
 [junit] 16: ?? (??:-1)
 [junit] 17: ?? (??:-1)
 [junit] 18: ?? (??:-1)
 [junit] end of stack trace
 [junit] Tests FAILED
 
 
  Thanks,
  Vladimir.
 
  geir
 
 
 
   
---


  --
  Terms of 

Re: [drlvm] Trouble Building DRLVM

2006-09-19 Thread Geir Magnusson Jr.


On Sep 19, 2006, at 7:13 AM, Egor Pasko wrote:


On the 0x1E9 day of Apache Harmony Geir Magnusson, Jr. wrote:

On Sep 19, 2006, at 6:34 AM, Egor Pasko wrote:


On the 0x1E9 day of Apache Harmony Geir Magnusson, Jr. wrote:

For grins, can you set JAVA_HOME to the deploy/jre directory and
PATH to
 include jre/bin?


lots of grins here :)
I set them, it runs well (with my patches, but, anyway), this  
problem


What are you patches?


nothing special:
* launcher debug mode (O0, -g)
* libhysig.so included in
  modules/luni/src/main/native/launcher/linux/makefile
* hymem_free_memory commented out in
  modules/luni/src/main/native/common/shared/strhelp.c
  (this one is rather experimantal, the root cause was incorrect
   handling of JAVA_HOME)


Ah - that's a good hint.  I'll see if I can work it out from that.



BTW, I was pointing JAVA_HOME to RI by mistake. Resulting in SIGSEGV
in this case is not the best idea. Can we overcome it in some way?


LOL.  Yes - lets figure out the root cause :)

geir




persists:
java/lang/UnsatisfiedLinkError : Failed loading library
libhyzlib.so: DSO load failed

whooa! I feel more comfortable now :)


Why?  why did the DSO load fail?


I am afraid, it looks for DSO in ., which is a wrong assumption :)
I'll take a look, but do not promise to be fast))


Not really - right now, DRLVM should be using the harmony.properties  
file in /default.  It sets the vm.dir property to the /default  
directory (yes, this is awful... we need to modify launcher to fix  
this to another token like LAUNCHER_DIR) and then adds the dir where  
the launcher is from, as well as LAUNCHER/default to the boostrap  
library path.


geir



--
Egor Pasko, Intel Managed Runtime Division


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] none of kernel tests passed for the recent sources

2006-09-19 Thread Geir Magnusson Jr.


On Sep 19, 2006, at 7:10 AM, Dmitry Durnev wrote:


No, it wasn't.
Setting it to  /deploy/jre or simply unsetting solves the  
problem :)

Thanks! But before DRLVM was working even with JAVA_HOME pointing
somewhere else...


I know.  We'll need to figure that out.



On 9/19/06, Geir Magnusson Jr. [EMAIL PROTECTED] wrote:

That's good news (that you can reproduce it...)

Is JAVA_HOME set to /deploy/jre ?

geir




--

Dmitry A. Durnev,
Intel Middleware Products Division

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] none of kernel tests passed for the recent sources

2006-09-19 Thread Geir Magnusson Jr.


On Sep 19, 2006, at 7:56 AM, Artem Aliev wrote:


is JAVA_HOME set to /deploy/jre

this help, but the next is assert:
#java
/export/ali/svn-harmony/trunk/vm/thread/src/ 
thread_native_fat_monitor.c:183:

monitor_wait_impl: Assertion `saved_recursion1' failed.

This bug is fixed in
HARMONY-1340 issue


See my comment - can you defend that better?  Your suggestion is  
opposite of what the code has now.  It makes it go away doesn't  
work for me.  :)



There are olso a problems with 2 hythread lib in classlib and drlvm.


Yes


The java launcher is dynamicly linked with classlib libhysig.so, that
was built with classlib hythread lib. At runtime the libhysig.so is
dynamicly linked with the DRLVM hythread lib.


Ah!  I didn't think of that.



It looks like these hythread libs is not fully compatible.


Yes, that is clear.  We *really* need to solve this.

The first poroblem that was found is unimplemented hythread_exit()  
fumnction.

I will develop patch for DRLVM hythread lib


Thank you.


.

Thanks
Artem





On 9/19/06, Geir Magnusson Jr. [EMAIL PROTECTED] wrote:

That's good news (that you can reproduce it...)

Is JAVA_HOME set to /deploy/jre ?

geir

On Sep 19, 2006, at 6:42 AM, Dmitry Durnev wrote:

 I observe vm crash with the similar stack trace on my SUSE Linux  
box,

 when trying to launch Hello World app on debug version of DRLVM:

 *** glibc detected *** free(): invalid pointer: 0xbfffbde8 ***
 SIGSEGV in VM code.
 Stack trace:
   1: free (??:-1)
   2: ?? (??:-1)
   3: ?? (??:-1)
   4: hymem_free_memory (??:-1)
   5: find_call_JNI_OnLoad
 (/export/workspace/drlvm/vm/vmcore/src/util/natives_support.cpp: 
117)

   6: properties_free (??:-1)
   7: find_call_JNI_OnLoad
 (/export/workspace/drlvm/vm/vmcore/src/util/natives_support.cpp: 
117)

   8: ?? (??:-1)
   9: readClassPathFromPropertiesFile (??:-1)
   10: ?? (??:-1)
   11: ?? (??:-1)
   12: ?? (??:-1)
   13: ?? (??:-1)
   14: ?? (??:-1)
   15: _dl_runtime_resolve (??:-1)
   16: ?? (??:-1)
   17: JNI_OnLoad (??:-1)
   18: ?? (??:-1)
 end of stack trace


 On 9/19/06, Vladimir Gorr [EMAIL PROTECTED] wrote:
 On 9/19/06, Geir Magnusson Jr [EMAIL PROTECTED] wrote:
 
 
 
  Vladimir Gorr wrote:
   Geir,
  
   I found out none of the DRRVM kernel tests passed recently.
 Although
   all fine worked yet yesterday.
  
   *build.bat -Djunit.jar=%JUNIT_HOME% kernel.test*
   ...
   [echo]
   [echo] ==
   [echo] Run kernel tests using jitrino.jet
   [echo] ==
   [echo]
  [mkdir] Created dir:
  
  C:\DrlSrc\drlvm\trunk\build\win_ia32_msvc_debug\semis
 \kernel.tests\reports\jitrino.jet
  
   [echo] RUNNING : java.lang.Class1_5Test
  [junit] Test java.lang.Class1_5Test FAILED
  [junit] Test java.lang.Class1_5Test FAILED
   [echo] FAILED on reference JRE 
   [echo] RUNNING : java.lang.Class5Test
  [junit] Test java.lang.Class5Test FAILED
  [junit] Test java.lang.Class5Test FAILED
   [echo] FAILED on reference JRE 
   [echo] RUNNING : java.lang.ClassAnnotationsTest
  [junit] Test java.lang.ClassAnnotationsTest FAILED
  
   ^C
   ...
  
   I suspect you can know a clue for this issue. Probably I
 missed anything
   and didn't note what was modifed.
 
  Why are they failing?  AS of yesterday, I thought they were all
 passing
  for me.  I wouldn't have checked anything in if I saw that they
 were
  failing en-masse.  (We do need to have a stop the world as we
  stabilize DRLVM, figure out why tests fail apparently randomly,
 etc...)


 Agree. I also try to understand this.

 I'm running kernel tests now on Ubuntu 6, release build, and  
they are

  running fine.
 
  What platform?


 debug version on Windows platforms. I have no success on SUSE
 LINUX as well:

 ...
 -run-kernel-test-batch:
[mkdir] Created dir:
 /nfs/ins/proj/drl/coreapi/vgorr/drlvm/trunk/build/
 lnx_ia32_gcc_debug/semis/kernel.tests/reports/batch.mode
[junit] Running  
org.apache.harmony.lang.generics.ClassLoaderTest

[junit] SIGSEGV in VM code.
[junit] Stack trace:
[junit] 1: properties_free (??:-1)
[junit] 2: ?? (??:-1)
[junit] 3: readClassPathFromPropertiesFile (??:-1)
[junit] 4: ?? (??:-1)
[junit] 5: ?? (??:-1)
[junit] 6: ?? (??:-1)
[junit] 7: ?? (??:-1)
[junit] 8: ?? (??:-1)
[junit] 9: ?? (??:-1)
[junit] 10: JNI_OnLoad (??:-1)
[junit] 11: ?? (??:-1)
[junit] 12: ?? (??:-1)
[junit] 13: ?? (??:-1)
[junit] 14: ?? (??:-1)
[junit] 15: ?? (??:-1)
[junit] 16: ?? (??:-1)
[junit] 17: ?? (??:-1)
[junit] 18: ?? (??:-1)
[junit] end of stack trace
[junit] Tests FAILED


 Thanks,
 Vladimir.

 geir
 
 
 
 
  
-


Re: [drlvm] none of kernel tests passed for the recent sources

2006-09-19 Thread Vladimir Gorr

On 9/19/06, Geir Magnusson Jr. [EMAIL PROTECTED] wrote:


Ok - my debug build on winXP just passed the c-unit tests and now is
winding through the smoke tests.  Currently hanging on LOS



I doubt we'll be able to wait till this test ends. I've just excluded this
test from testing as follows:

Index: LOS.java
===
--- LOS.java (revision 447337)
+++ LOS.java (working copy)
@@ -23,6 +23,7 @@

/**
 * Try large object allocation after filling the heap with small objects.
+ * @keyword XXX
 *
 */
public class LOS extends Thread {

If you wish to reproduce my issue you should run the following command as I
mentioned starting this thread, namely:

*build.bat -Djunit.jar=%JUNIT_HOME% kernel.test*

Thanks,
Vladimir.

I can do

   java -showversion -cp . Foo

(where Foo.class is  in . of course)

and it works fine

geir

On Sep 19, 2006, at 5:43 AM, Vladimir Gorr wrote:

 On 9/19/06, Geir Magnusson Jr [EMAIL PROTECTED] wrote:



 Vladimir Gorr wrote:
  Geir,
 
  I found out none of the DRRVM kernel tests passed recently.
 Although
  all fine worked yet yesterday.
 
  *build.bat -Djunit.jar=%JUNIT_HOME% kernel.test*
  ...
  [echo]
  [echo] ==
  [echo] Run kernel tests using jitrino.jet
  [echo] ==
  [echo]
 [mkdir] Created dir:
 
 C:\DrlSrc\drlvm\trunk\build\win_ia32_msvc_debug\semis\kernel.tests
 \reports\jitrino.jet
 
  [echo] RUNNING : java.lang.Class1_5Test
 [junit] Test java.lang.Class1_5Test FAILED
 [junit] Test java.lang.Class1_5Test FAILED
  [echo] FAILED on reference JRE 
  [echo] RUNNING : java.lang.Class5Test
 [junit] Test java.lang.Class5Test FAILED
 [junit] Test java.lang.Class5Test FAILED
  [echo] FAILED on reference JRE 
  [echo] RUNNING : java.lang.ClassAnnotationsTest
 [junit] Test java.lang.ClassAnnotationsTest FAILED
 
  ^C
  ...
 
  I suspect you can know a clue for this issue. Probably I missed
 anything
  and didn't note what was modifed.

 Why are they failing?  AS of yesterday, I thought they were all
 passing
 for me.  I wouldn't have checked anything in if I saw that they were
 failing en-masse.  (We do need to have a stop the world as we
 stabilize DRLVM, figure out why tests fail apparently randomly,
 etc...)


 Agree. I also try to understand this.

 I'm running kernel tests now on Ubuntu 6, release build, and they are
 running fine.

 What platform?


 debug version on Windows platforms. I have no success on SUSE LINUX
 as well:

 ...
 -run-kernel-test-batch:
[mkdir] Created dir:
 /nfs/ins/proj/drl/coreapi/vgorr/drlvm/trunk/build/
 lnx_ia32_gcc_debug/semis/kernel.tests/reports/batch.mode
[junit] Running org.apache.harmony.lang.generics.ClassLoaderTest
[junit] SIGSEGV in VM code.
[junit] Stack trace:
[junit] 1: properties_free (??:-1)
[junit] 2: ?? (??:-1)
[junit] 3: readClassPathFromPropertiesFile (??:-1)
[junit] 4: ?? (??:-1)
[junit] 5: ?? (??:-1)
[junit] 6: ?? (??:-1)
[junit] 7: ?? (??:-1)
[junit] 8: ?? (??:-1)
[junit] 9: ?? (??:-1)
[junit] 10: JNI_OnLoad (??:-1)
[junit] 11: ?? (??:-1)
[junit] 12: ?? (??:-1)
[junit] 13: ?? (??:-1)
[junit] 14: ?? (??:-1)
[junit] 15: ?? (??:-1)
[junit] 16: ?? (??:-1)
[junit] 17: ?? (??:-1)
[junit] 18: ?? (??:-1)
[junit] end of stack trace
[junit] Tests FAILED


 Thanks,
 Vladimir.

 geir



 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: harmony-dev-
 [EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




[drlvm][classlib] thread library - let there be one!

2006-09-19 Thread Geir Magnusson Jr.

All,

we need to put this issue to bed, as we're tripping over it, it seems.

Any thoughts on how to move forward on this?

geir


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] none of kernel tests passed for the recent sources

2006-09-19 Thread Vladimir Gorr

On 9/19/06, Artem Aliev [EMAIL PROTECTED] wrote:


 is JAVA_HOME set to /deploy/jre
this help, but the next is assert:
#java

/export/ali/svn-harmony/trunk/vm/thread/src/thread_native_fat_monitor.c:183:
monitor_wait_impl: Assertion `saved_recursion1' failed.

This bug is fixed in
HARMONY-1340 issue


There are olso a problems with 2 hythread lib in classlib and drlvm.
The java launcher is dynamicly linked with classlib libhysig.so, that
was built with classlib hythread lib. At runtime the libhysig.so is
dynamicly linked with the DRLVM hythread lib.

It looks like these hythread libs is not fully compatible.
The first poroblem that was found is unimplemented hythread_exit()
fumnction.
I will develop patch for DRLVM hythread lib.



Is it possible to use same hythread library for both classlib  DRLVM?

Thanks,
Vladimir.

Thanks

Artem





On 9/19/06, Geir Magnusson Jr. [EMAIL PROTECTED] wrote:
 That's good news (that you can reproduce it...)

 Is JAVA_HOME set to /deploy/jre ?

 geir

 On Sep 19, 2006, at 6:42 AM, Dmitry Durnev wrote:

  I observe vm crash with the similar stack trace on my SUSE Linux box,
  when trying to launch Hello World app on debug version of DRLVM:
 
  *** glibc detected *** free(): invalid pointer: 0xbfffbde8 ***
  SIGSEGV in VM code.
  Stack trace:
1: free (??:-1)
2: ?? (??:-1)
3: ?? (??:-1)
4: hymem_free_memory (??:-1)
5: find_call_JNI_OnLoad
  (/export/workspace/drlvm/vm/vmcore/src/util/natives_support.cpp:117)
6: properties_free (??:-1)
7: find_call_JNI_OnLoad
  (/export/workspace/drlvm/vm/vmcore/src/util/natives_support.cpp:117)
8: ?? (??:-1)
9: readClassPathFromPropertiesFile (??:-1)
10: ?? (??:-1)
11: ?? (??:-1)
12: ?? (??:-1)
13: ?? (??:-1)
14: ?? (??:-1)
15: _dl_runtime_resolve (??:-1)
16: ?? (??:-1)
17: JNI_OnLoad (??:-1)
18: ?? (??:-1)
  end of stack trace
 
 
  On 9/19/06, Vladimir Gorr [EMAIL PROTECTED] wrote:
  On 9/19/06, Geir Magnusson Jr [EMAIL PROTECTED] wrote:
  
  
  
   Vladimir Gorr wrote:
Geir,
   
I found out none of the DRRVM kernel tests passed recently.
  Although
all fine worked yet yesterday.
   
*build.bat -Djunit.jar=%JUNIT_HOME% kernel.test*
...
[echo]
[echo] ==
[echo] Run kernel tests using jitrino.jet
[echo] ==
[echo]
   [mkdir] Created dir:
   
   C:\DrlSrc\drlvm\trunk\build\win_ia32_msvc_debug\semis
  \kernel.tests\reports\jitrino.jet
   
[echo] RUNNING : java.lang.Class1_5Test
   [junit] Test java.lang.Class1_5Test FAILED
   [junit] Test java.lang.Class1_5Test FAILED
[echo] FAILED on reference JRE 
[echo] RUNNING : java.lang.Class5Test
   [junit] Test java.lang.Class5Test FAILED
   [junit] Test java.lang.Class5Test FAILED
[echo] FAILED on reference JRE 
[echo] RUNNING : java.lang.ClassAnnotationsTest
   [junit] Test java.lang.ClassAnnotationsTest FAILED
   
^C
...
   
I suspect you can know a clue for this issue. Probably I
  missed anything
and didn't note what was modifed.
  
   Why are they failing?  AS of yesterday, I thought they were all
  passing
   for me.  I wouldn't have checked anything in if I saw that they
  were
   failing en-masse.  (We do need to have a stop the world as we
   stabilize DRLVM, figure out why tests fail apparently randomly,
  etc...)
 
 
  Agree. I also try to understand this.
 
  I'm running kernel tests now on Ubuntu 6, release build, and they are
   running fine.
  
   What platform?
 
 
  debug version on Windows platforms. I have no success on SUSE
  LINUX as well:
 
  ...
  -run-kernel-test-batch:
 [mkdir] Created dir:
  /nfs/ins/proj/drl/coreapi/vgorr/drlvm/trunk/build/
  lnx_ia32_gcc_debug/semis/kernel.tests/reports/batch.mode
 [junit] Running org.apache.harmony.lang.generics.ClassLoaderTest
 [junit] SIGSEGV in VM code.
 [junit] Stack trace:
 [junit] 1: properties_free (??:-1)
 [junit] 2: ?? (??:-1)
 [junit] 3: readClassPathFromPropertiesFile (??:-1)
 [junit] 4: ?? (??:-1)
 [junit] 5: ?? (??:-1)
 [junit] 6: ?? (??:-1)
 [junit] 7: ?? (??:-1)
 [junit] 8: ?? (??:-1)
 [junit] 9: ?? (??:-1)
 [junit] 10: JNI_OnLoad (??:-1)
 [junit] 11: ?? (??:-1)
 [junit] 12: ?? (??:-1)
 [junit] 13: ?? (??:-1)
 [junit] 14: ?? (??:-1)
 [junit] 15: ?? (??:-1)
 [junit] 16: ?? (??:-1)
 [junit] 17: ?? (??:-1)
 [junit] 18: ?? (??:-1)
 [junit] end of stack trace
 [junit] Tests FAILED
 
 
  Thanks,
  Vladimir.
 
  geir
  
  
  
  
  -
   Terms of use : 

Re: [drlvm] none of kernel tests passed for the recent sources

2006-09-19 Thread Vladimir Gorr

On 9/19/06, Vladimir Gorr [EMAIL PROTECTED] wrote:




 On 9/19/06, Artem Aliev [EMAIL PROTECTED] wrote:

  is JAVA_HOME set to /deploy/jre
 this help, but the next is assert:
 #java
 /export/ali/svn-harmony/trunk/vm/thread/src/thread_native_fat_monitor.c:183:

 monitor_wait_impl: Assertion `saved_recursion1' failed.

 This bug is fixed in
 HARMONY-1340 issue


 There are olso a problems with 2 hythread lib in classlib and drlvm.
 The java launcher is dynamicly linked with classlib libhysig.so, that
 was built with classlib hythread lib. At runtime the libhysig.so is
 dynamicly linked with the DRLVM hythread lib.

 It looks like these hythread libs is not fully compatible.
 The first poroblem that was found is unimplemented hythread_exit()
 fumnction.
 I will develop patch for DRLVM hythread lib.


 Is it possible to use same hythread library for both classlib  DRLVM?



Oops... I didn't note new thread started for this :-(. All untwists very
dynamically.




Thanks,
 Vladimir.

Thanks
 Artem





 On 9/19/06, Geir Magnusson Jr.  [EMAIL PROTECTED] wrote:
  That's good news (that you can reproduce it...)
 
  Is JAVA_HOME set to /deploy/jre ?
 
  geir
 
  On Sep 19, 2006, at 6:42 AM, Dmitry Durnev wrote:
 
   I observe vm crash with the similar stack trace on my SUSE Linux
 box,
   when trying to launch Hello World app on debug version of DRLVM:
  
   *** glibc detected *** free(): invalid pointer: 0xbfffbde8 ***
   SIGSEGV in VM code.
   Stack trace:
 1: free (??:-1)
 2: ?? (??:-1)
 3: ?? (??:-1)
 4: hymem_free_memory (??:-1)
 5: find_call_JNI_OnLoad
   (/export/workspace/drlvm/vm/vmcore/src/util/natives_support.cpp:117)
 6: properties_free (??:-1)
 7: find_call_JNI_OnLoad
   (/export/workspace/drlvm/vm/vmcore/src/util/natives_support.cpp:117)

 8: ?? (??:-1)
 9: readClassPathFromPropertiesFile (??:-1)
 10: ?? (??:-1)
 11: ?? (??:-1)
 12: ?? (??:-1)
 13: ?? (??:-1)
 14: ?? (??:-1)
 15: _dl_runtime_resolve (??:-1)
 16: ?? (??:-1)
 17: JNI_OnLoad (??:-1)
 18: ?? (??:-1)
   end of stack trace
  
  
   On 9/19/06, Vladimir Gorr [EMAIL PROTECTED] wrote:
   On 9/19/06, Geir Magnusson Jr [EMAIL PROTECTED]  wrote:
   
   
   
Vladimir Gorr wrote:
 Geir,

 I found out none of the DRRVM kernel tests passed recently.
   Although
 all fine worked yet yesterday.

 *build.bat -Djunit.jar=%JUNIT_HOME% kernel.test*
 ...
 [echo]
 [echo] ==
 [echo] Run kernel tests using jitrino.jet
 [echo] ==
 [echo]
[mkdir] Created dir:

C:\DrlSrc\drlvm\trunk\build\win_ia32_msvc_debug\semis
   \kernel.tests\reports\jitrino.jet

 [echo] RUNNING : java.lang.Class1_5Test
[junit] Test java.lang.Class1_5Test FAILED
[junit] Test java.lang.Class1_5Test FAILED
 [echo] FAILED on reference JRE 
 [echo] RUNNING : java.lang.Class5Test
[junit] Test java.lang.Class5Test FAILED
[junit] Test java.lang.Class5Test FAILED
 [echo] FAILED on reference JRE 
 [echo] RUNNING : java.lang.ClassAnnotationsTest
[junit] Test java.lang.ClassAnnotationsTest FAILED

 ^C
 ...

 I suspect you can know a clue for this issue. Probably I
   missed anything
 and didn't note what was modifed.
   
Why are they failing?  AS of yesterday, I thought they were all
   passing
for me.  I wouldn't have checked anything in if I saw that they
   were
failing en-masse.  (We do need to have a stop the world as we
stabilize DRLVM, figure out why tests fail apparently randomly,
   etc...)
  
  
   Agree. I also try to understand this.
  
   I'm running kernel tests now on Ubuntu 6, release build, and they
 are
running fine.
   
What platform?
  
  
   debug version on Windows platforms. I have no success on SUSE
   LINUX as well:
  
   ...
   -run-kernel-test-batch:
  [mkdir] Created dir:
   /nfs/ins/proj/drl/coreapi/vgorr/drlvm/trunk/build/
   lnx_ia32_gcc_debug/semis/kernel.tests/reports/batch.mode
  [junit] Running org.apache.harmony.lang.generics.ClassLoaderTest
  [junit] SIGSEGV in VM code.
  [junit] Stack trace:
  [junit] 1: properties_free (??:-1)
  [junit] 2: ?? (??:-1)
  [junit] 3: readClassPathFromPropertiesFile (??:-1)
  [junit] 4: ?? (??:-1)
  [junit] 5: ?? (??:-1)
  [junit] 6: ?? (??:-1)
  [junit] 7: ?? (??:-1)
  [junit] 8: ?? (??:-1)
  [junit] 9: ?? (??:-1)
  [junit] 10: JNI_OnLoad (??:-1)
  [junit] 11: ?? (??:-1)
  [junit] 12: ?? (??:-1)
  [junit] 13: ?? (??:-1)
  [junit] 14: ?? (??:-1)
  [junit] 15: ?? (??:-1)
  [junit] 16: ?? (??:-1)
  

Re: [drlvm] Trouble Building DRLVM

2006-09-19 Thread Ivan Volosyuk

On 9/19/06, Geir Magnusson Jr. [EMAIL PROTECTED] wrote:


On Sep 19, 2006, at 7:27 AM, Ivan Volosyuk wrote:

 On 19 Sep 2006 18:13:28 +0700, Egor Pasko [EMAIL PROTECTED]
 wrote:
 On the 0x1E9 day of Apache Harmony Geir Magnusson, Jr. wrote:
  On Sep 19, 2006, at 6:34 AM, Egor Pasko wrote:
 
   On the 0x1E9 day of Apache Harmony Geir Magnusson, Jr. wrote:
   For grins, can you set JAVA_HOME to the deploy/jre directory and
   PATH to
include jre/bin?
  
   lots of grins here :)
   I set them, it runs well (with my patches, but, anyway), this
 problem
 
  What are you patches?

 nothing special:
 * launcher debug mode (O0, -g)
 * libhysig.so included in
   modules/luni/src/main/native/launcher/linux/makefile
 * hymem_free_memory commented out in
   modules/luni/src/main/native/common/shared/strhelp.c
   (this one is rather experimantal, the root cause was incorrect
handling of JAVA_HOME)

 BTW, I was pointing JAVA_HOME to RI by mistake. Resulting in SIGSEGV
 in this case is not the best idea. Can we overcome it in some way?

   persists:
   java/lang/UnsatisfiedLinkError : Failed loading library
   libhyzlib.so: DSO load failed
  
   whooa! I feel more comfortable now :)
 
  Why?  why did the DSO load fail?

 I am afraid, it looks for DSO in ., which is a wrong assumption :)
 I'll take a look, but do not promise to be fast))

 --
 Egor Pasko, Intel Managed Runtime Division

 On my computer, with fresh and clean classlib and drlvm.
 Settings:
 JAVA_HOME=./jre
 PATH=./jre/bin
 LD_LIBRARY_PATH=./jre/bin
 ./java

you don't need to set LD_LIBRARY_PATH


 Harmony Java launcher
 Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software
 Foundation or its licensors, as applicable.
 java [-vm:vmdll -vmdir:dir -D... [-X...]] [args]
 java: /home/ivan/svn/drlvm/trunk/vm/thread/src/
 thread_native_fat_monitor.c:183:
 monitor_wait_impl: Assertion `saved_recursion1' failed.
 Aborted

Ok, so something is odd here. - it looks like the launcher can't find
the default/libharmonyvm.so file, and the assertion is some bug in
our version of the thread library, since that's the one being used.

What are you actually building and how?


default settings, no changes.

classlib/trunk:
 JAVA: BEA JRockit(R) (build
R26.4.0-63-63688-1.5.0_06-20060626-2259-linux-ia32, )
 svn update
 ant fetch-depends
 ant
drlvm/trunk:
 svn update
 sh build.sh update
 sh build.sh clean; sh build.sh
running:
 cd lnx_ia32_gcc_debug/deploy/jre
 export JAVA_HOME=$PWD
 cd bin
 export PATH=$PWD:$PATH
 ./java Hello
Hello
 ./java

Harmony Java launcher
Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software
Foundation or its licensors, as applicable.
java [-vm:vmdll -vmdir:dir -D... [-X...]] [args]
./java: relocation error:
/home/ivan/svn/drlvm/trunk/build/lnx_ia32_gcc_debug/deploy/jre/bin/libhyprt.so:
symbol hythrea
d_exit, version HYTHR_0.1 not defined in file libhythr.so with link
time reference

After I have commented out:
  assert(saved_recursion1);





 unset LD_LIBRARY_PATH
 ./java
 ./java: error while loading shared libraries: libhysig.so: cannot open
 shared object file: No such file or directory

 Glibc: 2.3.6
 gcc: 3.4.5
 kernel: 2.6.15.6

Right, so that's weird, as I have similar versions.

I just committed the patch to the launcher make file, so please
refresh and try again.


Works, no more LD_LIBRARY_PATH needed.

--
Ivan
Intel Middleware Products Division

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [classlib][build] failure?

2006-09-19 Thread Mark Hindess

Well, I was just pointing out a further inconsistency (awt/windows).  I
don't recall when/why linux errors were downgraded so that might have
happened before I started hacking the natives around.

Regards,
 Mark.

On 19 September 2006 at 7:10, Geir Magnusson Jr. [EMAIL PROTECTED] wrote:
 Ok, good - there's a totally reasonable explanation :)
 
 geir
 
 On Sep 19, 2006, at 7:05 AM, Mark Hindess wrote:
 
 
  Incidentally, I had to override the default windows flags to turn off
  the warnings-as-error for the awt native code in order to integrate  
  it.
  I mentioned this on the -dev list at the time hoping to see some  
  patches
  to fix the issues but there haven't been any as yet.
 
  I agree it would be a good thing to fix for all the native code on  
  both
  platforms.
 
  Regards,
   Mark.
 
  On 19 September 2006 at 4:46, Geir Magnusson Jr. [EMAIL PROTECTED]  
  wrote:
  There is no way to get rid of the warnings in our codebase on linux?
 
  geir
 
  On Sep 19, 2006, at 4:03 AM, Leo Li wrote:
 
  Hi, Geir:
   The warning level is set to level 3 while the warning as error
  option is
  off in linux.
   Actually, I would like to set it on in linux since it will help me
  to pick
  some error out, for example, wrongly use pointers. However, I have
  tried to
  set it on, but some unavoidable warning will lead to a failure in
  Harmony
  building. Any good idea?:)
 
  Good luck!
 
  On 9/19/06, Geir Magnusson Jr. [EMAIL PROTECTED] wrote:
 
  Lets get these aligned...  I tend to work on linux, so it had no
  problem building..
 
  geir
 
  On Sep 18, 2006, at 10:14 PM, Leo Li wrote:
 
  Just comment it out since it is just a warning treated as error.
  It compiles successfully and runs well.
  Maybe it will not lead to such an error on Linux due to the
  configuration of
  make rules.:)
 
  Good luck!
 
 
  On 9/19/06, Spark Shen [EMAIL PROTECTED] wrote:
 
  Hi All:
  When building today's(Sep 19, r447671) classlib on window xp, I
  got the
  following error message:
  [exec] main.c
  [exec] ..\shared\main.c(628) : error C2220: warning  
  treated as
  error - no o
  bject file generated
  [exec] ..\shared\main.c(628) : warning C4101: 'jarRunner' :
  unreferenced lo
  cal variable
  [exec] NMAKE : fatal error U1077: 'cl' : return code '0x2'
  [exec] Stop.
  [exec] NMAKE : fatal error U1077: 'c:\Program Files 
  \Microsoft
  Visual Studi
  o .NET 2003\VC7\BIN\nmake.exe' : return code '0x2'
  [exec] Stop.
 
  BUILD FAILED
  C:\spark\harmony\build.xml:95: The following error occurred while
  executing this
  line:
  C:\spark\harmony\make\build-native.xml:75: The following error
  occurred
  while ex
  ecuting this line:
  C:\spark\harmony\modules\luni\build.xml:167: The following error
  occurred while
  executing this line:
  C:\spark\harmony\make\properties.xml:258: exec returned: 2
 
  Could any one check it?
 
  Best regards
 
  --
  Spark Shen
  China Software Development Lab, IBM
 
 
 
  --- 
  --
  Terms of use : http://incubator.apache.org/harmony/mailing.html
  To unsubscribe, e-mail: harmony-dev-
  [EMAIL PROTECTED]
  For additional commands, e-mail: harmony-dev-
  [EMAIL PROTECTED]
 
 
 
 
  --
  Leo Li
  China Software Development Lab, IBM
 
 
  --- 
  --
  Terms of use : http://incubator.apache.org/harmony/mailing.html
  To unsubscribe, e-mail: harmony-dev- 
  [EMAIL PROTECTED]
  For additional commands, e-mail: harmony-dev-
  [EMAIL PROTECTED]
 
 
 
 
  -- 
  Leo Li
  China Software Development Lab, IBM
 
 
  -
  Terms of use : http://incubator.apache.org/harmony/mailing.html
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: harmony-dev- 
  [EMAIL PROTECTED]
 
 
 
 
  -
  Terms of use : http://incubator.apache.org/harmony/mailing.html
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] Trouble Building DRLVM

2006-09-19 Thread Ivan Volosyuk

On 9/19/06, Ivan Volosyuk [EMAIL PROTECTED] wrote:

On 9/19/06, Geir Magnusson Jr. [EMAIL PROTECTED] wrote:

 On Sep 19, 2006, at 7:27 AM, Ivan Volosyuk wrote:

  On 19 Sep 2006 18:13:28 +0700, Egor Pasko [EMAIL PROTECTED]
  wrote:
  On the 0x1E9 day of Apache Harmony Geir Magnusson, Jr. wrote:
   On Sep 19, 2006, at 6:34 AM, Egor Pasko wrote:
  
On the 0x1E9 day of Apache Harmony Geir Magnusson, Jr. wrote:
For grins, can you set JAVA_HOME to the deploy/jre directory and
PATH to
 include jre/bin?
   
lots of grins here :)
I set them, it runs well (with my patches, but, anyway), this
  problem
  
   What are you patches?
 
  nothing special:
  * launcher debug mode (O0, -g)
  * libhysig.so included in
modules/luni/src/main/native/launcher/linux/makefile
  * hymem_free_memory commented out in
modules/luni/src/main/native/common/shared/strhelp.c
(this one is rather experimantal, the root cause was incorrect
 handling of JAVA_HOME)
 
  BTW, I was pointing JAVA_HOME to RI by mistake. Resulting in SIGSEGV
  in this case is not the best idea. Can we overcome it in some way?
 
persists:
java/lang/UnsatisfiedLinkError : Failed loading library
libhyzlib.so: DSO load failed
   
whooa! I feel more comfortable now :)
  
   Why?  why did the DSO load fail?
 
  I am afraid, it looks for DSO in ., which is a wrong assumption :)
  I'll take a look, but do not promise to be fast))
 
  --
  Egor Pasko, Intel Managed Runtime Division
 
  On my computer, with fresh and clean classlib and drlvm.
  Settings:
  JAVA_HOME=./jre
  PATH=./jre/bin
  LD_LIBRARY_PATH=./jre/bin
  ./java

 you don't need to set LD_LIBRARY_PATH

 
  Harmony Java launcher
  Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software
  Foundation or its licensors, as applicable.
  java [-vm:vmdll -vmdir:dir -D... [-X...]] [args]
  java: /home/ivan/svn/drlvm/trunk/vm/thread/src/
  thread_native_fat_monitor.c:183:
  monitor_wait_impl: Assertion `saved_recursion1' failed.
  Aborted

 Ok, so something is odd here. - it looks like the launcher can't find
 the default/libharmonyvm.so file, and the assertion is some bug in
 our version of the thread library, since that's the one being used.

 What are you actually building and how?

default settings, no changes.

classlib/trunk:
  JAVA: BEA JRockit(R) (build
R26.4.0-63-63688-1.5.0_06-20060626-2259-linux-ia32, )
  svn update
  ant fetch-depends
  ant
drlvm/trunk:
  svn update
  sh build.sh update
  sh build.sh clean; sh build.sh
running:
  cd lnx_ia32_gcc_debug/deploy/jre
  export JAVA_HOME=$PWD
  cd bin
  export PATH=$PWD:$PATH
  ./java Hello
Hello
  ./java

Harmony Java launcher
Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software
Foundation or its licensors, as applicable.
java [-vm:vmdll -vmdir:dir -D... [-X...]] [args]
./java: relocation error:
/home/ivan/svn/drlvm/trunk/build/lnx_ia32_gcc_debug/deploy/jre/bin/libhyprt.so:
symbol hythrea
d_exit, version HYTHR_0.1 not defined in file libhythr.so with link
time reference

After I have commented out:
   assert(saved_recursion1);


I've also reproduced the problem with DSO.
Just run 'java' from different directory and will get:
java/lang/UnsatisfiedLinkError : Failed loading library
libhyzlib.so: DSO load failed





 
  unset LD_LIBRARY_PATH
  ./java
  ./java: error while loading shared libraries: libhysig.so: cannot open
  shared object file: No such file or directory
 
  Glibc: 2.3.6
  gcc: 3.4.5
  kernel: 2.6.15.6

 Right, so that's weird, as I have similar versions.

 I just committed the patch to the launcher make file, so please
 refresh and try again.

Works, no more LD_LIBRARY_PATH needed.



--
Ivan
Intel Middleware Products Division

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [jira] Created: (HARMONY-1456) [classlib][awt]java.awt.Font.hasUniformLineMetrics() return true on Harmony while RI returns false

2006-09-19 Thread Ilya Okomin

On 9/19/06, Oleg Khaschansky [EMAIL PROTECTED]  wrote:


+1. BTW, I can't imagine the application that could be affected by
this difference.



It may have sence if the application uses certain metrics for logical fonts
according to the hasUniformLineMetrics() returned value. E.g. baseline
offsets or lines thicknesses may be different for the physical fonts, that
are composing logical font. Probably some applications would use font
metrics if the hasUniformLineMetrics() returned true and use redefined
values for such metrics if returned value is false, depending on the
situation. (It is only a guess;)

Thanks,
Ilya.




On 9/19/06, Ilya Okomin  [EMAIL PROTECTED] wrote:
 Hi, community!

 I found for java.awt.Font.hasUniformLineMetrics() RI returns false for
all
 fonts (physical/logical) while Harmony returns true for physical and
false
 for logical.
 Spec says: Checks whether or not this Font has uniform line metrics. A
 logical Font might be a composite font, which means that it is composed
of
 different physical fonts to cover different code ranges. Each of these
fonts
 might have different LineMetrics. If the logical Font is a single font
then
 the metrics would be uniform. . Thus I find reasonable to return true
for
 physical fonts, as they are single.I assume that it is a non-bug
difference
 from RI.
 Any thoughts on this issue?

 Regards,
 Ilya.


 On 9/13/06, Ilya Okomin (JIRA)  [EMAIL PROTECTED] wrote:
 
  [classlib][awt]java.awt.Font.hasUniformLineMetrics() return true on
  Harmony while RI returns false
 
 
--

 
  Key: HARMONY-1456
  URL: http://issues.apache.org/jira/browse/HARMONY-1456
  Project: Harmony
   Issue Type: Bug
   Components: Non-bug differences from RI
  Environment: Windows XP
 Reporter: Ilya Okomin
 Priority: Trivial
 
 
  According to the specification method must
Font.hasUniformLineMetricsreturn true if this Font has uniform
  line metrics; false otherwise.
  RI returns false for physical font Arial while Harmony returns true.

  test.java
  import java.awt.*;
 
  import junit.framework.TestCase;
 
  public class test extends TestCase {
 
 public void testRun() {
 final String name = Arial;
 
 Font f=new Font(name, Font.BOLD, 12);
 
 // Check if created font is physical, it's family name
 // is not logical and equals to the name parameter.
 assertEquals(f.getFamily(), name);
 assertTrue(f.hasUniformLineMetrics());
 }
  }
  ===
 
  Output:
  RI: java version 1.5.0
  Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
  BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32,
  R25.0.0-75, GC: System optimized over throughput (initial strategy
  singleparpar))
 
  junit.framework.AssertionFailedError
 at junit.framework.Assert.fail (Assert.java:47)
 at junit.framework.Assert.assertTrue(Assert.java:20)
 at junit.framework.Assert.assertTrue(Assert.java:27)
 at test.testRun(Test9688.java:17)
 at jrockit.reflect.VirtualNativeMethodInvoker.invoke(
  Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown
Source)
 at java.lang.reflect.Method.invoke (Ljava.lang.Object;[
  Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
 at junit.framework.TestCase.runTest(TestCase.java:154)
 at junit.framework.TestCase.runBare(TestCase.java :127)
 at junit.framework.TestResult$1.protect(TestResult.java:106)
 at junit.framework.TestResult.runProtected(TestResult.java:124)
 at junit.framework.TestResult.run (TestResult.java:109)
 at junit.framework.TestCase.run(TestCase.java:118)
 at junit.framework.TestSuite.runTest(TestSuite.java:208)
 at junit.framework.TestSuite.run (TestSuite.java:203)
 at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
  RemoteTestRunner.java:478)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run (
  RemoteTestRunner.java:344)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
  RemoteTestRunner.java:196)
 
  Harmony: java version 1.5.0 
  pre-alpha : not complete or compatible
  svn = r431938, (Aug 16 2006), Windows/ia32/msvc 1310, release build
  http://incubator.apache.org/harmony
 
  // test passed!
 
  I would suppose that it is RI bug, since spec says:  If the logical
Font
  is a single font then the metrics would be uniform. In this case we
have
  Arial font that is a single physical font on Windows platform and
  according to spec it has to have uniform metrics.
 
 
 
  --
  This message is automatically generated by JIRA.
  -
  If you think it was sent incorrectly contact one of the
administrators:
  

Re: [drlvm] Trouble Building DRLVM

2006-09-19 Thread Geir Magnusson Jr.

On Sep 19, 2006, at 8:37 AM, Ivan Volosyuk wrote:

[SNIP]


 ./java

Harmony Java launcher
Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software
Foundation or its licensors, as applicable.
java [-vm:vmdll -vmdir:dir -D... [-X...]] [args]
./java: relocation error:
/home/ivan/svn/drlvm/trunk/build/lnx_ia32_gcc_debug/deploy/jre/bin/ 
libhyprt.so:

symbol hythrea
d_exit, version HYTHR_0.1 not defined in file libhythr.so with link
time reference

After I have commented out:
  assert(saved_recursion1);


Ok - this is semi-known behavior - the launcher now doesn't do  
anything, um, intelligent if it is invoked w/o an arguments, and  
clearly there's something unpleasant going on when it's just the  
launcher running, probably with our version of the thread library.


I'm going to modify the launcher to pass -help into the VM when  
it's been named java* so that it behaves like the tools that come  
with the Sun's, BEA's and IBM's impelmentation.


IOW, I think that users expect :

./java

. print help here


But we do need to hunt down why it exits so ungracefully - this is a  
good test case showing problems since it's so simple.


geir


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [classlib][build] failure?

2006-09-19 Thread Geir Magnusson Jr.
Really - I think the explanation was totally reasonable.  I didn't  
understand before why it was asymmetric.


On Sep 19, 2006, at 8:40 AM, Mark Hindess wrote:



Well, I was just pointing out a further inconsistency (awt/ 
windows).  I

don't recall when/why linux errors were downgraded so that might have
happened before I started hacking the natives around.

Regards,
 Mark.

On 19 September 2006 at 7:10, Geir Magnusson Jr. [EMAIL PROTECTED]  
wrote:

Ok, good - there's a totally reasonable explanation :)

geir

On Sep 19, 2006, at 7:05 AM, Mark Hindess wrote:



Incidentally, I had to override the default windows flags to turn  
off

the warnings-as-error for the awt native code in order to integrate
it.
I mentioned this on the -dev list at the time hoping to see some
patches
to fix the issues but there haven't been any as yet.

I agree it would be a good thing to fix for all the native code on
both
platforms.

Regards,
 Mark.

On 19 September 2006 at 4:46, Geir Magnusson Jr. [EMAIL PROTECTED]
wrote:
There is no way to get rid of the warnings in our codebase on  
linux?


geir

On Sep 19, 2006, at 4:03 AM, Leo Li wrote:


Hi, Geir:
 The warning level is set to level 3 while the warning as error
option is
off in linux.
 Actually, I would like to set it on in linux since it will  
help me

to pick
some error out, for example, wrongly use pointers. However, I have
tried to
set it on, but some unavoidable warning will lead to a failure in
Harmony
building. Any good idea?:)

Good luck!

On 9/19/06, Geir Magnusson Jr. [EMAIL PROTECTED] wrote:


Lets get these aligned...  I tend to work on linux, so it had no
problem building..

geir

On Sep 18, 2006, at 10:14 PM, Leo Li wrote:


Just comment it out since it is just a warning treated as error.
It compiles successfully and runs well.
Maybe it will not lead to such an error on Linux due to the
configuration of
make rules.:)

Good luck!


On 9/19/06, Spark Shen [EMAIL PROTECTED] wrote:


Hi All:
When building today's(Sep 19, r447671) classlib on window xp, I
got the
following error message:
[exec] main.c
[exec] ..\shared\main.c(628) : error C2220: warning
treated as
error - no o
bject file generated
[exec] ..\shared\main.c(628) : warning C4101: 'jarRunner' :
unreferenced lo
cal variable
[exec] NMAKE : fatal error U1077: 'cl' : return code '0x2'
[exec] Stop.
[exec] NMAKE : fatal error U1077: 'c:\Program Files
\Microsoft
Visual Studi
o .NET 2003\VC7\BIN\nmake.exe' : return code '0x2'
[exec] Stop.

BUILD FAILED
C:\spark\harmony\build.xml:95: The following error occurred  
while

executing this
line:
C:\spark\harmony\make\build-native.xml:75: The following error
occurred
while ex
ecuting this line:
C:\spark\harmony\modules\luni\build.xml:167: The following  
error

occurred while
executing this line:
C:\spark\harmony\make\properties.xml:258: exec returned: 2

Could any one check it?

Best regards

--
Spark Shen
China Software Development Lab, IBM



- 
--

--

Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-

[EMAIL PROTECTED]

For additional commands, e-mail: harmony-dev-
[EMAIL PROTECTED]





--
Leo Li
China Software Development Lab, IBM



- 
--

--
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-
[EMAIL PROTECTED]
For additional commands, e-mail: harmony-dev-
[EMAIL PROTECTED]





--
Leo Li
China Software Development Lab, IBM



--- 
--

Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev- 
[EMAIL PROTECTED]

For additional commands, e-mail: harmony-dev-
[EMAIL PROTECTED]





 
-

Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: harmony-dev- 
[EMAIL PROTECTED]





-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: harmony-dev- 
[EMAIL PROTECTED]






-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] Trouble Building DRLVM

2006-09-19 Thread Geir Magnusson Jr.


On Sep 19, 2006, at 8:56 AM, Ivan Volosyuk wrote:


On 9/19/06, Ivan Volosyuk [EMAIL PROTECTED] wrote:


Harmony Java launcher
Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache  
Software

Foundation or its licensors, as applicable.
java [-vm:vmdll -vmdir:dir -D... [-X...]] [args]
./java: relocation error:
/home/ivan/svn/drlvm/trunk/build/lnx_ia32_gcc_debug/deploy/jre/bin/ 
libhyprt.so:

symbol hythrea
d_exit, version HYTHR_0.1 not defined in file libhythr.so with link
time reference

After I have commented out:
   assert(saved_recursion1);


I've also reproduced the problem with DSO.
Just run 'java' from different directory and will get:
java/lang/UnsatisfiedLinkError : Failed loading library
libhyzlib.so: DSO load failed



I don't see that :)

geir



-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] Trouble Building DRLVM

2006-09-19 Thread Geir Magnusson Jr.


On Sep 19, 2006, at 9:10 AM, Geir Magnusson Jr. wrote:
Ok - this is semi-known behavior - the launcher now doesn't do  
anything, um, intelligent if it is invoked w/o an arguments, and  
clearly there's something unpleasant going on when it's just the  
launcher running, probably with our version of the thread library


To clarify, that output is right if it can't find default.



I'm going to modify the launcher to pass -help into the VM when  
it's been named java* so that it behaves like the tools that come  
with the Sun's, BEA's and IBM's impelmentation.


... if and only if it can find default and there is a  
libharmonyvm.so 


geir

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [jira] Created: (HARMONY-1456) [classlib][awt]java.awt.Font.hasUniformLineMetrics() return true on Harmony while RI returns false

2006-09-19 Thread Oleg Khaschansky

I wanted to say that if RI always returns false then there's very
small probability that any application developed for RI's classlib
uses this.

On 9/19/06, Ilya Okomin [EMAIL PROTECTED] wrote:

On 9/19/06, Oleg Khaschansky [EMAIL PROTECTED]  wrote:

 +1. BTW, I can't imagine the application that could be affected by
 this difference.


It may have sence if the application uses certain metrics for logical fonts
according to the hasUniformLineMetrics() returned value. E.g. baseline
offsets or lines thicknesses may be different for the physical fonts, that
are composing logical font. Probably some applications would use font
metrics if the hasUniformLineMetrics() returned true and use redefined
values for such metrics if returned value is false, depending on the
situation. (It is only a guess;)

Thanks,
Ilya.



 On 9/19/06, Ilya Okomin  [EMAIL PROTECTED] wrote:
  Hi, community!
 
  I found for java.awt.Font.hasUniformLineMetrics() RI returns false for
 all
  fonts (physical/logical) while Harmony returns true for physical and
 false
  for logical.
  Spec says: Checks whether or not this Font has uniform line metrics. A
  logical Font might be a composite font, which means that it is composed
 of
  different physical fonts to cover different code ranges. Each of these
 fonts
  might have different LineMetrics. If the logical Font is a single font
 then
  the metrics would be uniform. . Thus I find reasonable to return true
 for
  physical fonts, as they are single.I assume that it is a non-bug
 difference
  from RI.
  Any thoughts on this issue?
 
  Regards,
  Ilya.
 
 
  On 9/13/06, Ilya Okomin (JIRA)  [EMAIL PROTECTED] wrote:
  
   [classlib][awt]java.awt.Font.hasUniformLineMetrics() return true on
   Harmony while RI returns false
  
  
 
--

  
   Key: HARMONY-1456
   URL: http://issues.apache.org/jira/browse/HARMONY-1456
   Project: Harmony
Issue Type: Bug
Components: Non-bug differences from RI
   Environment: Windows XP
  Reporter: Ilya Okomin
  Priority: Trivial
  
  
   According to the specification method must
 Font.hasUniformLineMetricsreturn true if this Font has uniform
   line metrics; false otherwise.
   RI returns false for physical font Arial while Harmony returns true.

   test.java
   import java.awt.*;
  
   import junit.framework.TestCase;
  
   public class test extends TestCase {
  
  public void testRun() {
  final String name = Arial;
  
  Font f=new Font(name, Font.BOLD, 12);
  
  // Check if created font is physical, it's family name
  // is not logical and equals to the name parameter.
  assertEquals(f.getFamily(), name);
  assertTrue(f.hasUniformLineMetrics());
  }
   }
   ===
  
   Output:
   RI: java version 1.5.0
   Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
   BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32,
   R25.0.0-75, GC: System optimized over throughput (initial strategy
   singleparpar))
  
   junit.framework.AssertionFailedError
  at junit.framework.Assert.fail (Assert.java:47)
  at junit.framework.Assert.assertTrue(Assert.java:20)
  at junit.framework.Assert.assertTrue(Assert.java:27)
  at test.testRun(Test9688.java:17)
  at jrockit.reflect.VirtualNativeMethodInvoker.invoke(
   Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown
 Source)
  at java.lang.reflect.Method.invoke (Ljava.lang.Object;[
   Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
  at junit.framework.TestCase.runTest(TestCase.java:154)
  at junit.framework.TestCase.runBare(TestCase.java :127)
  at junit.framework.TestResult$1.protect(TestResult.java:106)
  at junit.framework.TestResult.runProtected(TestResult.java:124)
  at junit.framework.TestResult.run (TestResult.java:109)
  at junit.framework.TestCase.run(TestCase.java:118)
  at junit.framework.TestSuite.runTest(TestSuite.java:208)
  at junit.framework.TestSuite.run (TestSuite.java:203)
  at
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
   RemoteTestRunner.java:478)
  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run (
   RemoteTestRunner.java:344)
  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
   RemoteTestRunner.java:196)
  
   Harmony: java version 1.5.0 
   pre-alpha : not complete or compatible
   svn = r431938, (Aug 16 2006), Windows/ia32/msvc 1310, release build
   http://incubator.apache.org/harmony
  
   // test passed!
  
   I would suppose that it is RI bug, since spec says:  If the logical
 Font
   is a single font then the metrics would be uniform. In this case 

Re: [classlib][awt] problem w/ AWT on linux? (CaffineMark) Was (Re: [drlvm] When running caffinemark, DRLVM now crashes..)

2006-09-19 Thread Geir Magnusson Jr.

Good catch.

dlopen() returns  null, but the package manager claims xmu is  
installed, so clearly it's lying, or something is misconfigured.


Thanks for the hint.

geir

On Sep 19, 2006, at 6:30 AM, Oleg Khaschansky wrote:


Do you have libxmu? Probably, fails either
void* lib = dlopen(libxmu.so, RTLD_LAZY);
or the corresponding
dlsym(lib, XmuLookupStandardColormap);
Could you, please, check if these dlopen/dlsym return non zero on  
your system?


On 9/19/06, Geir Magnusson Jr [EMAIL PROTECTED] wrote:
Ok, so I was really tired last night when I reported this.  I've  
done a
little more homeork, and I get the same crash with J9.  The stack  
trace

is :


Generated system dump: {default OS core name}

Thread: main (priority 5) (LOCATION OF ERROR)
 NATIVE
org/apache/harmony/awt/nativebridge/linux/ 
X11.XmuLookupStandardColormap(JIJIJII)I

 0080
org/apache/harmony/awt/gl/linux/ 
XGraphicsConfiguration.obtainRGBColorMap()J

 0015
org/apache/harmony/awt/gl/linux/XGraphicsConfiguration.init(Lorg/ 
apache/harmony/awt/gl/linux/XGraphicsDevice

;Lorg/apache/harmony/awt/nativebridge/linux/X11$XVisualInfo;)V
 00aa org/apache/harmony/awt/gl/linux/ 
XGraphicsDevice.createConfigs()V

 0008
org/apache/harmony/awt/gl/linux/XGraphicsDevice.getConfigs()[Lorg/ 
apache/harmony/awt/gl/linux/XGraphicsConfigu

ration;
 0001
org/apache/harmony/awt/gl/linux/ 
XGraphicsDevice.getDefaultConfiguration()Ljava/awt/ 
GraphicsConfiguration;

 000f
java/awt/Window.getGraphicsConfiguration(Ljava/awt/ 
GraphicsConfiguration;)Ljava/awt/GraphicsConfiguration;

 0081
java/awt/Window.init(Ljava/awt/Window;Ljava/awt/ 
GraphicsConfiguration;)V

 0003
java/awt/Frame.init(Ljava/lang/String;Ljava/awt/ 
GraphicsConfiguration;)V

 0003 java/awt/Frame.init(Ljava/lang/String;)V
 0003 CaffeineMarkFrame.init(Ljava/applet/Applet;Z)V
 0006 CaffeineMarkApp.main([Ljava/lang/String;)V


Anyone have any idea?

geir


Geir Magnusson Jr wrote:
 On Ubuntu 6, I was trying to run CaffineMark to see where we are  
w/ the
 lastest set of patches and the big java 5 and other fix patch.   
release

 build, r447024

 top of the stack trace is
  
Java_org_harmony_awt_nativebridge_linux_X11_XmuLookupStandardColormap


 Can anyone repeat this error?

 geir

  
-

 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: harmony-dev- 
[EMAIL PROTECTED]
 For additional commands, e-mail: harmony-dev- 
[EMAIL PROTECTED]





-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: harmony-dev- 
[EMAIL PROTECTED]





-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [classlib][awt] problem w/ AWT on linux? (CaffineMark) Was (Re: [drlvm] When running caffinemark, DRLVM now crashes..)

2006-09-19 Thread Oleg Khaschansky

Probably you need to add it to your LD_LIBRARY_PATH...

On 9/19/06, Geir Magnusson Jr. [EMAIL PROTECTED] wrote:

Good catch.

dlopen() returns  null, but the package manager claims xmu is
installed, so clearly it's lying, or something is misconfigured.

Thanks for the hint.

geir

On Sep 19, 2006, at 6:30 AM, Oleg Khaschansky wrote:

 Do you have libxmu? Probably, fails either
 void* lib = dlopen(libxmu.so, RTLD_LAZY);
 or the corresponding
 dlsym(lib, XmuLookupStandardColormap);
 Could you, please, check if these dlopen/dlsym return non zero on
 your system?

 On 9/19/06, Geir Magnusson Jr [EMAIL PROTECTED] wrote:
 Ok, so I was really tired last night when I reported this.  I've
 done a
 little more homeork, and I get the same crash with J9.  The stack
 trace
 is :


 Generated system dump: {default OS core name}

 Thread: main (priority 5) (LOCATION OF ERROR)
  NATIVE
 org/apache/harmony/awt/nativebridge/linux/
 X11.XmuLookupStandardColormap(JIJIJII)I
  0080
 org/apache/harmony/awt/gl/linux/
 XGraphicsConfiguration.obtainRGBColorMap()J
  0015
 org/apache/harmony/awt/gl/linux/XGraphicsConfiguration.init(Lorg/
 apache/harmony/awt/gl/linux/XGraphicsDevice
 ;Lorg/apache/harmony/awt/nativebridge/linux/X11$XVisualInfo;)V
  00aa org/apache/harmony/awt/gl/linux/
 XGraphicsDevice.createConfigs()V
  0008
 org/apache/harmony/awt/gl/linux/XGraphicsDevice.getConfigs()[Lorg/
 apache/harmony/awt/gl/linux/XGraphicsConfigu
 ration;
  0001
 org/apache/harmony/awt/gl/linux/
 XGraphicsDevice.getDefaultConfiguration()Ljava/awt/
 GraphicsConfiguration;
  000f
 java/awt/Window.getGraphicsConfiguration(Ljava/awt/
 GraphicsConfiguration;)Ljava/awt/GraphicsConfiguration;
  0081
 java/awt/Window.init(Ljava/awt/Window;Ljava/awt/
 GraphicsConfiguration;)V
  0003
 java/awt/Frame.init(Ljava/lang/String;Ljava/awt/
 GraphicsConfiguration;)V
  0003 java/awt/Frame.init(Ljava/lang/String;)V
  0003 CaffeineMarkFrame.init(Ljava/applet/Applet;Z)V
  0006 CaffeineMarkApp.main([Ljava/lang/String;)V


 Anyone have any idea?

 geir


 Geir Magnusson Jr wrote:
  On Ubuntu 6, I was trying to run CaffineMark to see where we are
 w/ the
  lastest set of patches and the big java 5 and other fix patch.
 release
  build, r447024
 
  top of the stack trace is
 
 Java_org_harmony_awt_nativebridge_linux_X11_XmuLookupStandardColormap
 
  Can anyone repeat this error?
 
  geir
 
 
 -
  Terms of use : http://incubator.apache.org/harmony/mailing.html
  To unsubscribe, e-mail: harmony-dev-
 [EMAIL PROTECTED]
  For additional commands, e-mail: harmony-dev-
 [EMAIL PROTECTED]
 
 
 

 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: harmony-dev-
 [EMAIL PROTECTED]



 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] gc.LOS hangs on win32

2006-09-19 Thread Weldon Washburn

On 9/19/06, Geir Magnusson Jr. [EMAIL PROTECTED] wrote:



On Sep 19, 2006, at 2:18 AM, Weldon Washburn wrote:

 All,
 I have noticed endless loop behavior when running gc.LOS.  It
 appears to go
 into some sort of endless loop when I try,  build test.  Does
 anyone else
 see this problem?

 I used MSVC to break into drlvm when it gets stuck.  It shows
 basically
 what's been reported before – a bunch of threads in JITed code.
 They keep
 making some system call.

 Semis/vm/_smoke.tests/reports/gc.LOS_jit.out shows that somehow
 LOS.java is
 in an infinite loop after it prints all 200 dots.  This is rather
 curious.

 Looking at gc/LOS.java, there is a threads[i].join() where i
 goes from 0
 to 199.  This thread join happens immediately after a notifyAll()
 that is
 intended to tell each of the threads to start running.

 I moved the trace(.) to immediately after the synchronized
 statement in
 run().  The test now completes successfully.  It might be a bug in the
 implementation of Object.wait() and Object.notifyAll() that
 different HW/SW
 combinations are aggrevating???   Below are the mods that I made:


I'd not commit this... we need this to help us find what the problem is.



Exactly.  Sorry for not being clearer.  I think it might be a bug in
Object.wait() that we need to find.

geir



--
Weldon Washburn
Intel Middleware Products Division


Re: [drlvm]A subject to profiling instrumenting

2006-09-19 Thread zouqiong

I am curious about a bug in my implementation. I instrumented the
profile code using jet. And I referred that it can`t works with
compress and javac of jvm98.
Today I found out that if I only use jet (-Xem jet), both of the
benchmark can run successfully. While I use jet and opt, it will
error.
Can some experts on jitrino tell me the reason or some way to find out
it. Thanks.



--
Best Regards,
Qiong,Zou

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] Trouble Building DRLVM

2006-09-19 Thread Oliver Deakin

Geir Magnusson Jr. wrote:


On Sep 19, 2006, at 7:46 AM, Egor Pasko wrote:


On the 0x1E9 day of Apache Harmony Ivan Volosyuk wrote:
SNIP!
this one is repaired with this patch:
--- modules/luni/src/main/native/launcher/linux/makefile
(revision 447762)
+++ modules/luni/src/main/native/launcher/linux/makefile
(working copy)

@@ -21,7 +21,7 @@
 BUILDFILES = $(SHAREDSUB)main.o $(SHAREDSUB)cmain.o \
$(SHAREDSUB)launcher_copyright.o $(SHAREDSUB)strbuf.o \
$(SHAREDSUB)libhlp.o
-MDLLIBFILES = $(DLLPATH)libhyprt.so $(DLLPATH)libhythr.so
+MDLLIBFILES = $(DLLPATH)libhyprt.so $(DLLPATH)libhythr.so 
$(DLLPATH)libhysig.so

 EXENAME = $(EXEPATH)java

 include $(HY_HDK)/build/make/rules.mk


So I guess this comes about because we still haven't resolved the dual 
libhythrd problem... and the DRLVM thead library uses hysig (I 
suppose) and the classlib version doesn't, and the drlvm build uses 
the drlvm version both for the launcher and in /default


hmmm - Im not sure this is true. So far I've been using the IBM
VME, and I still get the error on my SLES9 machine:

deploy/jdk/jre/bin/java: error while loading shared libraries: 
libhysig.so: cannot open shared object file: No such file or directory


I cannot launch java unless I set LD_LIBRARY_PATH. Can anyone
else recreate this with J9? Egor (sounds like your system suffers from the
same ailments as mine)?

When I run ldd java I see the same libhysig.so = not found message.
It is only when I rebuild with the $(DLLPATH)libhysig.so in
the launcher makefile that I no longer need to set LD_LIBRARY_PATH.

ld -v gives me 2.15.90.0.1.1, and gcc -v gives 3.3.3, so it looks as if
my configuration is older than yours - perhaps this has something to
do with it...

Regards,
Oliver



I don't understand why it isn't affecting me.   On my box, ld -version 
reports 2.16.91 and gcc -v reports 3.4.6


I'll add this as I don't think there is harm for now

geir



(note: crlf endings in makefile)

--Egor Pasko, Intel Managed Runtime Division


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Oliver Deakin
IBM United Kingdom Limited


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [General VM] GC strategy:how to garbage collect short-lived objects quickly.

2006-09-19 Thread Oliver Deakin

Robin Garner wrote:




I don't understand. How can weak references help short-lived objects 
reclaim?


Really what I'm saying is that this is the closest thing we have to a
hint to GC that objects can be collected soon - but it is not anything
like a proper free() call. There is no immediate reclaim of memory,
just the possibility that it will be reclaimed soon - and the object
may be garbage collected before you are finished with it!

Regards,
Oliver



Actually, it's kind of the other way around isn't it ?  Nulling the 
last pointer to an object tells the GC that it can collect it 
(explicitly in the case of reference counting), whereas having a Weak 
Reference to an object says 'please tell me when on-one else wants 
this object', which results in the object staying around even longer.


Isn't this only the case if you register the WeakReference with a 
ReferenceQueue?
If you do not do that, then the GC can collect the referent when it 
wants, and you will

just get a null back from a get() call on any WeakReference object.
So I imagine that keeping the object weakly reachable and not 
registering it with
a ReferenceQueue says to the GC you are free to collect this referent 
object at the

next collection if you wish.

Regards,
Oliver



cheers,
Robin

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Oliver Deakin
IBM United Kingdom Limited


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] Trouble Building DRLVM

2006-09-19 Thread Ivan Volosyuk

On 9/19/06, Oliver Deakin [EMAIL PROTECTED] wrote:

Geir Magnusson Jr. wrote:

 On Sep 19, 2006, at 7:46 AM, Egor Pasko wrote:

 On the 0x1E9 day of Apache Harmony Ivan Volosyuk wrote:
 SNIP!
 this one is repaired with this patch:
 --- modules/luni/src/main/native/launcher/linux/makefile
 (revision 447762)
 +++ modules/luni/src/main/native/launcher/linux/makefile
 (working copy)
 @@ -21,7 +21,7 @@
  BUILDFILES = $(SHAREDSUB)main.o $(SHAREDSUB)cmain.o \
 $(SHAREDSUB)launcher_copyright.o $(SHAREDSUB)strbuf.o \
 $(SHAREDSUB)libhlp.o
 -MDLLIBFILES = $(DLLPATH)libhyprt.so $(DLLPATH)libhythr.so
 +MDLLIBFILES = $(DLLPATH)libhyprt.so $(DLLPATH)libhythr.so
 $(DLLPATH)libhysig.so
  EXENAME = $(EXEPATH)java

  include $(HY_HDK)/build/make/rules.mk

 So I guess this comes about because we still haven't resolved the dual
 libhythrd problem... and the DRLVM thead library uses hysig (I
 suppose) and the classlib version doesn't, and the drlvm build uses
 the drlvm version both for the launcher and in /default

hmmm - Im not sure this is true. So far I've been using the IBM
VME, and I still get the error on my SLES9 machine:

deploy/jdk/jre/bin/java: error while loading shared libraries:
libhysig.so: cannot open shared object file: No such file or directory

I cannot launch java unless I set LD_LIBRARY_PATH. Can anyone
else recreate this with J9? Egor (sounds like your system suffers from the
same ailments as mine)?

When I run ldd java I see the same libhysig.so = not found message.
It is only when I rebuild with the $(DLLPATH)libhysig.so in
the launcher makefile that I no longer need to set LD_LIBRARY_PATH.

ld -v gives me 2.15.90.0.1.1, and gcc -v gives 3.3.3, so it looks as if
my configuration is older than yours - perhaps this has something to
do with it...

Regards,
Oliver


AFAIU, the fix is already commited. Is it works for you?

[EMAIL PROTECTED] ~/svn/drlvm/trunk/build/lnx_ia32_gcc_debug/deploy/jre/bin
$ ldd java
   linux-gate.so.1 =  (0xe000)
   libhyprt.so =
/home/ivan/svn/drlvm/trunk/build/lnx_ia32_gcc_debug/deploy/jre/bin/libhyprt.so
(0xb7f95000)
   libhythr.so =
/home/ivan/svn/drlvm/trunk/build/lnx_ia32_gcc_debug/deploy/jre/bin/libhythr.so
(0xb7ba9000)
   libhysig.so =
/home/ivan/svn/drlvm/trunk/build/lnx_ia32_gcc_debug/deploy/jre/bin/libhysig.so
(0xb7ba6000)
   libm.so.6 = /lib/libm.so.6 (0xb7b5d000)
   libpthread.so.0 = /lib/libpthread.so.0 (0xb7b4a000)
   libc.so.6 = /lib/libc.so.6 (0xb7a31000)
   libdl.so.2 = /lib/libdl.so.2 (0xb7a2d000)
   librt.so.1 = /lib/librt.so.1 (0xb7a24000)
   /lib/ld-linux.so.2 (0xb7faa000)

--
Ivan




 I don't understand why it isn't affecting me.   On my box, ld -version
 reports 2.16.91 and gcc -v reports 3.4.6

 I'll add this as I don't think there is harm for now

 geir


 (note: crlf endings in makefile)


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [General VM] GC strategy:how to garbage collect short-lived objects quickly.

2006-09-19 Thread Ivan Volosyuk

On 9/19/06, Oliver Deakin [EMAIL PROTECTED] wrote:

Robin Garner wrote:


 I don't understand. How can weak references help short-lived objects
 reclaim?

 Really what I'm saying is that this is the closest thing we have to a
 hint to GC that objects can be collected soon - but it is not anything
 like a proper free() call. There is no immediate reclaim of memory,
 just the possibility that it will be reclaimed soon - and the object
 may be garbage collected before you are finished with it!

 Regards,
 Oliver


 Actually, it's kind of the other way around isn't it ?  Nulling the
 last pointer to an object tells the GC that it can collect it
 (explicitly in the case of reference counting), whereas having a Weak
 Reference to an object says 'please tell me when on-one else wants
 this object', which results in the object staying around even longer.

Isn't this only the case if you register the WeakReference with a
ReferenceQueue?
If you do not do that, then the GC can collect the referent when it
wants, and you will
just get a null back from a get() call on any WeakReference object.
So I imagine that keeping the object weakly reachable and not
registering it with
a ReferenceQueue says to the GC you are free to collect this referent
object at the
next collection if you wish.


It is always better not to have any references to an object in heap
then to have a WeakReference to it. The object without references is
simply garbage, while WeakReference is a kind of reference to it and
require handling - updating on object relocation, zeroing when object
no longer reachable.

You cannot speedup object memory reclaming having WeakReference to it.
--
Regards,
Ivan

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[vmi] showing help text (was: Re: [drlvm] Trouble Building DRLVM)

2006-09-19 Thread Tim Ellison
Geir Magnusson Jr. wrote:
 On Sep 19, 2006, at 8:37 AM, Ivan Volosyuk wrote:
 
 [SNIP]
 
  ./java

 Harmony Java launcher
 Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software
 Foundation or its licensors, as applicable.
 java [-vm:vmdll -vmdir:dir -D... [-X...]] [args]
 ./java: relocation error:
 /home/ivan/svn/drlvm/trunk/build/lnx_ia32_gcc_debug/deploy/jre/bin/libhyprt.so:

 symbol hythrea
 d_exit, version HYTHR_0.1 not defined in file libhythr.so with link
 time reference

 After I have commented out:
   assert(saved_recursion1);
 
 Ok - this is semi-known behavior - the launcher now doesn't do anything,
 um, intelligent if it is invoked w/o an arguments, and clearly there's
 something unpleasant going on when it's just the launcher running,
 probably with our version of the thread library.
 
 I'm going to modify the launcher to pass -help into the VM when it's
 been named java* so that it behaves like the tools that come with the
 Sun's, BEA's and IBM's impelmentation.

As I mentioned before, you if you pass -help or -showversion in the
creation of the IBM or Sun VM you will get an error, e.g.:

  C:\temp\sampletest
  JVMJ9VM007E Command-line option unrecognised: -help
  Failed to create VM with rc=-6.

These command-line flags are handled by the launcher (not the VM).

Since in Harmony there is not a 1:1 correlation of launcher to VM
implementation you will have to either print out generic help in the
launcher (bad) or go for an extension to the VM interface to get/print
help text.

I believe that you could write a useful generic implementation of
version info since VMs put that into system properties.

Regards,
Tim

 IOW, I think that users expect :
 
 ./java
 
 . print help here
 
 
 But we do need to hunt down why it exits so ungracefully - this is a
 good test case showing problems since it's so simple.
 
 geir
 
 
 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-- 

Tim Ellison ([EMAIL PROTECTED])
IBM Java technology centre, UK.

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm]A subject to profiling instrumenting

2006-09-19 Thread Mikhail Fursov

Hi Qiong,
I tried to apply and to build your patch on Windows.
I checked out the revision required by the patch, built the code but had
some problems to run it: the VM crashed at startup. I'll try to build the
patched version on Linux (as you did) and will report soon.

-Xem jet option is default configuration for JET-only mode. No profiling is
done in this mode.
When both JET and OPT compilers work JET does profiling for OPT compiler.
Here is the place you added your code. I think that failure in this mode is
result of the patch.

As far as I understand from the diffs your patch does the following:
1) Calls the new VM helper for every memory access. This helper saves the
trace for every thread separately.
2) Collects some kind of edge profile for blocks in JET. This is OK, but the
way you did it looks unsafe.

My proposal is to increase the code and feature base step by step. I mean
that it's hard to find out the reason of the problem when there are several
features added simultaneously and none of them is stable.
Can we remove the code changes from VM side and leave test JET changes only
first? If you need to track all memory access addresses in JIT we can add an
internal JET helper that dumps addresses to a file. Most of the spec98
benchmarks are single threaded so no TLS support is needed on the early
stage. Once we are sure that tracing feature is implemented in JET properly
we can move the helper body to VM, add TLS support and test the code again.
And only after it's done we can add and test edge profiling support to JET.
What do you think about this plan?

BTW the JIRA 1363 that is already merged to the SVN trunk adds edge profiler
support to the EM. The Edge Profiler is used in OPT only but has a lot of
JIT independent code we can reuse.

--
Mikhail Fursov


Re: [classlib][awt] problem w/ AWT on linux? (CaffineMark) Was (Re: [drlvm] When running caffinemark, DRLVM now crashes..)

2006-09-19 Thread Geir Magnusson Jr.

Nah :)

So the problem was that I have

   /usr/lib/libXmu.so.6

I added a link

  /usr/lib/libXmu.so

and now it wants libgl.so, which I don't have...

On Sep 19, 2006, at 9:23 AM, Oleg Khaschansky wrote:


Probably you need to add it to your LD_LIBRARY_PATH...

On 9/19/06, Geir Magnusson Jr. [EMAIL PROTECTED] wrote:

Good catch.

dlopen() returns  null, but the package manager claims xmu is
installed, so clearly it's lying, or something is misconfigured.

Thanks for the hint.

geir

On Sep 19, 2006, at 6:30 AM, Oleg Khaschansky wrote:

 Do you have libxmu? Probably, fails either
 void* lib = dlopen(libxmu.so, RTLD_LAZY);
 or the corresponding
 dlsym(lib, XmuLookupStandardColormap);
 Could you, please, check if these dlopen/dlsym return non zero on
 your system?

 On 9/19/06, Geir Magnusson Jr [EMAIL PROTECTED] wrote:
 Ok, so I was really tired last night when I reported this.  I've
 done a
 little more homeork, and I get the same crash with J9.  The stack
 trace
 is :


 Generated system dump: {default OS core name}

 Thread: main (priority 5) (LOCATION OF ERROR)
  NATIVE
 org/apache/harmony/awt/nativebridge/linux/
 X11.XmuLookupStandardColormap(JIJIJII)I
  0080
 org/apache/harmony/awt/gl/linux/
 XGraphicsConfiguration.obtainRGBColorMap()J
  0015
 org/apache/harmony/awt/gl/linux/XGraphicsConfiguration.init 
(Lorg/

 apache/harmony/awt/gl/linux/XGraphicsDevice
 ;Lorg/apache/harmony/awt/nativebridge/linux/X11$XVisualInfo;)V
  00aa org/apache/harmony/awt/gl/linux/
 XGraphicsDevice.createConfigs()V
  0008
 org/apache/harmony/awt/gl/linux/XGraphicsDevice.getConfigs()[Lorg/
 apache/harmony/awt/gl/linux/XGraphicsConfigu
 ration;
  0001
 org/apache/harmony/awt/gl/linux/
 XGraphicsDevice.getDefaultConfiguration()Ljava/awt/
 GraphicsConfiguration;
  000f
 java/awt/Window.getGraphicsConfiguration(Ljava/awt/
 GraphicsConfiguration;)Ljava/awt/GraphicsConfiguration;
  0081
 java/awt/Window.init(Ljava/awt/Window;Ljava/awt/
 GraphicsConfiguration;)V
  0003
 java/awt/Frame.init(Ljava/lang/String;Ljava/awt/
 GraphicsConfiguration;)V
  0003 java/awt/Frame.init(Ljava/lang/String;)V
  0003 CaffeineMarkFrame.init(Ljava/applet/Applet;Z)V
  0006 CaffeineMarkApp.main([Ljava/lang/String;)V


 Anyone have any idea?

 geir


 Geir Magnusson Jr wrote:
  On Ubuntu 6, I was trying to run CaffineMark to see where we are
 w/ the
  lastest set of patches and the big java 5 and other fix patch.
 release
  build, r447024
 
  top of the stack trace is
 
  
Java_org_harmony_awt_nativebridge_linux_X11_XmuLookupStandardColormap

 
  Can anyone repeat this error?
 
  geir
 
 
  
-

  Terms of use : http://incubator.apache.org/harmony/mailing.html
  To unsubscribe, e-mail: harmony-dev-
 [EMAIL PROTECTED]
  For additional commands, e-mail: harmony-dev-
 [EMAIL PROTECTED]
 
 
 

  
-

 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: harmony-dev- 
[EMAIL PROTECTED]

 For additional commands, e-mail: harmony-dev-
 [EMAIL PROTECTED]



  
-

 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: harmony-dev- 
[EMAIL PROTECTED]
 For additional commands, e-mail: harmony-dev- 
[EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: harmony-dev- 
[EMAIL PROTECTED]





-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] Trouble Building DRLVM

2006-09-19 Thread Geir Magnusson Jr.


On Sep 19, 2006, at 10:09 AM, Oliver Deakin wrote:


Geir Magnusson Jr. wrote:


On Sep 19, 2006, at 7:46 AM, Egor Pasko wrote:


On the 0x1E9 day of Apache Harmony Ivan Volosyuk wrote:
SNIP!
this one is repaired with this patch:
--- modules/luni/src/main/native/launcher/linux/makefile 
(revision 447762)
+++ modules/luni/src/main/native/launcher/linux/makefile 
(working copy)

@@ -21,7 +21,7 @@
 BUILDFILES = $(SHAREDSUB)main.o $(SHAREDSUB)cmain.o \
$(SHAREDSUB)launcher_copyright.o $(SHAREDSUB)strbuf.o \
$(SHAREDSUB)libhlp.o
-MDLLIBFILES = $(DLLPATH)libhyprt.so $(DLLPATH)libhythr.so
+MDLLIBFILES = $(DLLPATH)libhyprt.so $(DLLPATH)libhythr.so $ 
(DLLPATH)libhysig.so

 EXENAME = $(EXEPATH)java

 include $(HY_HDK)/build/make/rules.mk


So I guess this comes about because we still haven't resolved the  
dual libhythrd problem... and the DRLVM thead library uses hysig  
(I suppose) and the classlib version doesn't, and the drlvm build  
uses the drlvm version both for the launcher and in /default


hmmm - Im not sure this is true. So far I've been using the IBM
VME, and I still get the error on my SLES9 machine:

deploy/jdk/jre/bin/java: error while loading shared libraries:  
libhysig.so: cannot open shared object file: No such file or directory


I cannot launch java unless I set LD_LIBRARY_PATH. Can anyone
else recreate this with J9? Egor (sounds like your system suffers  
from the

same ailments as mine)?

When I run ldd java I see the same libhysig.so = not found  
message.

It is only when I rebuild with the $(DLLPATH)libhysig.so in
the launcher makefile that I no longer need to set LD_LIBRARY_PATH.

ld -v gives me 2.15.90.0.1.1, and gcc -v gives 3.3.3, so it looks  
as if

my configuration is older than yours - perhaps this has something to
do with it...


Keep in mind that the launcher will add the directory of the  
executable to the LD_LIBRARY_PATH and then exec() itself, so it  
should load...  I can't wait to figure this one out...


geir



Regards,
Oliver



I don't understand why it isn't affecting me.   On my box, ld - 
version reports 2.16.91 and gcc -v reports 3.4.6


I'll add this as I don't think there is harm for now

geir



(note: crlf endings in makefile)

--Egor Pasko, Intel Managed Runtime Division


 
-

Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: harmony-dev- 
[EMAIL PROTECTED]





-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: harmony-dev- 
[EMAIL PROTECTED]





--
Oliver Deakin
IBM United Kingdom Limited


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [vmi] showing help text (was: Re: [drlvm] Trouble Building DRLVM)

2006-09-19 Thread Geir Magnusson Jr.


On Sep 19, 2006, at 11:02 AM, Tim Ellison wrote:


Geir Magnusson Jr. wrote:

On Sep 19, 2006, at 8:37 AM, Ivan Volosyuk wrote:

[SNIP]


 ./java

Harmony Java launcher
Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache  
Software

Foundation or its licensors, as applicable.
java [-vm:vmdll -vmdir:dir -D... [-X...]] [args]
./java: relocation error:
/home/ivan/svn/drlvm/trunk/build/lnx_ia32_gcc_debug/deploy/jre/ 
bin/libhyprt.so:


symbol hythrea
d_exit, version HYTHR_0.1 not defined in file libhythr.so with link
time reference

After I have commented out:
  assert(saved_recursion1);


Ok - this is semi-known behavior - the launcher now doesn't do  
anything,
um, intelligent if it is invoked w/o an arguments, and clearly  
there's

something unpleasant going on when it's just the launcher running,
probably with our version of the thread library.

I'm going to modify the launcher to pass -help into the VM when  
it's
been named java* so that it behaves like the tools that come  
with the

Sun's, BEA's and IBM's impelmentation.


As I mentioned before, you if you pass -help or -showversion in  
the

creation of the IBM or Sun VM you will get an error, e.g.:

  C:\temp\sampletest
  JVMJ9VM007E Command-line option unrecognised: -help
  Failed to create VM with rc=-6.

These command-line flags are handled by the launcher (not the VM).


I need to test that for Sun via a launcher, as just doing java - 
help w/ the sun JRE works as expected - it prints help.


Since in Harmony there is not a 1:1 correlation of launcher to VM
implementation you will have to either print out generic help in the
launcher (bad) or go for an extension to the VM interface to get/print
help text.


How about passing -help to the VM?  I don't grok the downside to  
this.  DRLVM works this way now.   that way any localization issues  
are up to the VM provider.


Having the launcher print out help based on the executable name would  
be bad - it has to be some thing else.




I believe that you could write a useful generic implementation of
version info since VMs put that into system properties.


True - we could solve the version problem that way...

geir



Regards,
Tim


IOW, I think that users expect :

./java

. print help here


But we do need to hunt down why it exits so ungracefully - this is a
good test case showing problems since it's so simple.

geir


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: harmony-dev- 
[EMAIL PROTECTED]





--

Tim Ellison ([EMAIL PROTECTED])
IBM Java technology centre, UK.

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [General VM] GC strategy:how to garbage collect short-lived objects quickly.

2006-09-19 Thread Oliver Deakin

Ivan Volosyuk wrote:

On 9/19/06, Oliver Deakin [EMAIL PROTECTED] wrote:

Robin Garner wrote:


 I don't understand. How can weak references help short-lived objects
 reclaim?

 Really what I'm saying is that this is the closest thing we have to a
 hint to GC that objects can be collected soon - but it is not 
anything

 like a proper free() call. There is no immediate reclaim of memory,
 just the possibility that it will be reclaimed soon - and the object
 may be garbage collected before you are finished with it!

 Regards,
 Oliver


 Actually, it's kind of the other way around isn't it ?  Nulling the
 last pointer to an object tells the GC that it can collect it
 (explicitly in the case of reference counting), whereas having a Weak
 Reference to an object says 'please tell me when on-one else wants
 this object', which results in the object staying around even longer.

Isn't this only the case if you register the WeakReference with a
ReferenceQueue?
If you do not do that, then the GC can collect the referent when it
wants, and you will
just get a null back from a get() call on any WeakReference object.
So I imagine that keeping the object weakly reachable and not
registering it with
a ReferenceQueue says to the GC you are free to collect this referent
object at the
next collection if you wish.


It is always better not to have any references to an object in heap
then to have a WeakReference to it. 


Yup, agreed!


The object without references is
simply garbage, while WeakReference is a kind of reference to it and
require handling - updating on object relocation, zeroing when object
no longer reachable.


Agreed - but I wasn't comparing it to an object with no references. I was
merely saying that rather than having a strong reference to a very short
lived object, that will definitely not be garbage collected until the strong
reference goes out of scope or is explicitly nullified, having only 
WeakReferences
to the object could allow it to be collected ealier. I know it's not 
guaranteed,
but there is a possibility. It's also probably not the best thing to do 
- it was

just a comment on the ability to have short lived objects gc'ed earlier :)

Regards,
Oliver



You cannot speedup object memory reclaming having WeakReference to it.
--
Regards,
Ivan

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Oliver Deakin
IBM United Kingdom Limited


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] Trouble Building DRLVM

2006-09-19 Thread Oliver Deakin

Ivan Volosyuk wrote:

On 9/19/06, Oliver Deakin [EMAIL PROTECTED] wrote:

Geir Magnusson Jr. wrote:

 On Sep 19, 2006, at 7:46 AM, Egor Pasko wrote:

 On the 0x1E9 day of Apache Harmony Ivan Volosyuk wrote:
 SNIP!
 this one is repaired with this patch:
 --- modules/luni/src/main/native/launcher/linux/makefile
 (revision 447762)
 +++ modules/luni/src/main/native/launcher/linux/makefile
 (working copy)
 @@ -21,7 +21,7 @@
  BUILDFILES = $(SHAREDSUB)main.o $(SHAREDSUB)cmain.o \
 $(SHAREDSUB)launcher_copyright.o $(SHAREDSUB)strbuf.o \
 $(SHAREDSUB)libhlp.o
 -MDLLIBFILES = $(DLLPATH)libhyprt.so $(DLLPATH)libhythr.so
 +MDLLIBFILES = $(DLLPATH)libhyprt.so $(DLLPATH)libhythr.so
 $(DLLPATH)libhysig.so
  EXENAME = $(EXEPATH)java

  include $(HY_HDK)/build/make/rules.mk

 So I guess this comes about because we still haven't resolved the dual
 libhythrd problem... and the DRLVM thead library uses hysig (I
 suppose) and the classlib version doesn't, and the drlvm build uses
 the drlvm version both for the launcher and in /default

hmmm - Im not sure this is true. So far I've been using the IBM
VME, and I still get the error on my SLES9 machine:

deploy/jdk/jre/bin/java: error while loading shared libraries:
libhysig.so: cannot open shared object file: No such file or directory

I cannot launch java unless I set LD_LIBRARY_PATH. Can anyone
else recreate this with J9? Egor (sounds like your system suffers 
from the

same ailments as mine)?

When I run ldd java I see the same libhysig.so = not found message.
It is only when I rebuild with the $(DLLPATH)libhysig.so in
the launcher makefile that I no longer need to set LD_LIBRARY_PATH.

ld -v gives me 2.15.90.0.1.1, and gcc -v gives 3.3.3, so it looks as if
my configuration is older than yours - perhaps this has something to
do with it...

Regards,
Oliver


AFAIU, the fix is already commited. Is it works for you?


Yup, the fix works for me:

linux-gate.so.1 =  (0xe000)
   libhyprt.so = 
/harmony/svn-checkouts/test/deploy/jdk/jre/bin/libhyprt.so (0x40018000)
   libhythr.so = 
/harmony/svn-checkouts/test/deploy/jdk/jre/bin/libhythr.so (0x40035000)
   libhysig.so = 
/harmony/svn-checkouts/test/deploy/jdk/jre/bin/libhysig.so (0x4003d000)

   libm.so.6 = /lib/tls/libm.so.6 (0x4005)
   libpthread.so.0 = /lib/tls/libpthread.so.0 (0x40072000)
   libc.so.6 = /lib/tls/libc.so.6 (0x40082000)
   libdl.so.2 = /lib/libdl.so.2 (0x4019c000)
   /lib/ld-linux.so.2 (0x4000)

Regards,
Oliver



[EMAIL PROTECTED] ~/svn/drlvm/trunk/build/lnx_ia32_gcc_debug/deploy/jre/bin
$ ldd java
   linux-gate.so.1 =  (0xe000)
   libhyprt.so =
/home/ivan/svn/drlvm/trunk/build/lnx_ia32_gcc_debug/deploy/jre/bin/libhyprt.so 


(0xb7f95000)
   libhythr.so =
/home/ivan/svn/drlvm/trunk/build/lnx_ia32_gcc_debug/deploy/jre/bin/libhythr.so 


(0xb7ba9000)
   libhysig.so =
/home/ivan/svn/drlvm/trunk/build/lnx_ia32_gcc_debug/deploy/jre/bin/libhysig.so 


(0xb7ba6000)
   libm.so.6 = /lib/libm.so.6 (0xb7b5d000)
   libpthread.so.0 = /lib/libpthread.so.0 (0xb7b4a000)
   libc.so.6 = /lib/libc.so.6 (0xb7a31000)
   libdl.so.2 = /lib/libdl.so.2 (0xb7a2d000)
   librt.so.1 = /lib/librt.so.1 (0xb7a24000)
   /lib/ld-linux.so.2 (0xb7faa000)

--
Ivan




 I don't understand why it isn't affecting me.   On my box, ld -version
 reports 2.16.91 and gcc -v reports 3.4.6

 I'll add this as I don't think there is harm for now

 geir


 (note: crlf endings in makefile)


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Oliver Deakin
IBM United Kingdom Limited


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [General VM] GC strategy:how to garbage collect short-lived objects quickly.

2006-09-19 Thread Ivan Volosyuk

On 9/19/06, Oliver Deakin [EMAIL PROTECTED] wrote:

Ivan Volosyuk wrote:
 On 9/19/06, Oliver Deakin [EMAIL PROTECTED] wrote:
 Robin Garner wrote:
 
 
  I don't understand. How can weak references help short-lived objects
  reclaim?
 
  Really what I'm saying is that this is the closest thing we have to a
  hint to GC that objects can be collected soon - but it is not
 anything
  like a proper free() call. There is no immediate reclaim of memory,
  just the possibility that it will be reclaimed soon - and the object
  may be garbage collected before you are finished with it!
 
  Regards,
  Oliver
 
 
  Actually, it's kind of the other way around isn't it ?  Nulling the
  last pointer to an object tells the GC that it can collect it
  (explicitly in the case of reference counting), whereas having a Weak
  Reference to an object says 'please tell me when on-one else wants
  this object', which results in the object staying around even longer.

 Isn't this only the case if you register the WeakReference with a
 ReferenceQueue?
 If you do not do that, then the GC can collect the referent when it
 wants, and you will
 just get a null back from a get() call on any WeakReference object.
 So I imagine that keeping the object weakly reachable and not
 registering it with
 a ReferenceQueue says to the GC you are free to collect this referent
 object at the
 next collection if you wish.

 It is always better not to have any references to an object in heap
 then to have a WeakReference to it.

Yup, agreed!

 The object without references is
 simply garbage, while WeakReference is a kind of reference to it and
 require handling - updating on object relocation, zeroing when object
 no longer reachable.

Agreed - but I wasn't comparing it to an object with no references. I was
merely saying that rather than having a strong reference to a very short
lived object, that will definitely not be garbage collected until the strong
reference goes out of scope or is explicitly nullified, having only
WeakReferences
to the object could allow it to be collected ealier. I know it's not
guaranteed,
but there is a possibility. It's also probably not the best thing to do
- it was
just a comment on the ability to have short lived objects gc'ed earlier :)


Well, Oliver, if you have a strong reference to short-lived object,
you have it for a reason. This means that you do some actions with it.
It will be a failure when the reference to the object suddenly become
a null reference (what is normal for WeakReference). If you no longer
need that object - that means the live of it has just come to an end.
Short live :)

After that, no more need for WeakReference to the object. Before that,
hard reference is required by the algorithm used. There is no place
here for WeakReference.

May be I don't understand your point here. I don't see a way how
WeakReference can be used together with short lived objects.

--
Best regards,
Ivan

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [classlib][awt] problem w/ AWT on linux? (CaffineMark) Was (Re: [drlvm] When running caffinemark, DRLVM now crashes..)

2006-09-19 Thread Oleg Khaschansky

So you need to build with -Dwith.awt.swing=true then...

On 9/19/06, Geir Magnusson Jr. [EMAIL PROTECTED] wrote:

Nah :)

So the problem was that I have

/usr/lib/libXmu.so.6

I added a link

   /usr/lib/libXmu.so

and now it wants libgl.so, which I don't have...

On Sep 19, 2006, at 9:23 AM, Oleg Khaschansky wrote:

 Probably you need to add it to your LD_LIBRARY_PATH...

 On 9/19/06, Geir Magnusson Jr. [EMAIL PROTECTED] wrote:
 Good catch.

 dlopen() returns  null, but the package manager claims xmu is
 installed, so clearly it's lying, or something is misconfigured.

 Thanks for the hint.

 geir

 On Sep 19, 2006, at 6:30 AM, Oleg Khaschansky wrote:

  Do you have libxmu? Probably, fails either
  void* lib = dlopen(libxmu.so, RTLD_LAZY);
  or the corresponding
  dlsym(lib, XmuLookupStandardColormap);
  Could you, please, check if these dlopen/dlsym return non zero on
  your system?
 
  On 9/19/06, Geir Magnusson Jr [EMAIL PROTECTED] wrote:
  Ok, so I was really tired last night when I reported this.  I've
  done a
  little more homeork, and I get the same crash with J9.  The stack
  trace
  is :
 
 
  Generated system dump: {default OS core name}
 
  Thread: main (priority 5) (LOCATION OF ERROR)
   NATIVE
  org/apache/harmony/awt/nativebridge/linux/
  X11.XmuLookupStandardColormap(JIJIJII)I
   0080
  org/apache/harmony/awt/gl/linux/
  XGraphicsConfiguration.obtainRGBColorMap()J
   0015
  org/apache/harmony/awt/gl/linux/XGraphicsConfiguration.init
 (Lorg/
  apache/harmony/awt/gl/linux/XGraphicsDevice
  ;Lorg/apache/harmony/awt/nativebridge/linux/X11$XVisualInfo;)V
   00aa org/apache/harmony/awt/gl/linux/
  XGraphicsDevice.createConfigs()V
   0008
  org/apache/harmony/awt/gl/linux/XGraphicsDevice.getConfigs()[Lorg/
  apache/harmony/awt/gl/linux/XGraphicsConfigu
  ration;
   0001
  org/apache/harmony/awt/gl/linux/
  XGraphicsDevice.getDefaultConfiguration()Ljava/awt/
  GraphicsConfiguration;
   000f
  java/awt/Window.getGraphicsConfiguration(Ljava/awt/
  GraphicsConfiguration;)Ljava/awt/GraphicsConfiguration;
   0081
  java/awt/Window.init(Ljava/awt/Window;Ljava/awt/
  GraphicsConfiguration;)V
   0003
  java/awt/Frame.init(Ljava/lang/String;Ljava/awt/
  GraphicsConfiguration;)V
   0003 java/awt/Frame.init(Ljava/lang/String;)V
   0003 CaffeineMarkFrame.init(Ljava/applet/Applet;Z)V
   0006 CaffeineMarkApp.main([Ljava/lang/String;)V
 
 
  Anyone have any idea?
 
  geir
 
 
  Geir Magnusson Jr wrote:
   On Ubuntu 6, I was trying to run CaffineMark to see where we are
  w/ the
   lastest set of patches and the big java 5 and other fix patch.
  release
   build, r447024
  
   top of the stack trace is
  
 
 Java_org_harmony_awt_nativebridge_linux_X11_XmuLookupStandardColormap
  
   Can anyone repeat this error?
  
   geir
  
  
 
 -
   Terms of use : http://incubator.apache.org/harmony/mailing.html
   To unsubscribe, e-mail: harmony-dev-
  [EMAIL PROTECTED]
   For additional commands, e-mail: harmony-dev-
  [EMAIL PROTECTED]
  
  
  
 
 
 -
  Terms of use : http://incubator.apache.org/harmony/mailing.html
  To unsubscribe, e-mail: harmony-dev-
 [EMAIL PROTECTED]
  For additional commands, e-mail: harmony-dev-
  [EMAIL PROTECTED]
 
 
 
 
 -
  Terms of use : http://incubator.apache.org/harmony/mailing.html
  To unsubscribe, e-mail: harmony-dev-
 [EMAIL PROTECTED]
  For additional commands, e-mail: harmony-dev-
 [EMAIL PROTECTED]
 


 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: harmony-dev-
 [EMAIL PROTECTED]



 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [classlib][awt] problem w/ AWT on linux? (CaffineMark) Was (Re: [drlvm] When running caffinemark, DRLVM now crashes..)

2006-09-19 Thread Geir Magnusson Jr.

I thought I did.

Thx - retrying...


On Sep 19, 2006, at 12:17 PM, Oleg Khaschansky wrote:


So you need to build with -Dwith.awt.swing=true then...

On 9/19/06, Geir Magnusson Jr. [EMAIL PROTECTED] wrote:

Nah :)

So the problem was that I have

/usr/lib/libXmu.so.6

I added a link

   /usr/lib/libXmu.so

and now it wants libgl.so, which I don't have...

On Sep 19, 2006, at 9:23 AM, Oleg Khaschansky wrote:

 Probably you need to add it to your LD_LIBRARY_PATH...

 On 9/19/06, Geir Magnusson Jr. [EMAIL PROTECTED] wrote:
 Good catch.

 dlopen() returns  null, but the package manager claims xmu is
 installed, so clearly it's lying, or something is misconfigured.

 Thanks for the hint.

 geir

 On Sep 19, 2006, at 6:30 AM, Oleg Khaschansky wrote:

  Do you have libxmu? Probably, fails either
  void* lib = dlopen(libxmu.so, RTLD_LAZY);
  or the corresponding
  dlsym(lib, XmuLookupStandardColormap);
  Could you, please, check if these dlopen/dlsym return non  
zero on

  your system?
 
  On 9/19/06, Geir Magnusson Jr [EMAIL PROTECTED] wrote:
  Ok, so I was really tired last night when I reported this.   
I've

  done a
  little more homeork, and I get the same crash with J9.  The  
stack

  trace
  is :
 
 
  Generated system dump: {default OS core name}
 
  Thread: main (priority 5) (LOCATION OF ERROR)
   NATIVE
  org/apache/harmony/awt/nativebridge/linux/
  X11.XmuLookupStandardColormap(JIJIJII)I
   0080
  org/apache/harmony/awt/gl/linux/
  XGraphicsConfiguration.obtainRGBColorMap()J
   0015
  org/apache/harmony/awt/gl/linux/XGraphicsConfiguration.init
 (Lorg/
  apache/harmony/awt/gl/linux/XGraphicsDevice
  ;Lorg/apache/harmony/awt/nativebridge/linux/X11$XVisualInfo;)V
   00aa org/apache/harmony/awt/gl/linux/
  XGraphicsDevice.createConfigs()V
   0008
  org/apache/harmony/awt/gl/linux/XGraphicsDevice.getConfigs() 
[Lorg/

  apache/harmony/awt/gl/linux/XGraphicsConfigu
  ration;
   0001
  org/apache/harmony/awt/gl/linux/
  XGraphicsDevice.getDefaultConfiguration()Ljava/awt/
  GraphicsConfiguration;
   000f
  java/awt/Window.getGraphicsConfiguration(Ljava/awt/
  GraphicsConfiguration;)Ljava/awt/GraphicsConfiguration;
   0081
  java/awt/Window.init(Ljava/awt/Window;Ljava/awt/
  GraphicsConfiguration;)V
   0003
  java/awt/Frame.init(Ljava/lang/String;Ljava/awt/
  GraphicsConfiguration;)V
   0003 java/awt/Frame.init(Ljava/lang/String;)V
   0003 CaffeineMarkFrame.init(Ljava/applet/Applet;Z)V
   0006 CaffeineMarkApp.main([Ljava/lang/String;)V
 
 
  Anyone have any idea?
 
  geir
 
 
  Geir Magnusson Jr wrote:
   On Ubuntu 6, I was trying to run CaffineMark to see where  
we are

  w/ the
   lastest set of patches and the big java 5 and other fix  
patch.

  release
   build, r447024
  
   top of the stack trace is
  
 
  
Java_org_harmony_awt_nativebridge_linux_X11_XmuLookupStandardColormap

  
   Can anyone repeat this error?
  
   geir
  
  
 
  
-
   Terms of use : http://incubator.apache.org/harmony/ 
mailing.html

   To unsubscribe, e-mail: harmony-dev-
  [EMAIL PROTECTED]
   For additional commands, e-mail: harmony-dev-
  [EMAIL PROTECTED]
  
  
  
 
 
  
-

  Terms of use : http://incubator.apache.org/harmony/mailing.html
  To unsubscribe, e-mail: harmony-dev-
 [EMAIL PROTECTED]
  For additional commands, e-mail: harmony-dev-
  [EMAIL PROTECTED]
 
 
 
 
  
-

  Terms of use : http://incubator.apache.org/harmony/mailing.html
  To unsubscribe, e-mail: harmony-dev-
 [EMAIL PROTECTED]
  For additional commands, e-mail: harmony-dev-
 [EMAIL PROTECTED]
 


  
-

 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: harmony-dev- 
[EMAIL PROTECTED]

 For additional commands, e-mail: harmony-dev-
 [EMAIL PROTECTED]



  
-

 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: harmony-dev- 
[EMAIL PROTECTED]
 For additional commands, e-mail: harmony-dev- 
[EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: harmony-dev- 
[EMAIL PROTECTED]





-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL 

Re: [drlvm] gc.LOS hangs on win32

2006-09-19 Thread Ivan Volosyuk

On 9/19/06, Weldon Washburn [EMAIL PROTECTED] wrote:

On 9/19/06, Geir Magnusson Jr. [EMAIL PROTECTED] wrote:


 On Sep 19, 2006, at 2:18 AM, Weldon Washburn wrote:

  All,
  I have noticed endless loop behavior when running gc.LOS.  It
  appears to go
  into some sort of endless loop when I try,  build test.  Does
  anyone else
  see this problem?
 
  I used MSVC to break into drlvm when it gets stuck.  It shows
  basically
  what's been reported before – a bunch of threads in JITed code.
  They keep
  making some system call.
 
  Semis/vm/_smoke.tests/reports/gc.LOS_jit.out shows that somehow
  LOS.java is
  in an infinite loop after it prints all 200 dots.  This is rather
  curious.
 
  Looking at gc/LOS.java, there is a threads[i].join() where i
  goes from 0
  to 199.  This thread join happens immediately after a notifyAll()
  that is
  intended to tell each of the threads to start running.
 
  I moved the trace(.) to immediately after the synchronized
  statement in
  run().  The test now completes successfully.  It might be a bug in the
  implementation of Object.wait() and Object.notifyAll() that
  different HW/SW
  combinations are aggrevating???   Below are the mods that I made:
 

 I'd not commit this... we need this to help us find what the problem is.


Exactly.  Sorry for not being clearer.  I think it might be a bug in
Object.wait() that we need to find.


Did you run gc.LOS as a part of 'build test' or separatly? I'm going
to get close to the problem, but I'm stuck with other tests which
fails for me before this one.

--
Ivan

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [vmi] showing help text

2006-09-19 Thread Tim Ellison
Geir Magnusson Jr. wrote:
 On Sep 19, 2006, at 11:02 AM, Tim Ellison wrote:
 Geir Magnusson Jr. wrote:
snip
 I'm going to modify the launcher to pass -help into the VM when it's
 been named java* so that it behaves like the tools that come with the
 Sun's, BEA's and IBM's impelmentation.

 As I mentioned before, you if you pass -help or -showversion in the
 creation of the IBM or Sun VM you will get an error, e.g.:

   C:\temp\sampletest
   JVMJ9VM007E Command-line option unrecognised: -help
   Failed to create VM with rc=-6.

 These command-line flags are handled by the launcher (not the VM).
 
 I need to test that for Sun via a launcher, as just doing java -help
 w/ the sun JRE works as expected - it prints help.

Sun's VM (1.5.0_06) does the same thing:
  C:\temp\sampletest
  Unrecognized option: -help
  Failed to create VM with rc=-1.

BTW I'm using the test program I posted here, but passing in -help:
http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200609.mbox/[EMAIL
 PROTECTED]

 Since in Harmony there is not a 1:1 correlation of launcher to VM
 implementation you will have to either print out generic help in the
 launcher (bad) or go for an extension to the VM interface to get/print
 help text.
 
 How about passing -help to the VM?  I don't grok the downside to this. 
 DRLVM works this way now.   that way any localization issues are up to
 the VM provider.

I'm just pointing out that not all VMs will grok that option, so the
launcher should not assume they will.

We can add a requirement to the VMI that VMs can answer/print their help
text, but right now we have no such thing.  Existing VMs will fail to
initialize (unless you set ignoreUnrecognized, in which case you won't
get help text of course).

 Having the launcher print out help based on the executable name would be
 bad - it has to be some thing else.

I don't see that we could do that anyway, since the launcher is always
java.exe, and different VMs will have different help text.

Regards,
Tim

 I believe that you could write a useful generic implementation of
 version info since VMs put that into system properties.
 
 True - we could solve the version problem that way...
 
 geir
 

 Regards,
 Tim

 IOW, I think that users expect :

 ./java

 . print help here


 But we do need to hunt down why it exits so ungracefully - this is a
 good test case showing problems since it's so simple.

 geir


 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -- 
 Tim Ellison ([EMAIL PROTECTED])
 IBM Java technology centre, UK.

 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 
 
 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-- 

Tim Ellison ([EMAIL PROTECTED])
IBM Java technology centre, UK.

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm][classlib] thread library - let there be one!

2006-09-19 Thread Ivan Volosyuk

Looks like a matter of relations, how the classlib and VM relates to each other.

Either VM and classlib independant, then we need something to be
common base for them - portlib. If VM links with classlib, then no
more need for portlib, just well understood interfaces provided by
classlib's HDK. If classlib links with VM, then it is the VM who
should provide this interfaces :)

--
Ivan

On 9/19/06, Artem Aliev [EMAIL PROTECTED] wrote:

Gier,

The hythread is just most visible example.
There are also signal handling problem.
classlib hysig lib setup signal handlers and then drlvm overrides them
by its owns.
There are code duplication in classlib hyprt.dll drlvm port.lib:
classlib/trunk/modules/luni/src/main/native/port
vm/port/src

These three pair of components contains significant part of the system
dependent code for both VM and CLASSLIB.
I think, all this code naturally defines portlib component that could
be shared between classlib and VMs.
So, as a first step, we could move all this code in to the one place,
name portlib
to have three directories classlib, drlvm, portlib.

As the second step, the pairs of libraries should be merged and the
classlib and drlvm refactoried to have only 3 lib instead of 6.

The 3rd step is to replace most of the functions with APR ones and
move the rest of the code to the APR.

Thoughts?

Thanks
Artem






On 9/19/06, Geir Magnusson Jr. [EMAIL PROTECTED] wrote:
 All,

 we need to put this issue to bed, as we're tripping over it, it seems.

 Any thoughts on how to move forward on this?

 geir


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [vmi] showing help text

2006-09-19 Thread Geir Magnusson Jr.


On Sep 19, 2006, at 12:24 PM, Tim Ellison wrote:


Geir Magnusson Jr. wrote:

On Sep 19, 2006, at 11:02 AM, Tim Ellison wrote:

Geir Magnusson Jr. wrote:

snip
I'm going to modify the launcher to pass -help into the VM  
when it's
been named java* so that it behaves like the tools that come  
with the

Sun's, BEA's and IBM's impelmentation.


As I mentioned before, you if you pass -help or -showversion  
in the

creation of the IBM or Sun VM you will get an error, e.g.:

  C:\temp\sampletest
  JVMJ9VM007E Command-line option unrecognised: -help
  Failed to create VM with rc=-6.

These command-line flags are handled by the launcher (not the VM).


I need to test that for Sun via a launcher, as just doing java - 
help

w/ the sun JRE works as expected - it prints help.


Sun's VM (1.5.0_06) does the same thing:
  C:\temp\sampletest
  Unrecognized option: -help
  Failed to create VM with rc=-1.

BTW I'm using the test program I posted here, but passing in -help:
http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/ 
200609.mbox/[EMAIL PROTECTED]


Why would one even want to launch Sun this way?  I mean, I figure the  
lack of support of our classlibrary would be a bigger obstacle to use  
than simply not supporting -help





Since in Harmony there is not a 1:1 correlation of launcher to VM
implementation you will have to either print out generic help in the
launcher (bad) or go for an extension to the VM interface to get/ 
print

help text.


How about passing -help to the VM?  I don't grok the downside to  
this.
DRLVM works this way now.   that way any localization issues are  
up to

the VM provider.


I'm just pointing out that not all VMs will grok that option, so the
launcher should not assume they will.



Agreed.  But our launcher is for Harmony, and there are already a  
bunch of pre-reqs...


We can add a requirement to the VMI that VMs can answer/print their  
help

text, but right now we have no such thing.  Existing VMs will fail to
initialize (unless you set ignoreUnrecognized, in which case you won't
get help text of course).


I'm still confused.  When you say existing VMs. you mean J9?   
Because besides DRLVM, there are no others that work w/ the launcher...




Having the launcher print out help based on the executable name  
would be

bad - it has to be some thing else.


I don't see that we could do that anyway, since the launcher is always
java.exe, and different VMs will have different help text.


Right.

What I mean is some scheme where we base help text on exe name, like  
javac java javah etc...


So to try to drive this to conclusion, I don't get it - what would be  
wrong with adding supports all options passed through the launcher  
except vmdir: and vm: to our list of things that a harmony- 
supporting VM does?


geir



Regards,
Tim


I believe that you could write a useful generic implementation of
version info since VMs put that into system properties.


True - we could solve the version problem that way...

geir



Regards,
Tim


IOW, I think that users expect :

./java

. print help here


But we do need to hunt down why it exits so ungracefully - this  
is a

good test case showing problems since it's so simple.

geir


--- 
--

Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev- 
[EMAIL PROTECTED]
For additional commands, e-mail: harmony-dev- 
[EMAIL PROTECTED]





--
Tim Ellison ([EMAIL PROTECTED])
IBM Java technology centre, UK.

 
-

Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: harmony-dev- 
[EMAIL PROTECTED]





-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: harmony-dev- 
[EMAIL PROTECTED]





--

Tim Ellison ([EMAIL PROTECTED])
IBM Java technology centre, UK.

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[classlib][beans] RI violates the spec in DefaultPersistenceDelegate

2006-09-19 Thread Alexei Zakharov

to whom it may concern
Greetings to Harmony java beans experts.

It seems I found another place where RI fails. The behavior of its
java.beans.DefaultPersistenceDelegate#DefaultPersistenceDelegate(String[])
IMHO violates at least the following part of the spec (JavaBeans spec
v1.01 page 57):

--
8.7. Analyzing a Bean

 We allow both explicit specification of a bean's exposed
properties/methods/events and also implicit analysis using design
patterns.
 To simplify access to this information, and to make sure that all
tools apply the same analysis rules, we provide a class
java.beans.Introspector that should be used to analyze a bean class.
It allows you to obtain a BeanInfo object that comprehensively
describes a target bean class.
 The Introspector class walks over the class/superclass chain of the
target class. At each level it checks if there is a matching BeanInfo
class which provides explicit information about the bean, and if so
uses that explicit information. Otherwise it uses the low level
reflection APIs to study the target class and uses design patterns to
analyze its behaviour and then proceeds to continue the introspection
with its baseclass. (See the Introspector class definition for a full
description of the analysis rules.)
--

The test below illustrates that RI does not care about explicitly
specified BeanInfo class and uses the reflection API instead. Please
note that our implementation behaves correctly in this situation. This
is the reason why some tests from DefaultPersistenceDelegateTest fail
- they are optimized for this RI behavior.
The test case:
---
import java.beans.*;

public class DefaultPDtest {

   public static class MyFoo {
   String ugh;

   public MyFoo(String str) {
   ugh = str;
   }

   public String myget() {
   return ugh;
   }

   public void myset(String val) {
   ugh = val;
   }
   }

   public static class MyFooBeanInfo extends SimpleBeanInfo {
   public PropertyDescriptor[] getPropertyDescriptors() {
   PropertyDescriptor pd;

   try {
   pd = new PropertyDescriptor(prop1,
   MyFoo.class, myget, myset);
   } catch (IntrospectionException e) {
   throw new RuntimeException(e);
   }
   return new PropertyDescriptor[] { pd };
   }
   }

   public static class MyPersistenceDelegate
   extends DefaultPersistenceDelegate {
   public MyPersistenceDelegate(String[] propNames) {
   super(propNames);
   }

   protected Expression instantiate(Object oldInstance, Encoder out) {
   return super.instantiate(oldInstance, out);
   }
   }

   public static void main(String argv[]) {
   Encoder enc = new Encoder();
   MyPersistenceDelegate pd;
   MyFoo oldBean = new MyFoo(harmony);
   Expression expr;

   System.out.println(Test1: arg should be \harmony\);
   pd = new MyPersistenceDelegate(new String[] {prop1});
   expr = pd.instantiate(oldBean, enc);
   System.out.println(Constructor to call:  + expr);

   System.out.println(Test2: arg should be null);
   pd = new MyPersistenceDelegate(new String[] {ugh});
   expr = pd.instantiate(oldBean, enc);
   System.out.println(Constructor to call:  + expr);

   }

}

Output on RI (Sun 1.5.0_06):
---
Test1: arg should be harmony
java.lang.NoSuchMethodException: DefaultPDtest$MyFoo.getProp1
Continuing ...
Constructor to call: DefaultPDtest$MyFoo=Class.new(null);
Test2: arg should be null
Constructor to call: DefaultPDtest$MyFoo=Class.new(harmony);

Output on Harmony (current):
---
Test1: arg should be harmony
Constructor to call: DefaultPDtest$MyFoo=Class.new(harmony);
Test2: arg should be null
class java.lang.NoSuchMethodException: no property for name ugh is found
Constructor to call: DefaultPDtest$MyFoo=Class.new(null);

I vote for ignoring RI and following the spec here.
Thanks for your attention,


--
Alexei Zakharov,
Intel Middleware Product Division

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



question about support for compressed StringBuffers

2006-09-19 Thread Craig Zilles


	I noticed in the file trunk/vm/vmcore/src/util/vm_strings.cpp there  
is some code to support the storage of strings in arrays of (8b)  
bytes rather than arrays of (16b) unsigned shorts.  In the debugger,  
I placed breakpoints in this code, and it was never active in my run.


	Can someone tell me the current status of this code and, if it is  
active, how I can turn it on?  (From inspecting the source, it looked  
inactive via hardcoding false on whether to compress the strings).   
I might be interested in working on this code.



- Craig


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[drlvm] Problem with running DRLVM on Fedora Core 5

2006-09-19 Thread YangTing
hi,

   I checked out the lates classlib and drlvm source tree last night. I was 
able to build drlvm successfully. However, I encountered the following error 
when I tried to run DRLVM:

$ java
   Harmony Java launcher
   Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software 
Foundation or its licensors, as applicable.
   java [-vm:vmdll -vmdir:dir -D... [-X...]] [args]
   java: relocation error: 
/home/tyang5/DRLVM.new/Harmony/build/lnx_ia32_gcc_debug/deploy/jre/bin/libhyprt.so:
 
symbol hythread_exit, version HYTHR_0.1 not defined in file libhythr.so with 
link time reference

If I try Hello.class, I got

$ ./java Hello

An unhandled error (4) has occurred.
HyGeneric_Signal_Number=0004
Signal_Number=000b
Error_Value=
Signal_Code=0002
Handler1=0804AA60
Handler2=002FD5CF
InaccessibleAddress=088E4470
.
.
Aborted

I searched the email archive and jira entries, and fixed fat_monitor.c 
assertion problem based on Harmony-1340. I tried to unset JAVA_HOME, or set 
it to ...deploy/jre of drlvm, but still have the same problem.
I am using a Fedora core 5 linux box, with gcc version 4.1.0, and I was able 
to successfully build and run drlvm on the exact same machine about 2 months 
ago :-) Any ideas about what might be happening?

Thanks a lot!

Ting.

BTW, when I was building DRLVM for the SVN head, I ran into a couple of 
minor issues (all from source code in jitrno/src):
1. jet/jet.cpp
An extra line of\n in the initializer of args[][2] (line 
290) causes a compilation failure
2. optimizer/reassociate.h
Missing a statement class Simplifier at the beginning, which causes 
gcc to complain at line 79 (friend class Simpilifier;)
3. jet/cg_meth.cpp
At line 389, the statment jt = jt = flt32 ? i32 : i64; causes gcc to 
complain,  so I removed one jt =
4. codegenerator/ia32/Ia32Encoder.cpp
At line 56, missing a pair of braces in the initializer of 
memOpndConstraints[16], which also causes a compilation error.
5. There a lot of warnings of extra quantification and virutal class with 
non-virtual destructor which are fairly easy to get around.

I am curious to know which is the most stable revision number for DRLVM ? 


  1   2   >