IceTea/JDK/JRE的PyLucene错误

alv*_*vas 10 python java lucene pylucene

我已经使用最新的安装说明书http://bendemott.blogspot.de/2013/11/installing-pylucene-4-451.html了解pylucene 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)
Run Code Online (Sandbox Code Playgroud)

和文件http://pastebin.com/6B8FyC4Z

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

我该如何解决这个问题?

小智 1

所以我查看了你的堆栈跟踪,我认为问题不是专门针对 pyLucene 的。在堆栈跟踪中,您会看到以下错误:

siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), si_addr=0x0000000000000000
Run Code Online (Sandbox Code Playgroud)

如果您查看第一部分 SIGSEGV,则意味着系统中的某个位置存在分段错误。SEGV_MAPERR 是特定错误,这意味着 OpenJDK 尝试将内存映射到对象但失败。这可能是由于内存不足、页面文件/虚拟内存错误、地址空间错误甚至库错误造成的。为什么它在另一台机器上工作可以是任何事情。核心转储非常有用,所以如果你可以运行

ulimit -c unlimited
Run Code Online (Sandbox Code Playgroud)

这将有助于给你一些可看的东西。这是在虚拟机中还是在物理机上?如果没有为各种 Java 任务分配足够的内存,我会在 Ubuntu 虚拟机中看到随机 sigsegv。我特别在我的 ESXi 虚拟机管理程序上看到了这一点,并且我注意到最多的是当 ESXi 开始执行内存交换时。我通过增加内存、重新启动虚拟机并确保我的虚拟机管理程序没有交换内存来解决这个问题。让我知道这是否有帮助。:)

编辑:我还注意到,如果底层存储提供程序性能不佳,这会影响交换数据,我认为这也会影响 sigsegv 问题。