PyLucene : lucene.initVM() causes a segmentation fault on linux RHEL7 - java

I installed PyLucene 4.10.1 (which I believe is the latest). However, when I call for initVM(), a SIGSEGV is raised and I have no idea what to do about it.
Here is the output :
[zzz#xxx gitCode]$ python
Python 2.7.5 (default, Oct 11 2015, 17:47:16)
[GCC 4.8.3 20140911 (Red Hat 4.8.3-9)] on linux2
>>> import lucene
>>> lucene.initVM()
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fc725385c4b, pid=18501, tid=140493474518848
#
# JRE version: OpenJDK Runtime Environment (7.0_101) (build 1.7.0_101-mockbuild_2016_04_19_09_09-b00)
# Java VM: OpenJDK 64-Bit Server VM (24.95-b01 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea 2.6.6pre01
# Distribution: Red Hat Enterprise Linux Server release 7.2 (Maipo), package rhel-2.6.6.1.el7_2-x86_64 u101-b00
# Problematic frame:
# V [libjvm.so+0x62ac4b]
#
# Core dump written. Default location: /local/gitCode/core or core.18501
#
# An error report file with more information is saved as:
# /tmp/jvm-18501/hs_error.log
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
# http://icedtea.classpath.org/bugzilla
#
Aborted (core dumped)
The output of the core file is as follow :
Core was generated by `python'.
Program terminated with signal 6, Aborted.
#0 0x00007fc72e7ee5f7 in ?? ()
However, I noticed that Pylucene uses JRE 1.7 (from the above error message). When I run the following commands :
/usr/sbin/alternatives --config java
/usr/sbin/alternatives --config javac
it shows me that Java 1.8 is the default one. Could it be a compatibility problem ? If yes, how can I ensure stability with one version ?

I actually had two version of pylucene installed (4.9 and 4.10). Moreover, i compiled them with JDK 1.7 and was actually using 1.8 (even after switching to 1.7 it showed the SIGSEGV).
In the end, I just rm -rf both eggs (site/packages/lucene4.xxx.egg) and recompiled pylucene4.10 with JDK 1.8 and it worked.

Related

Newly installed Geogebra doesn't open (persumably JDK issue)

Just now installed geogebra on my Ubuntu 16.04 (with plain old sudo apt-get install geogebra)
when I try to open it I get:
GeoGebra 4.0.34.0 (Debian version 4.0.34.0+dfsg1-3) 22 June 2012 Java 9-internal
*** Message from [geogebra.main.Application.setUpLogging]
/tmp/GeoGebraLog_hltazoiolj.txt
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f9a380b8009, pid=25913, tid=25915
#
# JRE version: OpenJDK Runtime Environment (9.0) (build 9-internal+0-2016-04-14-195246.buildd.src)
# Java VM: OpenJDK 64-Bit Server VM (9-internal+0-2016-04-14-195246.buildd.src, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# C [libjava.so+0x1d009] JNU_GetEnv+0x19
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %P" (or dumping to /mnt/storage/programs/linux/installers/core.25913)
#
# An error report file with more information is saved as:
# /mnt/storage/programs/linux/installers/hs_err_pid25913.log
[thread 25945 also had an error]
#
# 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.
#
Aborted (core dumped)
I guess it has to do with my JDK, but I have no actual clue what to do. my java -version output:
openjdk version "9-internal"
OpenJDK Runtime Environment (build 9-internal+0-2016-04-14-195246.buildd.src)
OpenJDK 64-Bit Server VM (build 9-internal+0-2016-04-14-195246.buildd.src, mixed mode)
Can anyone help me figure out how to fix this?
Java 9 isn't officially released so I highly doubt any major Java app is using it yet. I don't know how you got that setup, but I would recommend you install JDK 8 instead
update-java-alternatives should be available as a command (depending on your OS), but after you install JDK 8, you can run that and select it to set Java 8 as the Java version for your system.
Or you could edit PATH and JAVA_HOME yourself, but I wouldn't recommend it when there's easier / safer ways.

Android Studio Core Dump

I have working with Android Studio for quite a long time. Today, I have upgraded my android studio's some of the build tools as well as upgraded to a latest version (1.5 or so), I can't create any more new project. I am getting a core dump error. I am from Ubuntu 14.04, I am running it from my terminal.
Here is the Error terminal is giving me
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f1520266ca8, pid=4094, tid=139728681764608
#
# JRE version: Java(TM) SE Runtime Environment (7.0_80-b15) (build 1.7.0_80-b15)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.80-b11 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V [libjvm.so+0x436ca8] FreeListSpace_DCTOC::walk_mem_region_with_cl_par(MemRegion, HeapWord*, HeapWord*, FilteringClosure*)+0x268
#
# Core dump written. Default location: /home/monkey/Code/core or core.4094
#
# An error report file with more information is saved as:
# /home/monkey/java_error_in_STUDIO_4094.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
Aborted (core dumped)
I did a little googling and found out that it might happen if my Java runs out of memory. So, I went up and gave Java unlimited memory (it has basic 382MB or something memory). I have been in this error for whole day long.
Thank you for your input.
Just try to downgrade libglib2.0-0 from synaptic. and don't forget to lock the downgrade version, so it will not update again in the future.
downgrade:
package -> force version
lock:
package -> lock version

run PyCharm on arch linux

I use pycharm-professional on arch linux, but since yesterday it does not run properly, here is the error when running it in temrinal:
[kahrabian#Kian-Arch ~]$ pycharm
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=350m; support was removed in 8.0
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=lcd
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f26f93b5be0, pid=1999, tid=139805401143040
#
# JRE version: Java(TM) SE Runtime Environment (8.0_60-b27) (build 1.8.0_60-b27)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.60-b23 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C 0x00007f26f93b5be0
#
# 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/kahrabian/java_error_in_PYCHARM_1999.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
/opt/pycharm-professional/bin/pycharm.sh: line 187: 1999 Aborted (core dumped) LD_LIBRARY_PATH="$IDE_BIN_HOME:$LD_LIBRARY_PATH" "$JDK/bin/java" $AGENT "-Xbootclasspath/a:$IDE_HOME/lib/boot.jar" -classpath "$CLASSPATH" $VM_OPTIONS "-Djb.vmOptionsFile=$VM_OPTIONS_FILES_USED" "-XX:ErrorFile=$HOME/java_error_in_PYCHARM_%p.log" -Djb.restart.code=88 -Didea.paths.selector=PyCharm40 $IDE_PROPERTIES_PROPERTY $IDE_JVM_ARGS $REQUIRED_JVM_ARGS $MAIN_CLASS_NAME "$#"
and here is the log file generated after trying to run pycharm:
http://paste.ubuntu.com/12775734/
as I can't understand the problem and it's origin, I need some help to solve this problem.
Unfortunately this is a known incompatibility with the current glib and Oracle JVM.
See here: https://youtrack.jetbrains.com/issue/IDEA-146207
And here: https://bugzilla.gnome.org/show_bug.cgi?id=755609
There are a few workarounds that you can use for the time being (found from here: https://bugs.archlinux.org/task/46619)
Prepend the command with PRELOAD=/lib/libglib-2.0.so (e.g. PRELOAD=/lib/libglib-2.0.so pycharm)
Install this patched glib from the arch forum thread (I'd be weary to use this solution without first checking the safety of this package): http://pkgbuild.com/~heftig/glib2-2.46.0-2-x86_64.pkg.tar.xz
Downgrade GLib-2 for now (only works if you still have the old package cached). The command to do this will look something like: pacman -U /var/cache/pacman/pkg/glib2-2.44.1-1-x86_64.pkg.tar.xz. You can also downgrade package using other tools, like downgrade from AUR, the just run downgrade glib2
Hopefully this bug will be squashed soon.
For anyone else running into this error and do not want to downgrade glib, the command from step #1 solution needs to be changed to:
# x64
LD_PRELOAD=/lib64/libglib-2.0.so pycharm
# x86
LD_PRELOAD=/lib/libglib-2.0.so pycharm
to build on the answer given by #8bitAce:
You actually don't need to install the older glib2 version in order to use it to run pycharm. Just extract the old glib2 package somewhere in your home directory:
mkdir -p $HOME/oldlibs/pycharm
tar Jxf /var/cache/pacman/pkg/glib2-2.44.1-1-x86_64.pkg.tar.xz -C $HOME/oldlibs/pycharm
Then start pycharm:
LD_PRELOAD=$HOME/oldlibs/pycharm/usr/lib/libglib-2.0.so pycharm
This way the rest of your programs (which may depend on the newer glib2 version) aren't forced to use an old glib2 version, and run the risk of other problems.
I had the same issue. I was using OpenJDK JRE 9, and that seems to have been the source of problem. I've later installed Oracle's JRE 8 and everything is okay. Maybe with OpenJDK JRE 8 it will work as well.
There is a pre-built package in this repo:
[archlinuxcn]
SigLevel = Optional TrustAll
Server = http://repo.archlinuxcn.org/$arch

JRE crashes in Eclipse since upgrading to Ubuntu 14.04

I've been developing Android apps on Eclipse 4.2.2 and Java 1.6.0_21 on Ubuntu 12.04 LTS without any problems. Recently I got an upgrade notification for 14.04 and so I upgraded. Now I keep getting the following error in Eclipse
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f90b685a2a1, pid=7131, tid=140264058119936
#
# JRE version: 6.0_21-b06
# Java VM: Java HotSpot(TM) 64-Bit Server VM (17.0-b16 mixed mode linux-amd64 )
# Problematic frame:
# C [libsoup-2.4.so.1+0x6c2a1] soup_session_feature_detach+0x11
#
# An error report file with more information is saved as:
# /tmp/hs_err_pid7131.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
Any idea what's wrong?
OK, I found a solution, which is to add the following line to eclipse.ini
-Dorg.eclipse.swt.browser.DefaultType=mozilla

eclipse crash after opening on ubuntu

#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0xb5855ae7, pid=1431, tid=3028896624
#
# JRE version: 6.0_20-b20
# Java VM: OpenJDK Client VM (19.0-b09 mixed mode, sharing linux-x86 )
# Derivative: IcedTea6 1.9.2
# Distribution: Ubuntu 10.04.1 LTS, package 6b20-1.9.2-0ubuntu1~10.04.1
# Problematic frame:
# J org.eclipse.equinox.internal.p2.metadata.VersionFormatParser$Qualifier.parse([Lorg/eclipse/equinox/internal/p2/metadata/VersionFormatParser$Fragment;ILjava/util/List;Ljava/lang/String;ILorg/eclipse/equinox/internal/p2/metadata/VersionFormat$TreeInfo;)Z
#
# An error report file with more information is saved as:
# /home/skowron-line/Pobrane/eclipse/hs_err_pid1431.log
#
# If you would like to submit a bug report, please include
# instructions how to reproduce the bug and visit:
# https://bugs.launchpad.net/ubuntu/+source/openjdk-6/
#
Aborted
Above screen shows error after I have tryied to lunch eclipse as root, as simple user it works just fine. In error log file there is some things but I dont understand them.
Does someone had such problem ? And know the anwser
That's a JVM crash, maybe initiated by some eclipse related class. Update to the latest and greatest Java an verify if it is reproduceable.
You have installed Sun/Oracle's JDK but it looks like you are still running OpenJDK. Try calling java -version to make sure, and then call:
update-java-alternatives
to set Oracle's Java as the default.

Categories