stepstone-tech / hnswlib-jna

Native-Like Performance for Nearest Neighbor Search in Java Applications using Hnswlib and Java Native Access
Apache License 2.0
32 stars 8 forks source link

Fatal errors detected by the Java Runtime Environment on Linux (TravisCI - Ubuntu) #1

Closed hussamaa closed 4 years ago

hussamaa commented 4 years ago

Hi,

During the development phase and tests, we didn't face many issues with runtime issues (oracle jdk 1.8.0_211). However, after setting up Travis. We have noticed some instabilities with Linux (travis image of ubuntu), which need to be investigated. They might be related to OpenJDK version or something in image itself.

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007ff549841435, pid=3598, tid=0x00007ff5496e3700
#
# JRE version: OpenJDK Runtime Environment (8.0_191-b12) (build 1.8.0_191-8u191-b12-2ubuntu0.16.04.1-b12)
# Java VM: OpenJDK 64-Bit Server VM (25.191-b12 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libhnswlib-jna.so+0x4435]  hnswlib::L2Sqr(void const*, void const*, void const*)+0x25
#
# 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:
# /home/travis/build/stepstone-tech/hnswlib-jna/hnswlib-jna/hs_err_pid3598.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.

BR, Hussama

hussamaa commented 4 years ago

Hi,

This is just a quick update. I downloaded a similar travis docker image available (ravisci/ci-garnet:packer-1512502275-986baf0) instead of (travis-ci-garnet-trusty-1512502259-986baf0) but I wasn't able to reproduce the issue locally.

Another thing I noticed in one of my trials is that setting a bigger heap (pre-defined value used by Travis is -Xmx32m) seems to decrease the number of errors (trusty is still crashes time to time, though).

export JAVA_OPTS="-Xmx2048m -Xms512m" 
export MAVEN_OPTS="$JAVA_OPTS"

Thanks, Hussama

hussamaa commented 4 years ago

It hasn't happened anymore. 👍