DynamoRIO client on FLEET Benchmark

36 views
Skip to first unread message

Chaitanya Mamatha Ananda

unread,
Mar 6, 2024, 11:31:23 PMMar 6
to DynamoRIO Users
Hi everyone,

I wish to know how to use the shared library to be loaded as part of the client while running on the FLEET benchmark.

I used the same set of commands as one of the users have mentioned in this URL: https://github.com/DynamoRIO/dynamorio/issues/6409.

This is the command mentioned by that user in the above URL for running the fleetbench on drcachesim:
$GLIBC_TUNABLES=glibc.pthread.rseq=0<path-to-bazelisk>/bazelisk run \
--run_under="${DRUN} -t drcachesim -offline -outdir ${OUTDIR} --" \ --config=clang --config=opt "fleetbench/swissmap:hot_swissmap_smoketest"
The above command works for me in my Linux x86 system. However, instead of drcachesim's default shared library, I want to use my shared library (libcustom.so) like this:

$GLIBC_TUNABLES=glibc.pthread.rseq=0 <path-to-bazelisk>/bazelisk run \
--run_under="${DRUN} -c <path-to-library>/libcustom.so --" \ --config=clang --config=opt "fleetbench/swissmap:hot_swissmap_smoketest" I am not sure, if the above command is the correct way of using. If anyone has done this before, it would be helpful if you could correct me. Please let me know if you need more information.

Derek Bruening

unread,
Mar 7, 2024, 7:56:24 PMMar 7
to Chaitanya Mamatha Ananda, DynamoRIO Users
Yes, as you can see in the docs https://dynamorio.org/page_deploy.html#lin_deploy that looks correct.

--
You received this message because you are subscribed to the Google Groups "DynamoRIO Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dynamorio-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dynamorio-users/9780ce0c-f61e-4750-ba94-0568aa475097n%40googlegroups.com.

Chaitanya Mamatha Ananda

unread,
Mar 7, 2024, 8:11:51 PMMar 7
to DynamoRIO Users
Thanks for your reply.

So, before using my shared library. I tried with DynamoRIO's libwrap.so found inside samples/bin64/libwrap.so.

I tried this command: 

$GLIBC_TUNABLES=glibc.pthread.rseq=0 <path-to-bazelisk>/bazelisk run --run_under="${DRUN} -debug -loglevel 2 -c ${PWD}/DynamoRIO/samples/bin64/libwrap.so --" --config=clang --config=opt "fleetbench/tcmalloc:empirical_driver"

However, I get the below error:

<Starting application /rhome/cmama002/.cache/bazel/_bazel_cmama002/866f85e5deee5aeff31db3b8bd58d797/execroot/com_google_fleetbench/bazel-out/k8-opt-clang/bin/fleetbench/tcmalloc/empirical_driver (4088350)>

<Initial options = -no_dynamic_options -loglevel 2 -client_lib '/scratch/fleetbench/install/DynamoRIO/samples/bin64/libwrap.so;0;' -client_lib64 '/scratch/fleetbench/install/DynamoRIO/samples/bin64/libwrap.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 >

<Paste into GDB to debug DynamoRIO clients:

set confirm off

add-symbol-file '/scratch/fleetbench/install/DynamoRIO/samples/bin64/libwrap.so' 0x000014dccfbb1300

add-symbol-file '/scratch/fleetbench/install/DynamoRIO/lib64/debug/libdynamorio.so' 0x000014dd14d21000

add-symbol-file '/scratch/fleetbench/install/DynamoRIO/ext/lib64/debug/libdrwrap.so' 0x000014dccfbf67d0

add-symbol-file '/scratch/fleetbench/install/DynamoRIO/ext/lib64/debug/libdrmgr.so' 0x000014dccfc09cb0

add-symbol-file '/lib/x86_64-linux-gnu/libc.so.6' 0x000014dd14700780

add-symbol-file '/usr/lib64/ld-linux-x86-64.so.2' 0x000014dd14c9e000

>

Client wrap is running

<wrapped malloc @0x000014dd0fdb6dc0

<spurious rep/repne prefix @0x000014dd14901a60 (f3 0f 1e fa): >

<curiosity: rex.w on OPSZ_6_irex10_short4!>

<(1+x) Handling our fault in a TRY at 0x000014dd14f8ac3a>

<wrapped malloc @0x000014dd14578920

<Application /rhome/cmama002/.cache/bazel/_bazel_cmama002/866f85e5deee5aeff31db3b8bd58d797/execroot/com_google_fleetbench/bazel-out/k8-opt-clang/bin/fleetbench/tcmalloc/empirical_driver (4088350).  Internal Error: DynamoRIO debug check failure: /home/runner/work/dynamorio/dynamorio/core/arch/interp.c:6426 false

(Error occurred @8708 frags in tid 4088350)

version 9.91.19412, custom build

-no_dynamic_options -loglevel 2 -client_lib '/scratch/fleetbench/install/DynamoRIO/samples/bin64/libwrap.so;0;' -client_lib64 '/scratch/fleetbench/install/DynamoRIO/samples/bin64/libwrap.so;0;' -code_api -stack_size 56K -signal_stack_size 32K -max_elide_jmp 0 -max_e

0x000014dacfc5a910 0x000014dd14dbc670

0x000014dacfc5ab60 0x000014dd14f5d6b6

0x000014dacfc5ac10 0x000014dd14f5ebc0

0x000014dacfc5acc0 0x000014dd14e69d12

0x000014dacfc5ad10 0x000014dd14e6c311

0x000014dacfc5af10 0x000014dd14da42f6

0x000014dacfc5aff0 0x000014dccfbc0f05

0x00007ffc5a5ef430 0x000014dd0fd589b6

0x00007ffc5a5ef460 0x000014dd0fd5888c

0x00007ffc5a5ef490 0x000014dd0fd5892e

0x00007ffc5a5ef4b0 0x000014dd0fd52084

0x00007ffc5a5ef5a0 0x000014dd0fd48099

0x00007ffc5a5ef6d0 0x000014dd0fd5080d

0x00007ffc5a5ef700 0x000014dd0fd4fa3a

0x00007ffc5a5ef7a0 0x000014dd144fca90

/scratch/fleetbench/install/DynamoRIO/lib64/debug/libdynamorio.so=0x000014dd14cd5000

/scratch/fleetbench/install/DynamoRIO/samples/bin64/libwrap.so=0x000014dccfbb0000

/lib/x86_64-linux-gnu/libc.so.6=0x000014dd146de000

/usr/lib64/ld-linux-x86-64.so.2=0x000014dd14c9d000

/scratch/fleetbench/install/DynamoRIO/ext/lib64/debug/libdrwrap.so=0x000014dccfbf3000

/scratch/c>


Will you please help me solve this issue?

Derek Bruening

unread,
Mar 7, 2024, 8:29:33 PMMar 7
to Chaitanya Mamatha Ananda, DynamoRIO Users
First, use the latest DR: yours is a year old.  Second, as its docs say, the wrap sample "randomly changes a malloc to return failure" so it is not a good choice if you want the app to run without problems.

Chaitanya Mamatha Ananda

unread,
Mar 7, 2024, 9:15:08 PMMar 7
to DynamoRIO Users
Okay. I updated the DynamoRIO to version 10.0.19782 (Latest version).

Instead of libwrap.so, I used libinscount.so.

Now, I am getting this error:

<log dir=/scratch/fleetbench/install/DynamoRIO/bin64/../logs/empirical_driver.4099704.00000000>

<Starting application /rhome/cmama002/.cache/bazel/_bazel_cmama002/866f85e5deee5aeff31db3b8bd58d797/execroot/com_google_fleetbench/bazel-out/k8-opt-clang/bin/fleetbench/tcmalloc/empirical_driver (4099704)>

<Initial options = -no_dynamic_options -loglevel 2 -client_lib '/scratch/fleetbench/install/DynamoRIO/samples/bin64/libinscount.so;0;' -client_lib64 '/scratch/fleetbench/install/DynamoRIO/samples/bin64/libinscount.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 >

<spurious rep/repne prefix @0x0000147f193d9020 (f3 0f 1e fa): >

<Paste into GDB to debug DynamoRIO clients:

set confirm off

add-symbol-file '/scratch/fleetbench/install/DynamoRIO/samples/bin64/libinscount.so' 0x0000147ed4a885c0

add-symbol-file '/scratch/fleetbench/install/DynamoRIO/lib64/debug/libdynamorio.so' 0x0000147f19bf7000

add-symbol-file '/scratch/fleetbench/install/DynamoRIO/ext/lib64/debug/libdrmgr.so' 0x0000147ed4ad1cb0

add-symbol-file '/lib/x86_64-linux-gnu/libstdc++.so.6' 0x0000147f195f1540

add-symbol-file '/lib/x86_64-linux-gnu/libm.so.6' 0x0000147f19acf3c0

add-symbol-file '/lib/x86_64-linux-gnu/libc.so.6' 0x0000147f19369780

add-symbol-file '/usr/lib64/ld-linux-x86-64.so.2' 0x0000147f19a8a000

add-symbol-file '/lib/x86_64-linux-gnu/libgcc_s.so.1' 0x0000147f19a676c0

>

Client inscount is running

<curiosity: rex.w on OPSZ_6_irex10_short4!>

<(1+x) Handling our fault in a TRY at 0x0000147f19e629ef>

<Application /rhome/cmama002/.cache/bazel/_bazel_cmama002/866f85e5deee5aeff31db3b8bd58d797/execroot/com_google_fleetbench/bazel-out/k8-opt-clang/bin/fleetbench/tcmalloc/empirical_driver (4099704) DynamoRIO usage error : internal isa mode error>

<Usage error: internal isa mode error (/home/runner/work/dynamorio/dynamorio/core/ir/decode_shared.c, line 247)

version 10.0.19782, custom build

-no_dynamic_options -loglevel 2 -client_lib '/scratch/fleetbench/install/DynamoRIO/samples/bin64/libinscount.so;0;' -client_lib64 '/scratch/fleetbench/install/DynamoRIO/samples/bin64/libinscount.so;0;' -code_api -stack_size 56K -signal_stack_size 32K -max_elide_jmp 

/scratch/fleetbench/install/DynamoRIO/lib64/debug/libdynamorio.so=0x0000147f19bab000

/scratch/fleetbench/install/DynamoRIO/samples/bin64/libinscount.so=0x0000147ed4a86000

/lib/x86_64-linux-gnu/libstdc++.so.6=0x0000147f1954d000

/lib/x86_64-linux-gnu/libgcc_s.so.1=0x0000147f19a64000

/lib/x86_64-linux-gnu/libm.so.6=0x0000147f19ac1000

/lib/x86_64-linux-gnu/libc.so.6=0x0000147f19347000

/usr/lib6>

Derek Bruening

unread,
Mar 8, 2024, 10:19:16 AMMar 8
to Chaitanya Mamatha Ananda, DynamoRIO Users
These are weird errors that nobody else has seen.  That implies something unusual about your hardware, OS, system libraries, or DR build.  I would do sanity checks like running a tiny hello,world under this DR build with no client at all; if that works, maybe back to your target app but with no client at all.  I would get a callstack of this strange isa mode assert.

Reply all
Reply to author
Forward
0 new messages