← Back to team overview

kicad-developers team mailing list archive

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

 

On 09/21/2018 07:01 PM, Simon Richter wrote:
> 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.

Thanks for the information.  I was unaware of this.  It is a serious
problem and makes me rethink the usefulness of this patch.  If we cannot
get a full core dump with the patch, then that is a problem.  This
feature would have to have a build options so that distros could disable
it if they found it objectionable.

> 
> 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.

Full msys2 debugging builds are huge and slow so that wont fly either.

> 
> Compile tests:
> 
>  - fails to compile on MSYS2[2]

You have to include my patch to get it to build on msys2.

>  - 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
> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 

Attachment: signature.asc
Description: OpenPGP digital signature


References