java - PyLucene : lucene. initVM() 在 linux RHEL7 上导致段错误

标签 java linux lucene segmentation-fault pylucene

我安装了 PyLucene 4.10.1(我相信这是最新的)。但是,当我调用 initVM() 时,出现了一个 SIGSEGV,我不知道该怎么办。

这是输出:

[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)

核心文件的输出如下:

Core was generated by `python'.
Program terminated with signal 6, Aborted.
#0  0x00007fc72e7ee5f7 in ?? ()

但是,我注意到 Pylucene 使用 JRE 1.7(从上面的错误消息)。当我运行以下命令时:

/usr/sbin/alternatives --config java
/usr/sbin/alternatives --config javac

它告诉我 Java 1.8 是默认的。会不会是兼容性问题?如果是,如何确保一个版本的稳定性?

最佳答案

我实际上安装了两个版本的 pylucene(4.9 和 4.10)。此外,我用 JDK 1.7 编译它们,实际上使用的是 1.8(即使在切换到 1.7 后它显示 SIGSEGV)。

最后,我只是 rm -rf 两个鸡蛋 (site/packages/lucene4.xxx.egg) 并用 JDK 1.8 重新编译了 pylucene4.10 并且它工作了.

关于java - PyLucene : lucene. initVM() 在 linux RHEL7 上导致段错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37971636/

相关文章:

java - 将 Iterable<T> 转换为 T[] 的可重用方法?

c - 了解 XV6 makefile 中的代码块

c++ - SDL2 : How to keep aspect ratio when resizing the window

linux - 识别 Web 服务器上未使用的文件

java - 使用 Lucene 7.4.0 打印索引术语

elasticsearch - 索引时 Elasticsearch 面临内存问题

java - 实现 IFB_LLLLCHAR

java - META-INF/services/java.sql.驱动程序文件

lucene - Elasticsearch可以提出映射建议吗?

java - if(usersData.getNumber().equals(number)){ NullPointerException