Hi,
I'm trying to simulate a pthread application with Sniper, however I'm getting two of the following errors whenever I execute the following command:
./run-sniper -n 4 -c gainestown --roi -- ./fib 2
Sometimes I get the following error:
[SNIPER] Start
[SNIPER] --------------------------------------------------------------------------------
[SNIPER] Sniper using Pin frontend
[SNIPER] Running pre-ROI region in CACHE_ONLY mode
[SNIPER] Running application ROI in DETAILED mode
[SNIPER] Running post-ROI region in FAST_FORWARD mode
[SNIPER] --------------------------------------------------------------------------------
[SNIPER] Enabling performance models
[SNIPER] Setting instrumentation mode to DETAILED
Requested 2 only 4 available.
TP: 0, 1
fib(2)
[SNIPER] Disabling performance models
[SNIPER] Leaving ROI after 1.05 seconds
[SNIPER] Simulated 0.1M instructions, 1.9M cycles, 0.03 IPC
[SNIPER] Simulation speed 57.0 KIPS (14.2 KIPS / target core - 70217.8ns/instr)
[SNIPER] Sampling: executed 6.24% of simulated time in detailed mode
[SNIPER] Setting instrumentation mode to FAST_FORWARD
Application received fatal signal 11 at eip 0x7fe20e6c3fea
in :0
Application debugging is currently disabled.
To enable it, start Sniper with the --appdebug or --appdebug-wait command line switch.
[SNIPER] End
[SNIPER] Elapsed time: 4.34 seconds
Some other times, the error is the following:
[SNIPER] Start
[SNIPER] --------------------------------------------------------------------------------
[SNIPER] Sniper using Pin frontend
[SNIPER] Running pre-ROI region in CACHE_ONLY mode
[SNIPER] Running application ROI in DETAILED mode
[SNIPER] Running post-ROI region in FAST_FORWARD mode
[SNIPER] --------------------------------------------------------------------------------
[SNIPER] Enabling performance models
[SNIPER] Setting instrumentation mode to DETAILED
Requested 2 only 4 available.
TP: 0, 1
fib(1)
[SNIPER] Disabling performance models
[SNIPER] Leaving ROI after 2.84 seconds
[SNIPER] Simulated 0.2M instructions, 2.0M cycles, 0.11 IPC
[SNIPER] Simulation speed 72.6 KIPS (18.1 KIPS / target core - 55100.8ns/instr)
[SNIPER] Sampling: executed 10.99% of simulated time in detailed mode
[SNIPER] Setting instrumentation mode to FAST_FORWARD
[SNIPER] Internal exception: Exception Code: ACCESS_INVALID_ADDRESS. Exception Address = 0x7fe5c22593cc. Access Type: UNKNOWN. Access Address = 0x000000010
C: Tool (or Pin) caused signal 11 at PC 0x7fe5c22593cc
Pin app terminated abnormally due to signal 11.
[SNIPER] End
[SNIPER] Elapsed time: 6.34 seconds
------------------------------------------------------------
Exception Code: ACCESS_INVALID_ADDRESS. Exception Address = 0x7fe5c22593cc. Access Type: UNKNOWN. Access Address = 0x000000010
Backtrace:
pin_sim.cc:traceCallback:239
------------------------------------------------------------
I've been debugging the simulation with gdb, and it seems like the first error is generated after I set thread affinity of my threads. The second one, usually occurs whenever I use the pthread create function, after I set the affinity of each of my threads. My application is able to run normally outside sniper. I would appreciate any help that anyone could provide me.