Enabling --debug-dump leads to infinite loop in simulation #476
Replies: 9 comments 9 replies
-
I haven't seen that issue, but I have seen the backtracer taking an exorbitant amount of time on a simulation crash. Basically, the framework calls When the simulator "sits there" in gdb, can you ctrl-c it and see where it is? |
Beta Was this translation helpful? Give feedback.
-
Here's my backtrace when I hit ctrl-c |
Beta Was this translation helpful? Give feedback.
-
Hi Knute, to solve these sorts of hangs, would you be open to modifying Sparta to not call addr2line to get line info in backtraces, or to introduce an option for Sparta to do so (i.e., enable |
Beta Was this translation helpful? Give feedback.
-
Yes. This is actually causing me a headache! 😆 Adding support to the framework to disable a backtrace dump now. Just an FYI -- this only seems to be an issue with clang-based builds. |
Beta Was this translation helpful? Give feedback.
-
Actually, while implementing this, I just learned that the framework already supports it! In your
Can you give this a try? I just did and it appears to do what we want. 😉 |
Beta Was this translation helpful? Give feedback.
-
Actually, the command line flag There are two things:
|
Beta Was this translation helpful? Give feedback.
-
The code I provided prevents the call to backtrace collection completely, while still giving you an error dump file. |
Beta Was this translation helpful? Give feedback.
-
Can you let me know if that was a good solution for you? |
Beta Was this translation helpful? Give feedback.
-
I probably should have filed this in another discussion but I didn't think it was going to be this long... 😞 I'm also looking at improving the backtrace support because the addr2line stuff has been busted for me for awhile. Not having a proper backtrace with line numbers is highly annoying and I'd like it to be fixed and be more robust than the piping to addr2line solution we came up with long ago. I'm going to look at why we didn't just use
In my setup, I see that calling addr2line with the address in square brackets (like sparta does)
yields the super helpful
it gives me an actual file and line number that make sense. I haven't figured out why this is happening yet. I have been seeing simulations just hang when they hit exceptions but haven't had time to dig into why. I'll try just avoiding the backtrace to see if that signature falls out of my regressions. @klingaard let me know if you have thoughts about adopting |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm facing a weird situation where on an assertion failure the simulation hangs for a while until Sparta emits a message saying
terminate called after throwing an instance of 'sparta::SpartaException'
what(): Infinite loop was detected during simulation!
This problem goes away if we enable
--debug-dump never
on the commandline. Do you know what is going on?I tried commenting out all of the code in our
dumpDebugContent_()
callbacks, and it still has the same infinite loop issue.Thanks for any help on this
Beta Was this translation helpful? Give feedback.
All reactions