← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Print stacktrace when SIGSEGV or SIGABRT appears

 

Hi,

On 20.09.2018 11:49, Thomas Pointhuber wrote:

> the current code is more or less a minimal implementation. It would be a
> good idea to add the build parameters like displayed in about_config,
> configuration files, environment variables,... in the future as well.

It will need a way to turn it off.

Sorry to sound so negative, but the stack trace contains a lot less
information than a core dump, especially when multiple threads are
involved, and is no longer in a format I can read into a debugger. Once
the exception has been handled, the OS will no longer create a usable
core dump either, even if at the end of the handler the signal is reraised.

I've seldom found stack traces alone, without corresponding core dumps,
to be useful beyond a generic "this looks like the same bug as last week."

On Ubuntu, there is Apport[1], which can automatically convert any crash
to a bug report that includes all the relevant data, but your patch also
disables this functionality, as that is triggered by the kernel
generating a core dump.

The only platform where it may actually help is MSYS2, because their
debugging tools are completely broken, but we'd have to ship unoptimized
builds with all symbols left in for this to actually work.

Compile tests:

 - fails to compile on MSYS2[2]
 - successfully compiles on MSVC[3]

   Simon

[1] https://wiki.ubuntu.com/Apport

[2]
https://jenkins.simonrichter.eu/job/windows-kicad-msys2-patch/138/console

[3] https://jenkins.simonrichter.eu/job/windows-kicad-msvc-patch/8/console

Attachment: signature.asc
Description: OpenPGP digital signature


Follow ups

References