weston: remove SEGV and ABRT handlers

Catching an ABRT is kind of ok, catching a SEGV is russian roulette. We
have been quite lucky with it, but I've started hitting crashes inside
malloc() which causes a deadlock when our SEGV handler needs to malloc()
as well (weston_log_timestamp()).

One reason to catch SEGV and ABRT was to attempt to restore the VT on
the DRM-backend. Nowadays that job is done by logind or weston-launch.

The signal handler also printed a backtrace, which for me personally has
been extremely helpful. Arguably it's not necessary though, when we have
core files and services that catch cores. For instance, if using
systemd, 'coredumpctl gdb' is delightfully easy for getting into the
saved core.

Therefore, this code does more harm than it is useful, so remove it. We
also drop an optional dependency to libunwind.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
Pekka Paalanen
2018-02-07 12:51:14 +02:00
committed by Daniel Stone
parent c34a9f5ca6
commit bb707dc0fe
4 changed files with 4 additions and 157 deletions
-14
View File
@@ -324,20 +324,6 @@ The directory for Weston's socket and lock files.
Wayland clients will automatically use this.
.
.\" ***************************************************************
.SH DIAGNOSTICS
Weston has a segmentation fault handler, that attempts to restore
the virtual console or ungrab X before raising
.BR SIGTRAP .
If you run
.BR weston " under " gdb (1)
from an X11 terminal or a different virtual terminal, and tell gdb
.IP
handle SIGSEGV nostop
.PP
This will allow weston to switch back to gdb on crash and then
gdb will catch the crash with SIGTRAP.
.
.\" ***************************************************************
.SH BUGS
Bugs should be reported to the freedesktop.org bugzilla at
https://bugs.freedesktop.org with product "Wayland" and