PyLucene在使用IceTea / JDK / JRE时出现错误。

10

我已经按照http://bendemott.blogspot.de/2013/11/installing-pylucene-4-451.html中的安装指南,使用最新的pylucene-4.9.0.0进行了安装。

但是当我尝试执行lucene.initVM()时,出现了以下错误:

alvas@ubi:~$ python
Python 2.7.6 (default, Mar 22 2014, 22:59:56) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import lucene
>>> lucene.initVM()
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007ffba22808b8, pid=5189, tid=140718811092800
#
# JRE version: OpenJDK Runtime Environment (7.0_65-b32) (build 1.7.0_65-b32)
# Java VM: OpenJDK 64-Bit Server VM (24.65-b04 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea 2.5.3
# Distribution: Ubuntu 14.04 LTS, package 7u71-2.5.3-0ubuntu0.14.04.1
# Problematic frame:
# V  [libjvm.so+0x6088b8]  jni_RegisterNatives+0x58
#
# 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/alvas/hs_err_pid5189.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)

而且这个文件http://pastebin.com/6B8FyC4Z

我的IceTea配置有问题吗?还是我的JDK?或者JRE?

我该如何解决这个问题?


我认为你应该提供关于你的电脑架构和软件安装的更多信息。Python是64位的吗?Java是64位的。如果Python不是,我担心可能会出现问题。我读到了“mixed mode linux-amd64”。 - J_Zar
你试过 JDK 8 吗? - duhaime
我最终在新服务器上重新安装,它可以工作,但仍然不知道出了什么问题 =( - alvas
1个回答

1

我看了一下你的堆栈跟踪,我认为问题并不是特别在于pyLucene。在堆栈跟踪中,你会看到这个错误:

siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), si_addr=0x0000000000000000

如果您看到第一部分SIGSEGV,那么意味着系统中某处存在内存分段错误。SEGV_MAPERR是具体的错误,这意味着OpenJDK试图将内存映射到对象时失败了。这可能是由于内存不足、糟糕的页面文件/虚拟内存、糟糕的地址空间甚至是糟糕的库导致的。为什么它在另一台机器上可以工作可能是任何原因。核心转储非常有用,因此如果您可以运行

ulimit -c unlimited

这将有助于提供一些参考。这是在虚拟机还是物理机上?如果Ubuntu虚拟机没有为各种Java任务分配足够的内存,我会看到随机sigsegv。我在我的ESXi虚拟化主机上特别注意到了这一点,当ESXi开始执行内存交换时,我最多注意到这一点。我通过增加内存,重新启动VM,并确保我的虚拟化程序没有交换内存来解决这个问题。如果这有帮助,请告诉我。 :)
编辑:我还注意到,如果底层存储提供程序性能不佳,那么这将影响交换数据,并且我觉得这也会影响sigsegv问题。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接