-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Diagnostics
-
Labels:None
-
Fully Compatible
-
Dev Tools 2019-07-29, Dev Tools 2019-08-12, Dev Tools 2019-09-09, Dev Tools 2019-09-23, Dev Tools 2019-10-07, Dev Tools 2019-10-21
It looks like we have a special stream class which we use to avoid calling malloc in signal handlers here.
It uses a pre-allocated buffer of 100k bytes. Unfortunately, the JSON blob for a very deep stack trace (on my machine, at least) can be more than 100,000 characters, and get truncated when logged from the signal handler. I'm not sure if stack traces can be so large on "release" builds, but it would be a shame if a customer's node crashed and the printed stacktrace were cut off. I think we should consider doing:
1) Show the human readable stacktrace first (see here). This way, if the output is truncated, something useful is printed. A partial JSON blob is basically useless for day-to-day debugging purposes.
2) Increase the size of the buffer used in the signal handler's output stream (see here).