Hi,

It seems that crashed at

https://github.com/apache/arrow/blob/apache-arrow-16.1.0/java/gandiva/src/main/cpp/jni_common.cc#L612

or

https://github.com/apache/arrow/blob/apache-arrow-16.1.0/java/gandiva/src/main/cpp/jni_common.cc#L616

.

Could you check your schema and expressions that are passed
to Projector::make()?


Thanks,
-- 
kou


In 
 
<sezpr02mb5519da628a2be18c8dd40b9cdf...@sezpr02mb5519.apcprd02.prod.outlook.com>
  "回复: [DISCUSS][C++][JNI] libgandiva_jni.so fails to run on ARM platform (but 
compilation successful)" on Thu, 23 May 2024 02:04:14 +0000,
  即 云 <[email protected]> wrote:

> Hello Kou,
>      Thanks a lot for your reply.
>      We have followed your advice to adopt a copy of arrow package 16.x 
> including libgandiva_jni.so from 
> https://repository.apache.org/#nexus-search;quick~arrow-gandiva.
>      It seems worked w/o previous issues, however, when we tried a JAVA 
> program (worked w/ Arrow 9.x on x86 platform)  it got failed with errors 
> thrown out below.  I was wondering if there's any difference in JNI APIs 
> between arrow 9..x and 16.x, or where I can find out a workable compiled 
> version of Arrow which includes libgandiva_jni.so.
> 
>      Thanks again in advance!
> 
> 1.  Exception thrown from Java program:
>     Stack slot to memory mapping:
>     stack at sp + 0 slots: 0x00007f5a347ebb69: <offset 0x00000000008dfb69> in 
> /usr/lib/jvm/java-11-openjdk-amd64/lib/server/libjvm.so at 0x00007f5a33f0c000
>     stack at sp + 1 slots: 0x0 is NULL
>     stack at sp + 2 slots: 0x00007f59ed2698c0 is pointing into the stack for 
> thread: 0x00007f59e875a000
>     stack at sp + 3 slots: 0x00007f59e875a348 points into unknown readable 
> memory: 0x00007f5a35147b40 | 40 7b 14 35 5a 7f 00 00
>     stack at sp + 4 slots: 0x00007f59e2f8c3f7: 
> Java_org_apache_arrow_gandiva_evaluator_JniWrapper_buildProjector+0x0000000000000057
>  in /tmp/libgandiva_jni.soa81db5ba-fcd3-4494-b24b-3da3a3a99162 at             
>     0x00007f59e2b1b000
>     stack at sp + 5 slots: 0x00007f59ed269500 is pointing into the stack for 
> thread: 0x00007f59e875a000
>     stack at sp + 6 slots: 0x00007f5a344ec003: <offset 0x00000000005e0003> in 
> /usr/lib/jvm/java-11-openjdk-amd64/lib/server/libjvm.so at 0x00007f5a33f0c000
>     stack at sp + 7 slots: 0x00007f59ed2697b0 is pointing into the stack for 
> thread: 0x00007f59e875a000
> 
> 2.  GDB debug info:
> 
>     gdb /usr/bin/java core
> 
> (gdb) bt
> #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
> #1  0x00007f5a351f7859 in __GI_abort () at abort.c:79
> #2  0x00007f5a3418f435 in os::abort(bool, void*, void const*) [clone .cold] 
> () from /usr/lib/jvm/java-11-openjdk-amd64/lib/server/libjvm.so
> #3  0x00007f5a34da7e5d in VMError::report_and_die(int, char const*, char 
> const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, 
> int, unsigned long) () from 
> /usr/lib/jvm/java-11-openjdk-amd64/lib/server/libjvm.so
> #4  0x00007f5a34da89cf in VMError::report_and_die(Thread*, unsigned int, 
> unsigned char*, void*, void*, char const*, ...) () from 
> /usr/lib/jvm/java-11-openjdk-amd64/lib/server/libjvm.so
> #5  0x00007f5a34da8a02 in VMError::report_and_die(Thread*, unsigned int, 
> unsigned char*, void*, void*) () from 
> /usr/lib/jvm/java-11-openjdk-amd64/lib/server/libjvm.so
> #6  0x00007f5a34afd166 in JVM_handle_linux_signal () from 
> /usr/lib/jvm/java-11-openjdk-amd64/lib/server/libjvm.so
> #7  0x00007f5a34aefc8c in signalHandler(int, siginfo_t*, void*) () from 
> /usr/lib/jvm/java-11-openjdk-amd64/lib/server/libjvm.so
> #8  <signal handler called>
> #9  0x00007f5a34484764 in 
> AccessInternal::PostRuntimeDispatch<G1BarrierSet::AccessBarrier<1097844ul, 
> G1BarrierSet>, (AccessInternal::BarrierType)2, 
> 1097844ul>::oop_access_barrier(void*) () from 
> /usr/lib/jvm/java-11-openjdk-amd64/lib/server/libjvm.so
> #10 0x00007f5a347ebb69 in jni_GetArrayLength () from 
> /usr/lib/jvm/java-11-openjdk-amd64/lib/server/libjvm.so
> #11 0x00007f59e2f8c3f7 in 
> Java_org_apache_arrow_gandiva_evaluator_JniWrapper_buildProjector () from 
> /tmp/libgandiva_jni.soa81db5ba-fcd3-4494-b24b-3da3a3a99162
> #12 0x00007f5a147eaa30 in ?? ()
> #13 0x0000000000000001 in ?? ()
> #14 0x0000000000000000 in ?? ()
> ________________________________
> 发件人: Sutou Kouhei <[email protected]>
> 发送时间: 2024年5月20日 13:21
> 收件人: [email protected] <[email protected]>
> 主题: Re: [DISCUSS][C++][JNI] libgandiva_jni.so fails to run on ARM platform 
> (but compilation successful)
> 
> Hi,
> 
> https://github.com/apache/arrow/issues/30701 may be related.
> 
> BTW, recent our Gandiva packages include libgandiva_jni.so
> for ARM. You may able to use it instead of building it
> manually.
> 
> 
> Thanks,
> --
> kou
> 
> In
>  
> <sezpr02mb55192609c92ff3a349e0f10ddf...@sezpr02mb5519.apcprd02.prod.outlook.com>
>   "[DISCUSS][C++][JNI] libgandiva_jni.so fails to run on ARM platform (but 
> compilation successful)" on Mon, 20 May 2024 10:10:28 +0000,
>   即 云 <[email protected]> wrote:
> 
>> Greetings,
>>      I have encountered an issue about Arrow on ARM platform.
>>      We compiled successfully“libgandiva_jni.so”on ARM v8, but when we call 
>> this lib from JAVA environment, it throws out an error "Exception 
>> java.lang.UnsatisfiedLinkError:/tmp/libgandiva_jni.so9f8bef08-ab7f-425d-8b42-11f522026a10;undefined
>>  symbol: _ZTIN4llvm11ObjectCacheE"
>>      Would you anybody give me some clues to handle this issue?  Thanks in 
>> advance!
>>
>> Env. details:
>> Arrow version:maint-9.0.0 (https://github.com/apache/arrow/tree/maint-9.0.0)
>> OS:CentOS 7.6 with ARM
>> Gcc/llvm:gcc 8.3.1 ,llvm 14.0.0
>> Compilation flags:
>> mkdir cpp/build
>> cd  cpp/build
>> cmake .. -DARROW_GANDIVA_JAVA=ON -DARROW_GANDIVA=ON  -DARROW_WITH_RE2=ON 
>> -DARROW_WITH_UTF8PROC=ON
>> make
>>
>> CPU info:
>> [root@ecs-5f21 arrow]# lscpu
>> Architecture:          aarch64
>> Byte Order:            Little Endian
>> CPU(s):                2
>> On-line CPU(s) list:   0,1
>> Thread(s) per core:    1
>> Core(s) per socket:    2
>> Socket(s):             1
>> NUMA node(s):          1
>> Model:                 0
>> CPU max MHz:           2400.0000
>> CPU min MHz:           2400.0000
>> BogoMIPS:              200.00
>> L1d cache:             64K
>> L1i cache:             64K
>> L2 cache:              512K
>> L3 cache:              32768K
>> NUMA node0 CPU(s):     0,1
>> Flags:                 fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics 
>> fphp asimdhp cpuid asimdrdm jscvt fcma dcpop asimddp asimdfhm

Reply via email to