Sample libcallstack.so does not work on AARCH64 core

34 views
Skip to first unread message

King Jane

unread,
Mar 5, 2025, 10:28:10 PMMar 5
to DynamoRIO Users
截屏2025-03-06 10.50.16.png

This command does not output the call stack and must be terminated manually using Ctrl+C.

On openEuler 22.03 (LTS-SP4) running on a Kunpeng-920 core (AArch64)

Adding the -debug option produces the following output, with the main error message being:

<Application /usr/bin/ls (3706039).  Internal Error: DynamoRIO debug check failure: /home/runner/work/dynamorio/dynamorio/core/unix/memcache.c:225 ALIGNED(start, PAGE_SIZE)

Does anyone know what the problem is?


[DynamoRIO-AArch64-Linux-11.3.0-1]$ ./bin64/drrun -debug  -c samples/bin64/libcallstack.so -- ls                                                                                      [45/48482]

<Starting application /usr/bin/ls (3706039)>                                                                                                                                                                      

<Initial options = -no_dynamic_options -client_lib '/home/king/DynamoRIO-AArch64-Linux-11.3.0-1/samples/bin64/libcallstack.so;0;' -client_lib64 '/home/king/DynamoRIO-AArch64-Linux-11.3.0-1/samples/bin64/libcall

stack.so;0;' -code_api -stack_size 56K -signal_stack_size 32K -max_elide_jmp 0 -max_elide_call 0 -early_inject -emulate_brk -no_inline_ignored_syscalls -native_exec_default_list '' -no_native_exec_managed_code 

-no_indcall2direct >                                                                                                                                                                                              

<private libpthread.so loaded but not fully supported (i#956)>                                                                                                                                                    

<Paste into GDB to debug DynamoRIO clients:                                                                                                                                                                       

set confirm off                                                                                                                                                                                                   

add-symbol-file '/home/king/DynamoRIO-AArch64-Linux-11.3.0-1/samples/bin64/libcallstack.so' 0x0000ffff798a1e70                                                                                                    

add-symbol-file '/home/king/DynamoRIO-AArch64-Linux-11.3.0-1/lib64/debug/libdynamorio.so' 0x000000007101c368                                                                                                      

add-symbol-file '/home/king/DynamoRIO-AArch64-Linux-11.3.0-1/ext/lib64/debug/libdrwrap.so' 0x0000ffff798e2630                                                                                                     

add-symbol-file '/home/king/DynamoRIO-AArch64-Linux-11.3.0-1/ext/lib64/debug/libdrmgr.so' 0x0000ffff79904470                                                                                                      

add-symbol-file '/home/king/DynamoRIO-AArch64-Linux-11.3.0-1/ext/lib64/debug/libdrcallstack.so' 0x0000ffff79924880                                                                                                

add-symbol-file '/usr/lib64/libunwind.so.8' 0x0000ffffbd89a040                                                                                                                                                    

add-symbol-file '/usr/lib64/libc.so.6' 0x0000ffffbd712c80                                                                                                                                                         

add-symbol-file '/usr/lib/ld-linux-aarch64.so.1' 0x0000ffffbd6a5f80                                                                                                                                               

add-symbol-file '/usr/lib64/libgcc_s.so.1' 0x0000ffffbd6759f0

add-symbol-file '/home/king/DynamoRIO-AArch64-Linux-11.3.0-1/ext/lib64/debug/libdrsyms.so' 0x0000ffff7993f470

add-symbol-file '/usr/lib64/libpthread.so.0' 0x0000ffffbd6517d0

add-symbol-file '/usr/lib64/libstdc++.so.6' 0x0000ffffbd4cfb80

add-symbol-file '/usr/lib64/libm.so.6' 0x0000ffffbd395b70

>

<CURIOSITY : addr == ma->start in file /home/runner/work/dynamorio/dynamorio/core/unix/os.c line 7304

version 11.3.0, build 1

-no_dynamic_options -client_lib '/home/king/DynamoRIO-AArch64-Linux-11.3.0-1/samples/bin64/libcallstack.so;0;' -client_lib64 '/home/king/DynamoRIO-AArch64-Linux-11.3.0-1/samples/bin64/libcallstack.so;0;' -code_

api -stack_size 56K -signal_stack_size 32K -max_elide_jmp 0 -max_elide_call 0 -early_inject -emulate_brk -no_inl

0x0000fffd7993c9a0 0x0000000071458868

0x0000fffd7993cb40 0x00000000710bc430

0x0000fffd7993cd90 0x00000000710b4658

0x0000fffd7993ce80 0x00000000710afc58

0x0000fffd7993cf40 0x0000ffffbd90295c

0x0000ffffe52e08f0 0x0000ffffbd90394c

0x0000ffffe52e0e80 0x0000ffffbd8fc200

0x0000ffffe52e1290 0x0000ffffbd90f484

0x0000ffffe52e12b0 0x0000ffffbd8fc76c

0x0000ffffe52e1480 0x0000ffffbd913b14

0x0000ffffe52e19a0 0x0000ffffbd910bec

0x0000ffffe52e1cc0 0x0000ffffbd9122c8

0x0000ffffe52e1d30 0x0000ffffbd916154

/home/king/DynamoRIO-AArch64-Linux-11.3.0-1/lib64/debug/libdynamorio.so=0x0000000071000000

/home/king/DynamoRIO-AArch64-Linux-11.3.0-1/samples/bin64/libcallstack.so=0x0000ffff798a0000

/usr/lib64/libstdc++.so.6=0x0000ffffbd42a000

/usr/lib64/libm.so.6=0x0000ffffbd388000

/home/king/DynamoRIO-AArch64-Linux-11.3.0-1/ext/lib64/debug/libdrsyms.so=0x0000ffff79937000

/usr/lib64/libpthread.so.0=0x0000ffffbd651000

/home/king/DynamoRIO-AArch64-Linux-11.3.0->

<CURIOSITY : (app_pc)((((ptr_uint_t)addr + len) + ((os_page_size())-1)) & (~((ptr_uint_t)(os_page_size())-1))) == ma->end in file /home/runner/work/dynamorio/dynamorio/core/unix/os.c line 7306

version 11.3.0, build 1

-no_dynamic_options -client_lib '/home/king/DynamoRIO-AArch64-Linux-11.3.0-1/samples/bin64/libcallstack.so;0;' -client_lib64 '/home/king/DynamoRIO-AArch64-Linux-11.3.0-1/samples/bin64/libcallstack.so;0;' -code_

api -stack_size 56K -signal_stack_size 32K -max_elide_jmp 0 -max_elide_call 0 -early_inject -emulate_brk -no_inl

0x0000fffd7993c9a0 0x0000000071458910

0x0000fffd7993cb40 0x00000000710bc430

0x0000fffd7993cd90 0x00000000710b4658

0x0000fffd7993ce80 0x00000000710afc58

0x0000fffd7993cf40 0x0000ffffbd90295c

0x0000ffffe52e08f0 0x0000ffffbd90394c

0x0000ffffe52e0e80 0x0000ffffbd8fc200

0x0000ffffe52e1290 0x0000ffffbd90f484

0x0000ffffe52e12b0 0x0000ffffbd8fc76c

0x0000ffffe52e1480 0x0000ffffbd913b14

0x0000ffffe52e19a0 0x0000ffffbd910bec

0x0000ffffe52e1cc0 0x0000ffffbd9122c8

0x0000ffffe52e1d30 0x0000ffffbd916154

/home/king/DynamoRIO-AArch64-Linux-11.3.0-1/lib64/debug/libdynamorio.so=0x0000000071000000

/home/king/DynamoRIO-AArch64-Linux-11.3.0-1/samples/bin64/libcallstack.so=0x0000ffff798a0000

/usr/lib64/libstdc++.so.6=0x0000ffffbd42a000

/usr/lib64/libm.so.6=0x0000ffffbd388000

/home/king/DynamoRIO-AArch64-Linux-11.3.0-1/ext/lib64/debug/libdrsyms.so=0x0000ffff79937000

/usr/lib64/libpthread.so.0=0x0000ffffbd651000

/home/king/DynamoRIO-AArch64-Linux-11.3.0->

<all_memory_areas is missing regions including 0x0000ffffbd0e0000-0x0000ffffbd123000>

<Application /usr/bin/ls (3706039).  Internal Error: DynamoRIO debug check failure: /home/runner/work/dynamorio/dynamorio/core/unix/memcache.c:225 ALIGNED(start, PAGE_SIZE)

(Error occurred @948 frags in tid 3706039)

version 11.3.0, build 1

-no_dynamic_options -client_lib '/home/king/DynamoRIO-AArch64-Linux-11.3.0-1/samples/bin64/libcallstack.so;0;' -client_lib64 '/home/king/DynamoRIO-AArch64-Linux-11.3.0-1/samples/bin64/libcallstack.so;0;' -code_

api -stack_size 56K -signal_stack_size 32K -max_elide_jmp 0 -max_elide_call 0 -early_inject -emulate_brk -no_inl

0x0000fffd7993c630 0x00000000710c91fc

0x0000fffd7993c7d0 0x000000007148bea8

0x0000fffd7993ca20 0x000000007148c40c

0x0000fffd7993ca60 0x000000007148c79c

0x0000fffd7993caf0 0x000000007148cf0c

0x0000fffd7993cb40 0x00000000714601e8

0x0000fffd7993cbc0 0x0000000071460210

0x0000fffd7993cbe0 0x0000000071192b5c

0x0000fffd7993cc00 0x0000000071192bdc

0x0000fffd7993cc70 0x000000007145d198

0x0000fffd7993ccd0 0x00000000710bd180

0x0000fffd7993ce50 0x00000000710b460c

0x0000fffd7993ce80 0x00000000710afc58

0x0000fffd7993cf40 0x0000ffffbd90295c

0x0000ffffe52e08f0 0x0000ffffbd90394c

/home/king/DynamoRIO-AArch64-Linux-11.3.0-1/lib64/debug/libdynamorio.so=0x0000000071000000

/home/king/DynamoRIO-AArch64-Linux-11.3.0-1/samples/bin64/libcallstack.so=0x0000ffff798a0000

/usr/lib64/libstdc++.so.6=0x0000ffffbd42a000

/usr/lib64/libm.so.6=0x0000ffffbd388000

/home/king/DynamoRIO-AArch64-Linux-11.3.0-1/ext/lib64/debug/libdrsyms.so=0x0000ffff79937000

/usr/lib64/libpthread.so.0=0x0000ffffbd651000

/home/king/DynamoRIO-AArch64-Linux-11.3.0->



Abhinav Sharma

unread,
Mar 6, 2025, 9:32:05 AMMar 6
to DynamoRIO Users
Hello,
Thanks for reaching out. Based on first impression, this looks like a bug. Could you please file a bug report at https://github.com/DynamoRIO/dynamorio/issues? Remember to include all details requested by the template, and perhaps also the libc version.

Abhinav

King Jane

unread,
Mar 6, 2025, 8:56:50 PMMar 6
to DynamoRIO Users
Hello Abhinav,
Thank you for your response. I will proceed to file a bug report at the provided link. 

Best regards,
King
Reply all
Reply to author
Forward
0 new messages