chapel-lang / chapel

a Productive Parallel Programming Language
https://chapel-lang.org
Other
1.78k stars 418 forks source link

CHPL_UNWIND output stops at task boundaries #5350

Open bradcray opened 7 years ago

bradcray commented 7 years ago

When using CHPL_UNWIND, the stack trace stops once we hit a Chapel concept that introduces a task, such as a forall loop or an on-clause. This limits is usefulness when halt()s occur anywhere other than in the original task, which seems unfortunate in a parallel language. I'm wondering what it would take to have it report past those boundaries.

ghost commented 6 years ago

Hi @bradcray, while I was working on stack traces I had the same realisation: since tasks are (often) separated thread with their own stack, we don't have a way to find the stack frames from the parent task. One solution could be including, when we create a new task, the parent's stack trace but I don't know about the practicability of this idea (it shouldn't be too hard and memory-expensive, since we don't need the procedures names themselves, just their codes. I'm not entirely sure about performances however).

bradcray commented 6 years ago

I was speaking with @ronawho about this at some point (who works most closely with our tasking runtime these days) and he may have had some ideas, though I've forgotten what they are.

ronawho commented 6 years ago

I remember talking about this, but for I can't remember if we had any insights or ideas.