Thank you Richard, that's really great news!

My UML has 2GB available, I have assumed that to be enough?

I'm sorry if I didn't make myself very clear about the output of the test program. 
In my UML this test program is not crashing either, but it's sometimes printing "0.75 < 0" which it should _never_ do. 
The only output you should see in a working system is an endless line of dots (until you stop the program).


Which kernel versions are you using for your host and UML?

Do you patch your host kernel in any way to run the UML?


Best Regards, 

Gunnar






> Date: Mon, 15 Aug 2011 16:37:35 +0200
> Subject: Re: [uml-user] java exceptions in UML
> From: richard.weinberger@gmail.com
> To: gunnarlindroth@hotmail.com
> CC: user-mode-linux-user@lists.sourceforge.net
>
> On Mon, Aug 15, 2011 at 11:09 AM, Gunnar Lindroth
> <gunnarlindroth@hotmail.com> wrote:
> > Hi,
> > I'm trying to run a Java application in my 64-bit UML. Unfortunately I have
> > experienced a lot of SIGSEGV's when running my application which makes it
> > next to unusable (it crashes maybe 80% of the time). The only way I have
> > found to make the SIGSEGV's go away has been to disable the Java HotSpot
> > compiler completely (running my application in interpreted mode).
> > However, in interpreted mode I have observed other strange Java exception
> > problems, which I have never seen when running my application outside the
> > UML. After a lot of googling I have found a small test program ("Test.java")
> > which can easily provoke the problem (at least when run in interpreted
> > mode).
> > The original test program can be found here:
> > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4832371
> >
> > I have tried the test program on a few other hosts and OS:s (Linux, Windows
> > and also VirtualBox and XEN Linux instances) but still haven't seen it fail
> > outside the UML.
> >
> > My UML is running on Red Hat Enterprise Linux Server release 5.4 (Tikanga).
> > uml-22-241>uname -a
> > Linux uml-22-241 2.6.37 #1 Fri Apr 8 11:03:19 CEST 2011 x86_64 GNU/Linux
> >
> > The test program is started like this:
> > uml-22-241>/rhel5.x86_64/java/jdk1.6.0_23/bin/java -cp /tmp/
> > -Djava.compiler=NONE Test
> >
> >
> > Here's the small test program, repeated for convenience:
> > public class Test implements Runnable {
> >   int n;
> >   public Test(int i) {
> >     n = i;
> >   }
> >   public static void main(String args[]) {
> >     for (int i = 0; i < 100; i++) {
> >       Thread t = new Thread(new Test(i));
> >       t.start();
> >     }
> >   }
> >   public void run() {
> >     long i = 0;
> >     while (true) {
> >       Test2 test = new Test2();
> >       i++;
> >       if (i % 100000 == 0)
> >         System.out.print('.');
> >     }
> >   }
> > }
> > public class Test2 {
> >   float lf;
> >   public Test2() {
> >     this(11, 0.75f);
> >   }
> >   public Test2(int x, float f) {
> >     if (f <= 0 || Float.isNaN(f))
> >       System.out.println(f + " < 0 ");
> >     this.lf = f;
> >   }
> > }
> >
> > Any help or suggestion about how to solve this problem is much appreciated!
>
> Your test program runs fine within my x86_64 UML. (Debian 6, OpenJDK 1.6)
> Is UML or java crashing by SIGEGV?
> How much memory does your UML instance have?
>
> --
> Thanks,
> //richard