users@glassfish.java.net

Re: Interesting Glassfish crash, probably related to SMTP

From: Oleksiy Stashok <Oleksiy.Stashok_at_Sun.COM>
Date: Mon, 19 Apr 2010 17:47:29 +0200

> no hs* anything found...
Then, IMO, it's unlikely to be JVM crash.

> Nevertheless, I made three changes, and after them, the problem is
> gone - so far.
>
> First, I noticed that RAM on the virtual computer which hosted the
> Sailfin (Xen) was set too low - to 512 MB. Meanwhile, -Xmax was set
> to 512m. This is probably not good. So, I increased the memory to
> 1024 MB.
> Second, I noticed a strange recursion in one servlet where it should
> not be. I am not sure whether the recursion was infinite, but
> possibly yes. Of course, infinite recursion would kill the server
> pretty quickly. But once I managed to kill the server even from
> another servlet which had no recursion in it... and I would expect
> Java VM to collapse at least with [i]java.lang.OutOfMemoryError[/i]
> in such case anyway.
>
> Third, I changed the Netbeans project properties for the WAR and EJB
> JAR, so that JDK 6 compatible binary is generated, and not JDK 5,
> which was the default value. I read that Glassfish is very strictly
> JDK 6 - oriented.
It's true for Glassfish v3, but Glassfish v2.x should work fine with
JDK5.

> I am not sure whether I killed the bug by the combined forces of
> those three changes, or just postponed it to heavier server load.
> What do you think? Could infinite recursion kill the VM without any
> clean trace?
Guess not, you'd see StackOverflowError in the log.

> Could setting -Xmax to more than physical memory do the same?
Again, in this case there should be OutOfMemoryError in the log.

But it's just my thoughts, can not be sure about your particular case.

If you'll find more info - please let us know.

WBR,
Alexey.