Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

java runs well inside common chroot.

however in a grsec hardened chroot it complains it has no enough memory to build VM.

any ideas of how to make it run cause i really need a hardened chroot.


share|improve this question
up vote 0 down vote accepted

Generally Java plays well with grsec.

However there are an option in grsec that break things bad for Java.

Seems you have that option enabled in your kernel.

Check it at:

[*] Grsecurity 
  Customize Configuration  --->
    PaX  --->
      Miscellaneous hardening features  ---> 
        [ ] Sanitize all freed memory

Make sure Sanitize all freed memory option is disabled, recompile kernel(IMO it can not be managed via sysctl) and retry.

share|improve this answer
seems to make sense, trying – San Tiago Oct 15 '12 at 23:10
yes, it works, however i'm not totally satisfied with this option disabled... perhaps any other way to fix this? – San Tiago Oct 15 '12 at 23:26

You should provide more details: exact text of error message, which JVM you're using, etc.

I had similar issue running java on 32-bit Gentoo Hardened (also grsec, but without chroot):

You can try to work around this issue by changing your jvm.cfg to use "client" instead of "server", for ex.:

--client IF_SERVER_CLASS -server
--server KNOWN
+-client KNOWN

Also you can try to run java with -client and/or -Xmx256m options.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.