mirror of https://github.com/citusdata/citus.git
wip
parent
f3280f105a
commit
a4e2f03ae7
|
@ -21,6 +21,7 @@
|
||||||
#include "fmgr.h"
|
#include "fmgr.h"
|
||||||
#include "miscadmin.h"
|
#include "miscadmin.h"
|
||||||
|
|
||||||
|
#include "execinfo.h"
|
||||||
#include "safe_lib.h"
|
#include "safe_lib.h"
|
||||||
|
|
||||||
#include "citus_version.h"
|
#include "citus_version.h"
|
||||||
|
@ -367,12 +368,20 @@ multi_log_hook(ErrorData *edata)
|
||||||
"involved in a distributed deadlock";
|
"involved in a distributed deadlock";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StringInfo * newStr = makeStringInfo();
|
||||||
void *buf[100];
|
appendStringInfoString(newStr, edata->message);
|
||||||
int nframes;
|
|
||||||
|
|
||||||
nframes = backtrace(buf, lengthof(buf));
|
nframes = backtrace(buf, lengthof(buf));
|
||||||
backtrace_symbols_fd(buf, nframes, fileno(stderr));
|
// backtrace_symbols_fd(buf, nframes, fileno(stderr));
|
||||||
|
char** strings = backtrace_symbols(buf, nframes);
|
||||||
|
|
||||||
|
if (strings) {
|
||||||
|
for (int i = 0; i < nframes; i++) {
|
||||||
|
appendStringInfoChar(newStr, '\n');
|
||||||
|
appendStringInfoString(newStr, strings[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
edata->message = newStr->data;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue