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.
Stack Exchange network consists of 181 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.Visit Stack Exchange
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
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
Sanitize all freed memory option is disabled, recompile kernel(IMO it can not be managed via sysctl) and retry.
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): https://bugs.gentoo.org/show_bug.cgi?id=344135
You can try to work around this issue by changing your jvm.cfg to use "client" instead of "server", for ex.:
[jvm.cfg.patch] --client IF_SERVER_CLASS -server --server KNOWN +-client KNOWN
Also you can try to run java with -client and/or -Xmx256m options.