gpt4 book ai didi

java double free or corruption

转载 作者:塔克拉玛干 更新时间:2023-11-03 03:41:51 36 4
gpt4 key购买 nike

这可能是个愚蠢的问题,但我在运行 *.jar 包时随机出现以下错误。有时程序运行完美,有时会中断,将其输出到控制台:

*** Error in 'java': double free or corruption (out): 0x00007f665c04a830 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x80a46)[0x7f66c63d7a46]
/usr/lib/libjnetpcap.so(Java_org_jnetpcap_nio_JMemoryReference_disposeNative0+0xa6)[0x7f66b55f20eb]
[0x7f66bc5cd738]
======= Memory map: ========
00400000-00401000 r-xp 00000000 08:02 2752983 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
00600000-00601000 r--p 00000000 08:02 2752983 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
00601000-00602000 rw-p 00001000 08:02 2752983 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
006d2000-006f3000 rw-p 00000000 00:00 0 [heap]
77b000000-77c500000 rw-p 00000000 00:00 0
77c500000-785600000 rw-p 00000000 00:00 0
785600000-78a780000 rw-p 00000000 00:00 0
78a780000-7d7200000 rw-p 00000000 00:00 0
7d7200000-7d9b00000 rw-p 00000000 00:00 0
7d9b00000-800000000 rw-p 00000000 00:00 0
7f664c000000-7f664c021000 rw-p 00000000 00:00 0
7f664c021000-7f6650000000 ---p 00000000 00:00 0
7f6654000000-7f6654021000 rw-p 00000000 00:00 0
7f6654021000-7f6658000000 ---p 00000000 00:00 0
7f6658000000-7f6658021000 rw-p 00000000 00:00 0
7f6658021000-7f665c000000 ---p 00000000 00:00 0
7f665c000000-7f665c0ac000 rw-p 00000000 00:00 0
7f665c0ac000-7f6660000000 ---p 00000000 00:00 0
7f6660000000-7f6660021000 rw-p 00000000 00:00 0
7f6660021000-7f6664000000 ---p 00000000 00:00 0
7f6664000000-7f66641ad000 rw-p 00000000 00:00 0
7f66641ad000-7f6668000000 ---p 00000000 00:00 0
7f6668000000-7f6668021000 rw-p 00000000 00:00 0
7f6668021000-7f666c000000 ---p 00000000 00:00 0
7f666c000000-7f666c021000 rw-p 00000000 00:00 0
7f666c021000-7f6670000000 ---p 00000000 00:00 0
7f6670000000-7f6670021000 rw-p 00000000 00:00 0
7f6670021000-7f6674000000 ---p 00000000 00:00 0
7f6674000000-7f6674021000 rw-p 00000000 00:00 0
7f6674021000-7f6678000000 ---p 00000000 00:00 0
7f667969a000-7f667969d000 ---p 00000000 00:00 0
7f667969d000-7f667979b000 rw-p 00000000 00:00 0 [stack:5820]
7f667979b000-7f667979e000 ---p 00000000 00:00 0
7f667979e000-7f667989c000 rw-p 00000000 00:00 0 [stack:5819]
7f667989c000-7f667989f000 ---p 00000000 00:00 0
7f667989f000-7f667999d000 rw-p 00000000 00:00 0 [stack:5818]
7f667999d000-7f6679bbd000 rw-s 00000000 00:07 220407 socket:[220407]
7f6679bbd000-7f6679bc0000 ---p 00000000 00:00 0
7f6679bc0000-7f6679cbe000 rw-p 00000000 00:00 0 [stack:5817]
7f6679cbe000-7f6679cc1000 ---p 00000000 00:00 0
7f6679cc1000-7f6679dbf000 rw-p 00000000 00:00 0 [stack:5816]
7f6679dbf000-7f6679fdf000 rw-s 00000000 00:07 219343 socket:[219343]
7f6679fdf000-7f6679fe2000 ---p 00000000 00:00 0
7f6679fe2000-7f667a0e0000 rw-p 00000000 00:00 0 [stack:5814]
7f667a0e0000-7f667a0fb000 r--s 00000000 08:02 1970077 /usr/share/fonts/type1/gsfonts/p052003l.pfb
7f667a0fb000-7f667a10d000 r--s 00000000 08:02 1970041 /usr/share/fonts/type1/gsfonts/n019043l.pfb
7f667a10d000-7f667a126000 r--s 00000000 08:02 1970000 /usr/share/fonts/type1/gsfonts/b018012l.pfb
7f667a12f000-7f667a130000 rw-p 00000000 00:00 0
7f667a130000-7f667a133000 rw-s 00000000 00:04 17236023 /SYSV00000000 (deleted)
7f667a133000-7f667a143000 r--s 00000000 08:02 1969994 /usr/share/fonts/type1/gsfonts/a010033l.pfb
7f667a143000-7f667a14f000 r--s 00000000 08:02 1970025 /usr/share/fonts/type1/gsfonts/d050000l.pfb
7f667a14f000-7f667a164000 r--s 00000000 08:02 1970006 /usr/share/fonts/type1/gsfonts/b018032l.pfb
7f667a164000-7f667a177000 r--s 00000000 08:02 1970003 /usr/share/fonts/type1/gsfonts/b018015l.pfb
7f667a177000-7f667a191000 r--s 00000000 08:02 1970012 /usr/share/fonts/type1/gsfonts/c059013l.pfb
7f667a191000-7f667a1a8000 r--s 00000000 08:02 1970094 /usr/share/fonts/type1/gsfonts/z003034l.pfb
7f667a1a8000-7f667a1c3000 r--s 00000000 08:02 1970080 /usr/share/fonts/type1/gsfonts/p052004l.pfb
7f667a1c3000-7f667a1d4000 r--s 00000000 08:02 1970047 /usr/share/fonts/type1/gsfonts/n019063l.pfb
7f667a1d4000-7f667a1e5000 r--s 00000000 08:02 1969997 /usr/share/fonts/type1/gsfonts/a010035l.pfb
7f667a1e5000-7f667a1ee000 r--s 00000000 08:02 1970089 /usr/share/fonts/type1/gsfonts/s050000l.pfb
7f667a1ee000-7f667a1fe000 r--s 00000000 08:02 1969991 /usr/share/fonts/type1/gsfonts/a010015l.pfb
7f667a1fe000-7f667a21a000 r--s 00000000 08:02 1970086 /usr/share/fonts/type1/gsfonts/p052024l.pfb
7f667a21a000-7f667a232000 r--s 00000000 08:02 1970022 /usr/share/fonts/type1/gsfonts/c059036l.pfb
7f667a232000-7f667a24d000 r--s 00000000 08:02 1970083 /usr/share/fonts/type1/gsfonts/p052023l.pfb
7f667a24d000-7f667a25f000 r--s 00000000 08:02 1970009 /usr/share/fonts/type1/gsfonts/b018035l.pfb
7f667a25f000-7f667a26f000 r--s 00000000 08:02 1969988 /usr/share/fonts/type1/gsfonts/a010013l.pfb
7f667a26f000-7f667a28a000 r--s 00000000 08:02 1970015 /usr/share/fonts/type1/gsfonts/c059016l.pfb
7f667a28a000-7f667a29c000 r--s 00000000 08:02 1970044 /usr/share/fonts/type1/gsfonts/n019044l.pfb
7f667a29c000-7f667a2af000 r--s 00000000 08:02 1970050 /usr/share/fonts/type1/gsfonts/n019064l.pfb
7f667a2af000-7f667a2c7000 r--s 00000000 08:02 1970018 /usr/share/fonts/type1/gsfonts/c059033l.pfb
7f667a2c7000-7f667a2e5000 r--s 00000000 08:02 1275703 /usr/share/texmf/fonts/type1/public/lm/lmr10.pfb
7f667a2e5000-7f667a307000 r--s 00000000 08:02 1978245 /usr/share/texmf/fonts/type1/public/tex-gyre/qplr.pfb
7f667a307000-7f667a327000 r--s 00000000 08:02 1978229 /usr/share/texmf/fonts/type1/public/tex-gyre/qbkbi.pfb
7f667a327000-7f667a341000 r--s 00000000 08:02 1978241 /usr/share/texmf/fonts/type1/public/tex-gyre/qagbi.pfb
7f667a341000-7f667a35c000 r--s 00000000 08:02 1275730 /usr/share/texmf/fonts/type1/public/lm/lmtcsc10.pfb
7f667a35c000-7f667a376000 r--s 00000000 08:02 1978256 /usr/share/texmf/fonts/type1/public/tex-gyre/qhvbi.pfb
7f667a376000-7f667a37f000 r--s 00000000 08:02 1969318 /usr/share/fonts/X11/Type1/c0649bt_.pfb
7f667a37f000-7f667a3a1000 r--s 00000000 08:02 1275718 /usr/share/texmf/fonts/type1/public/lm/lmtlco10.pfb
7f667a3a1000-7f667a3c1000 r--s 00000000 08:02 1978224 /usr/share/texmf/fonts/type1/public/tex-gyre/qtmbi.pfb
7f667a3c1000-7f667a3de000 r--s 00000000 08:02 1275759 /usr/share/texmf/fonts/type1/public/lm/lmssqbx8.pfb
7f667a3de000-7f667a3f9000 r--s 00000000 08:02 1275756 /usr/share/texmf/fonts/type1/public/lm/lmsso10.pfb

我正在使用 Ubuntu 13.10 64 位,正在运行:

java version "1.7.0_51"
OpenJDK Runtime Environment (IcedTea 2.4.4) (7u51-2.4.4-0ubuntu0.13.04.2)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)

感谢您的帮助:)

最佳答案

我知道这是一个旧线程,但以防有人因同样的错误而失败。

This is a multi-threading issue with a native library you are using.

长话短说,java将本地库加载到内存中,然后被多个线程同时访问,然后弹出这个错误。

此问题的快速解决方法是将生成此错误的方法标记为同步


@kit评论后更新。

无法在多线程环境中运行此类 native 库。

您的选择是:

  • 修改 native 库以使其成为线程安全的(如果您有权访问其代码)。
  • 将其包装为一个应用程序并将多个副本作为单独的进程运行(因为每个进程加载一次 native 库)
  • 将其包装为一项服务并运行多个副本,使用套接字或适当的更高级别的 RPC 机制与其通信。

致谢:Load the same dynamic library in two threads (both threads in the same JVM)

关于java double free or corruption,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22491797/

36 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com