[GTALUG] Java

Giles Orr gilesorr at gmail.com
Fri Jun 5 14:02:06 EDT 2020


On Fri, 5 Jun 2020 at 13:04, Slackrat via talk <talk at gtalug.org> wrote:
>
> Can anyone give me a pointer to what precisely I might do to correct the
> situation. The first three suggestions do not apply:
> #   Reduce memory load on the system
> #   Increase physical memory or swap space
> #   Check if swap backing store is full
>
>
> The situation requires a cold boot to correct and that ABSOLUTELY
> nothing be done in the user account except launching an X server
> prior to launching the application.
>
>
> [QUOTE]
>
> bash-4.3# ./HamSphere_4.010a
> Fatal error: out of memory
> Uncaught exception: Out of memory
>
> An earlier version of the application at least privides a logfile when
> it crashes
>
> Server:www.hamsphere.com:8010
> OpenJDK 64-Bit Server VM warning: INFO:
> os::commit_memory(0x00007f942b028000, 262144, 0) failed; error='Cannot
> allocate memory' (errno=12)
>
> #
> # There is insufficient memory for the Java Runtime Environment to continue.
> # Native memory allocation (mmap) failed to map 262144 bytes for committing reserved memory.
> # An error report file with more information is saved as:
> # /inconnu/hs_err_pid23337.log
> [/QUOTE]
>
> bash-4.3$ free
>               total        used        free      shared  buff/cache   available
> Mem:        5999704      217532     5033232        2760      748940     5392888
> Swap:       7219376           0     7219376
> bash-4.3$
>
> LogFile - too long to be reasonably opened by emacs, but "cat
> /hs_err_pid23337.log |less" works fine but, at least to me, is not
> helpful.
>
>
> System is Slackware 14.2 on an
> "Ideapad 330 (17, Intel) | Durable, Easy-to-Use 17.3" (sic) ... Lenovo" disaster.

If you'll forgive me fumbling about in an area I barely know anything
about ...  I'll point out that Java sometimes means very different
things by "out of memory" than we think it does, and in this case
we're only finding out about it after it's filtered through the
application logging.  I think this probably means "Java has run out of
the memory you said it could have."  You didn't know you told it about
how much memory it could have, did you?  That's because there are
default values, and it's a pretty common problem to bump up against
them.  (Again, not totally sure that's what's happening here.)

I would try:

export JAVA_TOOL_OPTIONS="-Xmx1024M"

(You should perhaps check if this is already set FIRST, but doing this
at the command line is specific to the current shell.)  Then try
running the application again.

And read this:

https://stackoverflow.com/questions/5374455/what-does-java-option-xmx-stand-for

for a passable explanation of a horrible subject.  Read not just the
accepted answer, but the other stuff as well.

I hope this is what you need.

-- 
Giles
https://www.gilesorr.com/
gilesorr at gmail.com


More information about the talk mailing list