Error simulating any program

353 views
Skip to first unread message

Andriy Sultanov

unread,
Nov 15, 2023, 10:13:51 AM11/15/23
to Sniper simulator
After struggling with compiling the program (the fix seemed to be to add "#include <cstdint>" in decoder.h), I am now unable to run any programs with it. No matter the arguments I pass to run-sniper, it errors out with the same message:

```
$ ./run-sniper -- /bin/ls
[SNIPER] Start
[SNIPER] --------------------------------------------------------------------------------
[SNIPER] Sniper using SIFT/trace-driven frontend
[SNIPER] Running full application in DETAILED mode
[SNIPER] --------------------------------------------------------------------------------
[SNIPER] Enabling performance models
[SNIPER] Setting instrumentation mode to DETAILED
[RECORD-TRACE] Using the Pin frontend (sift/recorder)
A: Source/pin/elfio/img_elf.cpp: ProcessSectionHeaders: 809: unknown section type 0x13 for sec[39,.relr.dyn] in /lib64/ld-linux-x86-64.so.2

################################################################################
## STACK TRACE
################################################################################
??? at /home/lastgenius/Documents/dundee/thesis/snipersim/sift/recorder/obj-intel64/sift_recorder+0x000360c91

??? at /home/lastgenius/Documents/dundee/thesis/snipersim/sift/recorder/obj-intel64/sift_recorder+0x000367dcc

??? at /home/lastgenius/Documents/dundee/thesis/snipersim/sift/recorder/obj-intel64/sift_recorder+0x0002f919c

??? at /home/lastgenius/Documents/dundee/thesis/snipersim/sift/recorder/obj-intel64/sift_recorder+0x0002fbabd

??? at /home/lastgenius/Documents/dundee/thesis/snipersim/sift/recorder/obj-intel64/sift_recorder+0x0002fbb6f

??? at /home/lastgenius/Documents/dundee/thesis/snipersim/sift/recorder/obj-intel64/sift_recorder+0x00033601e

??? at /home/lastgenius/Documents/dundee/thesis/snipersim/sift/recorder/obj-intel64/sift_recorder+0x00033abfc

??? at /home/lastgenius/Documents/dundee/thesis/snipersim/sift/recorder/obj-intel64/sift_recorder+0x0003163d7

LEVEL_INJECTOR::UNIX_INJECTEE::StartProgram+0x000000101 at /home/lastgenius/Documents/dundee/thesis/snipersim/pin_kit/intel64/bin/pinbin+0x000396a51

??? at /home/lastgenius/Documents/dundee/thesis/snipersim/sift/recorder/obj-intel64/sift_recorder+0x000312def

main+0x0000002df at /home/lastgenius/Documents/dundee/thesis/snipersim/sift/recorder/obj-intel64/sift_recorder+0x00001912f

LEVEL_INJECTOR::UNIX_INJECTEE::StartTool+0x000000212 at /home/lastgenius/Documents/dundee/thesis/snipersim/pin_kit/intel64/bin/pinbin+0x000395392

LEVEL_INJECTOR::UNIX_INJECTEE::RunMainThreadOnPinStackAttach+0x000000429 at /home/lastgenius/Documents/dundee/thesis/snipersim/pin_kit/intel64/bin/pinbin+0x0003981e9

Pin: pin-3.11-97998-7ecce2dac
Copyright 2002-2019 Intel Corporation.

[SIFT:0] Error: No such file or directory
[TRACE:0] -- DONE --
Pin app terminated abnormally due to signal 6.
[SNIPER] Disabling performance models
[SNIPER] Leaving ROI after 2.37 seconds
[SNIPER] Simulated 0.0M instructions, 0.0M cycles, 0.00 IPC
[SNIPER] Simulation speed 0.0 KIPS (0.0 KIPS / target core - 2369927167.9ns/instr)
[SNIPER] Setting instrumentation mode to FAST_FORWARD
[SNIPER] End
[SNIPER] Elapsed time: 2.58 seconds
Traceback (most recent call last):
  File "./run-sniper", line 925, in <module>
    gen_simout.generate_simout(resultsdir = outputdir, output = open(os.path.join(outputdir, 'sim.out'), 'w'), silent = True)
  File "./tools/gen_simout.py", line 61, in generate_simout
    for c in range(ncores)
ZeroDivisionError: float division by zero
```

Is this a known problem? Compiling did not give me any errors after the fix discussed above, and running run-sniper without any arguments does work, just giving me a help message.

Andriy Sultanov

unread,
Nov 15, 2023, 10:19:37 AM11/15/23
to Sniper simulator
Doing `make run` in test/fft does work for some reason, the program simulates successfully and I can use the output of the run. When I attempt to run the same command that test/fft/Makefile uses ("../../run-sniper -v -n 1 -c gainestown --roi -- ./fft -p 1") with, say, /bin/ls, I get the error message above, however

Trevor E. Carlson

unread,
Nov 15, 2023, 6:10:29 PM11/15/23
to as.andre...@gmail.com, snip...@googlegroups.com
Andriy,

Did you try the Sniper docker image from Docker Hub [1]?

Trevor

--
--
--
You received this message because you are subscribed to the Google
Groups "Sniper simulator" group.
To post to this group, send email to snip...@googlegroups.com
To unsubscribe from this group, send email to
snipersim+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/snipersim?hl=en

---
You received this message because you are subscribed to the Google Groups "Sniper simulator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to snipersim+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/snipersim/1c4513f0-9d9b-4925-acd5-c6acc362fab3n%40googlegroups.com.

Trevor E. Carlson

unread,
Nov 15, 2023, 6:11:33 PM11/15/23
to as.andre...@gmail.com, snip...@googlegroups.com
Andriy,

For some reason, /bin/ls is known to fail with Pin. Normal applications typically work fine.

Trevor

--
--
--
You received this message because you are subscribed to the Google
Groups "Sniper simulator" group.
To post to this group, send email to snip...@googlegroups.com
To unsubscribe from this group, send email to
snipersim+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/snipersim?hl=en

---
You received this message because you are subscribed to the Google Groups "Sniper simulator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to snipersim+...@googlegroups.com.

Andriy Sultanov

unread,
Nov 15, 2023, 6:25:09 PM11/15/23
to Sniper simulator
1. I did try the docker image, but it fails to find GLIBC for some reason, like this:

``` (inside the docker shell)
~/snipersim$ ./run-sniper -c gainestown /bin/cat Makefile
[SNIPER] Start
~/snipersim/lib/sniper: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by ~/snipersim/lib/sniper)
~/snipersim/lib/sniper: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by ~/snipersim/lib/sniper)
~/snipersim/lib/sniper: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ~/snipersim/lib/sniper)
~/snipersim/lib/sniper: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.32' not found (required by ~/snipersim/lib/sniper)
~/snipersim/lib/sniper: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by ~/snipersim/lib/sniper)
```

2. I got similar errors no matter the program I tried, I just decided to use /bin/ls as an example, it fails with me trying to run parsec benchmarks:
```
./run-sniper -v -n 1 -c gainestown --roi -- ../parsec-benchmark/bin/parsecmgmt -a run -p parsec.bodytrack -i simlarge -c gcc-pthreads
```

and with /bin/cat, for example:
```
./run-sniper -v -n 1 -c gainestown --roi -- /bin/cat Makefile
```

With these options ("-v -n 1 -c gainestown --roi", borrowed from test/fft), the stack trace from my original message in this thread is still present, but the floating error is not. If I remove the options, the stack trace is there along with the floating error.

Andriy Sultanov

unread,
Nov 15, 2023, 6:28:28 PM11/15/23
to Sniper simulator
I've just tried with the dockerhub image you provided instead of building a docker image from the repository as I did before, and /bin/ls and /bin/cat do work now. Thank you!

Though this is unrelated, I presume to access the rest of my filesystem (i.e. my parsec benchmarks) I'd have to mount docker drives with the usual procedure?

Andriy Sultanov

unread,
Nov 16, 2023, 5:35:51 AM11/16/23
to Sniper simulator
I still get GLIBC errors with my program though, whenever I try to launch it inside the dockerhub container:

```
$ bin/parsecmgmt -a run -p parsec.bodytrack -c gcc-pthreads -i simlarge
[....... output skipped.....]
/root/sniper/parsec/pkgs/apps/bodytrack/inst/amd64-linux.gcc-pthreads/bin/bodytrack: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by /root/sniper/parsec/pkgs/apps/bodytrack/inst/amd64-linux.gcc-pthreads/bin/bodytrack)
/root/sniper/parsec/pkgs/apps/bodytrack/inst/amd64-linux.gcc-pthreads/bin/bodytrack: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /root/sniper/parsec/pkgs/apps/bodytrack/inst/amd64-linux.gcc-pthreads/bin/bodytrack)
/root/sniper/parsec/pkgs/apps/bodytrack/inst/amd64-linux.gcc-pthreads/bin/bodytrack: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by /root/sniper/parsec/pkgs/apps/bodytrack/inst/amd64-linux.gcc-pthreads/bin/bodytrack)
/root/sniper/parsec/pkgs/apps/bodytrack/inst/amd64-linux.gcc-pthreads/bin/bodytrack: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.32' not found (required by /root/sniper/parsec/pkgs/apps/bodytrack/inst/amd64-linux.gcc-pthreads/bin/bodytrack)
/root/sniper/parsec/pkgs/apps/bodytrack/inst/amd64-linux.gcc-pthreads/bin/bodytrack: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /root/sniper/parsec/pkgs/apps/bodytrack/inst/amd64-linux.gcc-pthreads/bin/bodytrack)
/root/sniper/parsec/pkgs/apps/bodytrack/inst/amd64-linux.gcc-pthreads/bin/bodytrack: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /root/sniper/parsec/pkgs/apps/bodytrack/inst/amd64-linux.gcc-pthreads/bin/bodytrack)
/root/sniper/parsec/pkgs/apps/bodytrack/inst/amd64-linux.gcc-pthreads/bin/bodytrack: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /root/sniper/parsec/pkgs/apps/bodytrack/inst/amd64-linux.gcc-pthreads/bin/bodytrack)
/root/sniper/parsec/pkgs/apps/bodytrack/inst/amd64-linux.gcc-pthreads/bin/bodytrack: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /root/sniper/parsec/pkgs/apps/bodytrack/inst/amd64-linux.gcc-pthreads/bin/bodytrack)
```

Is there any specific way I need to compile these benchmarks to get them to work?

Andriy Sultanov

unread,
Nov 16, 2023, 5:38:33 AM11/16/23
to Sniper simulator
I am aware that there are parsec benchmarks inside the docker container already, but it's the old 2.1 version, not my modified 3.0

Trevor E. Carlson

unread,
Nov 16, 2023, 6:34:03 AM11/16/23
to snip...@googlegroups.com, as.andre...@gmail.com
Andriy,

      In order for applications to work inside the docker container, you’ll need to compile it in the container.

     The error you are seeing is the application requiring a newer version of glibc because you compiled it outside of docker, and are trying to use it inside of a docker image that doesn’t support that version (is too old).

      One way to handle this is to update the the Docker container to compile the new version (all of the scripts are available online). Alternatively, you could start with the older version of Parsec to understand the problem, and upgrade later to confirm your point.

Trevor

On Nov 16, 2023, at 18:38, Andriy Sultanov <as.andre...@gmail.com> wrote:

I am aware that there are parsec benchmarks inside the docker container already, but it's the old 2.1 version, not my modified 3.0

Andriy Sultanov

unread,
Nov 16, 2023, 11:18:38 AM11/16/23
to Sniper simulator
When I try to compile the program inside the container, I run into issues which seem to be with old compiler toolchain versions:

```
$ parsec/bin/parsecmgmt -a run -p bodytrack
cc1plus: error: unrecognized command line option "-std=c++17"
cc1plus: error: unrecognized command line option "-std=c++11"
make[2]: *** [Makefile:274: FlexImage.lo] Error 1
make[2]: Leaving directory '/root/sniper/parsec/pkgs/apps/bodytrack/obj/amd64-linux.gcc/FlexImageLib'
make[1]: *** [Makefile:258: all-recursive] Error 1
make[1]: Leaving directory '/root/sniper/parsec/pkgs/apps/bodytrack/obj/amd64-linux.gcc'
make: *** [Makefile:187: all] Error 2
[PARSEC] Error: 'env CXXFLAGS= -fpermissive -fno-exceptions -std=c++17 -DPARSEC_VERSION=3.0-beta-20150206 -fexceptions make' failed.
```

Could you please point me to the scripts to "update the the Docker container to compile the new version"?

Thank you!

Trevor E. Carlson

unread,
Nov 16, 2023, 7:46:54 PM11/16/23
to snip...@googlegroups.com, as.andre...@gmail.com
Andriy,

You could try to move the docker image to a newer OS. One of the reasons why we used an old OS for this was specifically for Parsec 2.1 compatibility. We also notice that older Pin versions sometimes have trouble with the latest GCC versions.

If you take a look at our Dockerfile [1], you’ll find an example on how to enable gcc-7 by default.

According to a quick test I ran with gcc-7, it looks like it should be compatible with these standards:

root@8fe06828b33f:/# gcc-7 --version -std=c++17 -std=c++11 | grep gcc-7
gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
root@8fe06828b33f:/# gcc-7 --version -std=c++17 -std=c++11 -std=c++20 | grep gcc-7
gcc-7: error: unrecognized command line option '-std=c++20'; did you mean '-std=c++03'?
gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0

Therefore, updating the path could be a quick hack to get the current docker image working for Parsec 3.0 without much work. Also, if you do integrate it into the benchmarks-root infrastructure, let us know and share the code so that we can integrate it.

Thanks,
Trevor

Message has been deleted

Andriy Sultanov

unread,
Dec 18, 2023, 2:49:29 PM12/18/23
to Sniper simulator
I've been able to switch the docker image to gcc-7 to compile c++11 and c++17 code, and my version of the parsec benchmark compiles and runs alright now, without the errors described above. It runs successfully in the container, but when I try to launch it under run-sniper, it terminates before doing any work with this error: "Pin app terminated abnormally due to signal 11."

Full output:
```
[sniper]# ./run-sniper parsec/bin/parsecmgmt -a run -p bodytrack -c gcc-pthreads -i simlarge

[SNIPER] Start
[SNIPER] --------------------------------------------------------------------------------
[SNIPER] Sniper using SIFT/trace-driven frontend
[SNIPER] Running full application in DETAILED mode
[SNIPER] --------------------------------------------------------------------------------
[SNIPER] Enabling performance models
[SNIPER] Setting instrumentation mode to DETAILED
[RECORD-TRACE] Using the Pin frontend (sift/recorder)
[TRACE:0] -- DONE --
Pin app terminated abnormally due to signal 11.
[SNIPER] Disabling performance models
[SNIPER] Leaving ROI after 6.44 seconds
[SNIPER] Simulated 0.3M instructions, 0.5M cycles, 0.50 IPC
[SNIPER] Simulation speed 42.9 KIPS (42.9 KIPS / target core - 23326.6ns/instr)

[SNIPER] Setting instrumentation mode to FAST_FORWARD
[SNIPER] End
[SNIPER] Elapsed time: 6.71 seconds
[sniper]#
```

The number of instructions is very low, around half of what it takes /bin/ls to run, and there is no program output, so it's not just some kind of front-end error.
Do I need to somehow update Pin as well? I am using the ordinary run-sniper here, not the one in the benchmarks directory, by the way.

Re: integrating Parsec 3.0 instead of Parsec 2.1 into the benchmarks infrastructure - it will be incredibly difficult as Princeton no longer hosts the benchmark along with its inputs, it's only accessible through Web Archive now and some of the archives seem to be corrupted too.

Andriy Sultanov

unread,
Dec 20, 2023, 8:31:07 AM12/20/23
to Sniper simulator
Compiling and running any other program under sniper works alright, for some reason. But signal 11 appears in all of the parsec benchmarks when run under sniper, no matter the configuration they are compiled for (i.e., gcc, or gcc-pthreads), they do run successfully in the container on their own
Reply all
Reply to author
Forward
Message has been deleted
0 new messages