Also, this string manipulation seems messy (building it into a string in the traceback generation function only to unpack that string here); it would be cleaner to refactor `_extract_concise_traceback` into two functions, one that returns the components of the traceback, and another one that formats those components as a string.  You could call the components-returning version here.

It would be a good idea to refactor the code to move the traceback / stacktrace related functions into their own file (say `stacktrace.py`), since they're now used outside of `rdd.py`.