Bug#323618: Virtual memory ulimit

Seo Sanghyeon tinuviel at sparcs.kaist.ac.kr
Wed Aug 17 17:49:34 UTC 2005


Hello, I am "another user" Greg mentioned. We discussed this, and I
think we found the problem:

As noted, dpkg -L sun-j2sdk1.5 reports exactly same except classes.jsa.
Also, diff'ing java-package log shows no difference other than temporary
directory name and "Testing extracted archive..." success vs. failure.
This means, classes.jsa doesn't appear in extraction log even if run is
successful.

As a matter of fact, jdk-1_5_0_03-linux-i586.bin includes the following
code:

  $javahome/bin/java -client -Xshare:dump > /dev/null 2>&1

According to Google search, this command generates classes.jsa. So this
file is not extracted, but generated at install time.

Somehow, this generation is failing on some people's machine, and
classes.jsa is not being generated, and as this file is 13 M big,
expected_min_size is not met.

Greg ran "java -client -Xshare:dump" after installing the package built
with workaround (i.e. editing sun-j2sdk.sh and change 130 to 128), and
it failed with:

  Error occurred during initialization of VM
  Could not reserve enough space for object heap
  Could not create the Java virtual machine.

I measured the command's memory usage with top, and it reports 763 M.
Consistent with this, Greg reports "ulimit -v 700000; java..." fails,
but "ulimit -v 800000; java..." succeeds. Greg had virtual memory limit
set to 300000 when he ran java-package.

It is likely that this can explain #300546 too.

I suggest displaying a warning to user if user has virtual memory limit
set, just like "Probably not enough free disk space" warning.

Seo Sanghyeon




More information about the pkg-java-maintainers mailing list