Error raised when persisting file under temps

48 views
Skip to first unread message

qinzh...@gmail.com

unread,
Mar 6, 2015, 11:17:08 AM3/6/15
to java-ch...@googlegroups.com
Not sure if it is a known issue, ---I did not go thru the posts before.

Running env, AWS EC2 Amazon Linux. 

When I try to persist file to /dev/shm, I got error as following. However, if I soft like /dev/shm to a tmp dir, there is no issue. Btw, if I put the file in temps, will the map and file share the same region of memory?

Thanks
Qin

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGBUS (0x7) at pc=0x00007fdf0f8cce5d, pid=5043, tid=140596035110656
#
# JRE version: OpenJDK Runtime Environment (7.0_75-b13) (build 1.7.0_75-mockbuild_2015_01_23_00_20-b00)
# Java VM: OpenJDK 64-Bit Server VM (24.75-b04 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea 2.5.4
# Distribution: Built on Amazon Linux BASE release 2014.03 (Fri Jan 23 00:20:51 UTC 2015)
# Problematic frame:
# V  [libjvm.so+0x91ae5d]
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /tmp/jvm-5043/hs_error.log
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
#

Peter Lawrey

unread,
Mar 6, 2015, 11:58:27 AM3/6/15
to java-ch...@googlegroups.com

Can you try the Oracle JVM as we haven't tested IcedTea

The most common cause of this error is running out of disk space. Can you check you have free disk?

--
You received this message because you are subscribed to the Google Groups "Chronicle" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-chronicl...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Peter Lawrey

unread,
Mar 6, 2015, 11:59:15 AM3/6/15
to java-ch...@googlegroups.com

The file will share the same memory with any on the same machine.

On 06/03/2015 4:17 PM, <qinzh...@gmail.com> wrote:
--

qinzh...@gmail.com

unread,
Mar 6, 2015, 12:52:06 PM3/6/15
to java-ch...@googlegroups.com
I did not describe my question clearly. I meant if a file is under tmpfs, it is in "Cache". So, do I have to have double size of memory to hold both mmap and file, or OS is smart enough to know the mmap is already in memory?

Rob Austin

unread,
Mar 6, 2015, 3:47:00 PM3/6/15
to java-ch...@googlegroups.com
The map is only stored once. When using tmpfd it's ( most often ) stored in a RAM disk. You do not have to double memory. 

qinzh...@gmail.com

unread,
Mar 6, 2015, 5:12:39 PM3/6/15
to java-ch...@googlegroups.com
Tested against Oracle jdk7, same error. Probably it is Xen issue.

Peter Lawrey

unread,
Mar 7, 2015, 1:59:20 AM3/7/15
to java-ch...@googlegroups.com

With all file systems on one machine, there 0 or 1 copies in memory no matter how many times you use it.

You might not be using it but it will stay in memory. Ie between restarts you dont have to reload every time.

Also you might have a file mapped on tmpfs which is partly swapped to disk.

If you use a file in ten programs there is at most one copy in memory.

Also for tmpfs,  there is not a copy in memory and on disk (swap) at the same time so a small swap is still useful.

With ext4, there can be a copy on disk and one copy in memory at the same time.

Reply all
Reply to author
Forward
0 new messages