On Wed, Aug 06, 2008 at 03:42:17PM +0200, Olivier Berger wrote:
> 
> On Tue, Dec 18, 2007 at 06:19:46PM +0100, Emilio Scalise wrote:
> > I have the same problem using openvz machine. I've read that also 
> > linux-vserver users have the same problems.
> > 
> > Is there a way to limit the memory usage of the 
> > command 'java -client -Xshare:dump'?
> > 
> 
> I experience the same issue here, also inside an OpenVZ VE.
> 
> However, looking at the postinst, it looks rather strange to me :
> 
>     # activate class data sharing                                             
>                                                                               
>                    
>     case i386 in i386|sparc)
>         rm -f $basedir/jre/lib/i386/client/classes.jsa
>         xmarg=$(awk '/^((Mem|Swap)Free|Cached):/ { m+=$2 } END { if (m > 
> 1048576) print "-Xmx1m" }' /proc/meminfo 2>/dev/null || true)
>         log=$(tempfile)
>         if ! $basedir/bin/java -client -Xshare:dump $xmarg -XX:PermSize=128m 
> > $log; then
>             cat >2 $log
>             rm -f $log
>             exit 1
>         fi
>         rm -f $log
>     esac
> 
>     # activate class data sharing                                             
>                                                                               
>                    
>     case i386 in i386|sparc)
>         rm -f $basedir/jre/lib/i386/client/classes.jsa
>         $basedir/bin/java -client -Xshare:dump > /dev/null
>     esac
> 
> looks like two times the same code, more or less...
> 
> I guess there's something weird here, right ?
> 

Experimenting a little bit more, I was able to get more debug information by 
changing the script's test to :

        if ! $basedir/bin/java -client -Xshare:dump $xmarg -XX:PermSize=128m > 
$log 2>&1; then
           cat $log
           rm -f $log
           exit 1
        fi

Then, I can now see it says :
Setting up sun-java5-bin (1.5.0-16-2) ...
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
dpkg: error processing sun-java5-bin (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 sun-java5-bin

So there's obviously something too limited with memory here ?

Hope this helps.

Best regards,

                                                     



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to