Fatal Java error when trying to use Tabula-py

32 views Asked by At

All my current code:

import tabula

pdfpath= "Testpdfs/HSA certCut.pdf"

sbc = tabula.read_pdf(pdfpath, stream=True, pages=4, format="CSV")[0]

print(sbc)

I have a fresh install of python3 and the latest JDK for ARM64.

When running, i get this error:


# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGBUS (0xa) at pc=0x000000011b2ad34c, pid=75744, tid=259
#
# JRE version:  (22.0+36) (build )
# Java VM: Java HotSpot(TM) 64-Bit Server VM (22+36-2370, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-aarch64)
# Problematic frame:
# V  [libjvm.dylib+0x45934c]  CodeHeap::allocate(unsigned long)+0x1a4
#
# No core dump will be written. 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:
# /Users/dmesser3/Desktop/tabulapy Tests/hs_err_pid75744.log
#

I don't know what is going wrong and I can't seem to find a fix. Any help is appreciated. See error log below.

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGBUS (0xa) at pc=0x000000011b2ad34c, pid=75744, tid=259
#
# JRE version:  (22.0+36) (build )
# Java VM: Java HotSpot(TM) 64-Bit Server VM (22+36-2370, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-aarch64)
# Problematic frame:
# V  [libjvm.dylib+0x45934c]  CodeHeap::allocate(unsigned long)+0x1a4
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
#

---------------  S U M M A R Y ------------

Command Line: -Djava.awt.headless=true -Dfile.encoding=UTF8 

Host: "MacBookPro18,2" arm64, 10 cores, 64G, Darwin 23.4.0, macOS 14.4 (23E214)
Time: Thu Mar 21 10:59:40 2024 EDT elapsed time: 0.042656 seconds (0d 0h 0m 0s)

---------------  T H R E A D  ---------------

Current thread (0x0000000156d36200):  JavaThread "Unknown thread" [_thread_in_vm, id=259, stack(0x000000016e5c0000,0x000000016f5c0000) (16384K)]

Stack: [0x000000016e5c0000,0x000000016f5c0000],  sp=0x000000016f5bd160,  free space=16372k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.dylib+0x45934c]  CodeHeap::allocate(unsigned long)+0x1a4
V  [libjvm.dylib+0x2781fc]  CodeCache::allocate(unsigned int, CodeBlobType, bool, CodeBlobType)+0xa0
V  [libjvm.dylib+0x26f590]  BufferBlob::create(char const*, unsigned int)+0xf0
V  [libjvm.dylib+0x935764]  initialize_stubs(StubCodeGenerator::StubsKind, int, int, char const*, char const*, char const*)+0x9c
V  [libjvm.dylib+0x9359ec]  initial_stubs_init()+0x44
V  [libjvm.dylib+0x4863f0]  init_globals()+0x2c
V  [libjvm.dylib+0x993f58]  Threads::create_vm(JavaVMInitArgs*, bool*)+0x260
V  [libjvm.dylib+0x53e08c]  JNI_CreateJavaVM+0x68
C  [_jpype.cpython-39-darwin.so+0x10e84]  JPContext::startJVM(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&, bool, bool, bool)+0xd0
C  [_jpype.cpython-39-darwin.so+0x3c730]  PyJPModule_startup(_object*, _object*)+0x1f8
C  [Python3+0x83d64]  PyCFunction_GetFlags+0x338
C  [Python3+0x407c8]  _PyObject_MakeTpCall+0x168
C  [Python3+0x112664]  _PyEval_EvalFrameDefault+0x8784
C  [Python3+0x10f754]  _PyEval_EvalFrameDefault+0x5874
C  [Python3+0x1134ac]  _PyEval_EvalFrameDefault+0x95cc
C  [Python3+0x40f58]  _PyFunction_Vectorcall+0xec
C  [Python3+0x40c00]  PyVectorcall_Call+0x90
C  [Python3+0x10fa28]  _PyEval_EvalFrameDefault+0x5b48
C  [Python3+0x1134ac]  _PyEval_EvalFrameDefault+0x95cc
C  [Python3+0x40f58]  _PyFunction_Vectorcall+0xec
C  [Python3+0x4056c]  _PyObject_FastCallDictTstate+0x8c
C  [Python3+0x41338]  _PyObject_Call_Prepend+0x94
C  [Python3+0xa575c]  _PyType_Lookup+0x94a0
C  [Python3+0x9cbb8]  _PyType_Lookup+0x8fc
C  [Python3+0x407c8]  _PyObject_MakeTpCall+0x168
C  [Python3+0x112664]  _PyEval_EvalFrameDefault+0x8784
C  [Python3+0x10f84c]  _PyEval_EvalFrameDefault+0x596c
C  [Python3+0x1134ac]  _PyEval_EvalFrameDefault+0x95cc
C  [Python3+0x40f58]  _PyFunction_Vectorcall+0xec
C  [Python3+0x112604]  _PyEval_EvalFrameDefault+0x8724
C  [Python3+0x10f84c]  _PyEval_EvalFrameDefault+0x596c
C  [Python3+0x1134ac]  _PyEval_EvalFrameDefault+0x95cc
C  [Python3+0x40f58]  _PyFunction_Vectorcall+0xec
C  [Python3+0x112604]  _PyEval_EvalFrameDefault+0x8724
C  [Python3+0x10f84c]  _PyEval_EvalFrameDefault+0x596c
C  [Python3+0x1134ac]  _PyEval_EvalFrameDefault+0x95cc
C  [Python3+0x109e18]  PyEval_EvalCode+0x50
C  [Python3+0x14de54]  PyParser_ASTFromStringObject+0x1f4
C  [Python3+0x14e028]  PyRun_FileExFlags+0x154
C  [Python3+0x14c154]  PyRun_SimpleFileExFlags+0x334
C  [Python3+0x1692b0]  Py_RunMain+0x644
C  [Python3+0x169720]  Py_Main+0x174
C  [Python3+0x1697c0]  Py_BytesMain+0x28
C  [dyld+0x60e0]  start+0x938

siginfo: si_signo: 10 (SIGBUS), si_code: 1 (BUS_ADRALN), si_addr: 0x0000000176fe000



---------------  P R O C E S S  ---------------

Threads class SMR info:
_java_thread_list=0x000000011bb11bd8, length=0, elements={
}

Java Threads: ( => current thread )
Total: 0

Other Threads:

=>0x0000000156d36200 (exited) JavaThread "Unknown thread"    [_thread_in_vm, id=259, stack(0x000000016e5c0000,0x000000016f5c0000) (16384K)]
Total: 1

Threads with active compile tasks:
Total: 0

VM state: not at safepoint (not fully initialized)

VM Mutex/Monitor currently owned by a thread:  ([mutex/lock_event])
[0x000000011bb6cd58] CodeCache_lock - owner thread: 0x0000000156d36200

Heap address: 0x0000000000000000, size: 0 MB, Compressed Oops mode: 32-bit

CDS archive(s) mapped at: [0x0000000000000000-0x0000000000000000-0x0000000000000000), size 0, SharedBaseAddress: 0x0000000800000000, ArchiveRelocationMode: 1.
Narrow klass base: 0x0000000000000000, Narrow klass shift: 0, Narrow klass range: 0x0

GC Precious Log:
<Not initialized>

Dll operation events (1 events):
Event: 0.041 Loaded shared library /Library/Java/JavaVirtualMachines/jdk-22.jdk/Contents/Home/lib/libjava.dylib

Events (1 events):
Event: 0.009 Protecting memory [0x000000016e5c0000,0x000000016e5cc000] with protection modes 0

VM Arguments:
jvm_args: -Djava.awt.headless=true -Dfile.encoding=UTF8 
java_command: <unknown>
java_class_path (initial): /Users/dmesser3/Library/Python/3.9/lib/python/site-packages/tabula/tabula-1.0.5-jar-with-dependencies.jar
Launcher Type: generic

[Global flags]
     intx CICompilerCount                          = 4                                         {product} {ergonomic}
     uint ConcGCThreads                            = 2                                         {product} {ergonomic}
     uint G1ConcRefinementThreads                  = 9                                         {product} {ergonomic}
   size_t InitialHeapSize                          = 1073741824                                {product} {ergonomic}
   size_t MarkStackSize                            = 4194304                                   {product} {ergonomic}
   size_t MaxHeapSize                              = 17179869184                               {product} {ergonomic}
   size_t MinHeapSize                              = 6815736                                   {product} {ergonomic}
    uintx NonNMethodCodeHeapSize                   = 5839564                                {pd product} {ergonomic}
    uintx NonProfiledCodeHeapSize                  = 122909338                              {pd product} {ergonomic}
    uintx ProfiledCodeHeapSize                     = 122909338                              {pd product} {ergonomic}
    uintx ReservedCodeCacheSize                    = 251658240                              {pd product} {ergonomic}
     bool SegmentedCodeCache                       = true                                      {product} {ergonomic}
     bool UseCompressedOops                        = true                           {product lp64_product} {ergonomic}
     bool UseG1GC                                  = true                                      {product} {ergonomic}
     bool UseNUMA                                  = false                                     {product} {ergonomic}
     bool UseNUMAInterleaving                      = false                                     {product} {ergonomic}

Logging:
Log output configuration:
 #0: stdout all=warning uptime,level,tags foldmultilines=false
 #1: stderr all=off uptime,level,tags foldmultilines=false

Environment Variables:
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-22.jdk/Contents/Home
PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/homebrew/bin:/opt/homebrew/sbin
SHELL=/bin/zsh
LANG=en_US.UTF-8
TERM=xterm-256color
TMPDIR=/var/folders/hd/tm_c7_6n6dzgb384j3rs7j800000gq/T/

Active Locale:
LC_ALL=C/en_US.UTF-8/C/C/C/C
LC_COLLATE=C
LC_CTYPE=en_US.UTF-8
LC_MESSAGES=C
LC_MONETARY=C
LC_NUMERIC=C
LC_TIME=C

Signal Handlers:
   SIGSEGV: crash_handler in libjvm.dylib, mask=11100110000111110111111111111111, flags=SA_ONSTACK|SA_RESTART|SA_SIGINFO, unblocked
    SIGBUS: crash_handler in libjvm.dylib, mask=11100110000111110111111111111111, flags=SA_RESTART|SA_SIGINFO, unblocked
    SIGFPE: crash_handler in libjvm.dylib, mask=11100110000111110111111111111111, flags=SA_RESTART|SA_SIGINFO, unblocked
   SIGPIPE: javaSignalHandler in libjvm.dylib, mask=11100110000111110111111111111111, flags=SA_RESTART|SA_SIGINFO, blocked
   SIGXFSZ: javaSignalHandler in libjvm.dylib, mask=11100110000111110111111111111111, flags=SA_RESTART|SA_SIGINFO, blocked
    SIGILL: crash_handler in libjvm.dylib, mask=11100110000111110111111111111111, flags=SA_RESTART|SA_SIGINFO, unblocked
   SIGUSR2: SR_handler in libjvm.dylib, mask=00000000000000000000000000000000, flags=SA_RESTART|SA_SIGINFO, blocked
    SIGHUP: SIG_DFL, mask=00000000000000000000000000000000, flags=none, blocked
    SIGINT: PyInit__signal+1448 in Python3, mask=00000000000000000000000000000000, flags=none, blocked
   SIGTERM: SIG_DFL, mask=00000000000000000000000000000000, flags=SA_RESTART, blocked
   SIGQUIT: UserHandler in libjvm.dylib, mask=11100110000111110111111111111111, flags=SA_RESTART|SA_SIGINFO, blocked
   SIGTRAP: crash_handler in libjvm.dylib, mask=11100110000111110111111111111111, flags=SA_RESTART|SA_SIGINFO, unblocked


Periodic native trim disabled

---------------  S Y S T E M  ---------------

OS:
uname: Darwin 23.4.0 Darwin Kernel Version 23.4.0: Wed Feb 21 21:44:43 PST 2024; root:xnu-10063.101.15~2/RELEASE_ARM64_T6000 arm64
OS uptime: 2 days 18:43 hours
rlimit (soft/hard): STACK 8176k/65520k , CORE 0k/infinity , NPROC 10666/16000 , NOFILE 10240/infinity , AS infinity/infinity , CPU infinity/infinity , DATA infinity/infinity , FSIZE infinity/infinity , MEMLOCK infinity/infinity , RSS infinity/infinity
load average: 5.23 3.03 2.73

CPU: total 10 (initial active 10) 0x61:0x0:0x1b588bb3:0, fp, asimd, aes, pmull, sha1, sha256, crc32, lse, sha3, sha512
machdep.cpu.brand_string:Apple M1 Max
hw.cachelinesize:128
hw.l1icachesize:131072
hw.l1dcachesize:65536
hw.l2cachesize:4194304

Memory: 16k page, physical 67108864k(26293056k free), swap 0k(0k free)

vm_info: Java HotSpot(TM) 64-Bit Server VM (22+36-2370) for bsd-aarch64 JRE (22+36-2370), built on 2024-02-15T22:15:19Z by "mach5one" with clang Apple LLVM 14.0.3 (clang-1403.0.22.14.1)

END.

I ensured my path variables are correct. I ensured I have the proper installations of python and JDK. I homebrewed python3, and just used the dmg downloader for ARM64 JDK 22.

0

There are 0 answers