Ticket #10841 (assigned Bug Report - General)
Opened 11 months ago
Last modified 8 months ago
SignalHandling returns from SEGFAULT signal handler
| Reported by: | danielk | Owned by: | beirdo |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.26.1 |
| Component: | MythTV - General | Version: | Master Head |
| Severity: | medium | Keywords: | |
| Cc: | Ticket locked: | no |
Description
If you return from a SIGFAULT, SIGFPE, SIGBUS, or SIGILL the offending code is re-run and the signal is raised again.
If the fault occurs in the the UI thread where SignalHandler::handleSignal() is run in it will never run since we never get the opportunity to continue on to where the QSocketNotifier events are handled.
This leads the write() in SignalHandler::signalHandler() to block forever, deadlocking the UI thread.
Attachments
Change History
Changed 11 months ago by danielk
- Attachment segfault-handling-poc-v1.patch added
comment:1 Changed 11 months ago by Daniel Thor Kristjansson <danielk@…>
comment:2 Changed 11 months ago by Daniel Thor Kristjansson <danielk@…>
comment:3 Changed 11 months ago by Daniel Thor Kristjansson <danielk@…>
comment:4 Changed 11 months ago by beirdo
- Owner set to beirdo
- Status changed from new to assigned
I think what you have so far will work, but I'm considering restructuring it so the signal handlers are in their own thread, which should simplify things a bit. If this hasn't been changed by Aug 1, please remind me to close it as fixed :)

Proof-of-concept fix.