Commit Graph
4 Commits
Author SHA1 Message Date
Chris Morin 08f9e80b3f journal-file: handle SIGBUS on offlining thread
The thread launched in journal_file_set_offline() accesses a memory
mapped file, so it needs to handle SIGBUS. Leave SIGBUS unblocked on the
offlining thread so that it uses the same handler as the main thread.

The result of triggering SIGBUS in a thread where it's blocked is
undefined in Linux. The tested implementations were observed to cause
the default handler to run, taking down the whole journald process.

We can leave SIGBUS unblocked in multiple threads since it's handler is
thread-safe. If SIGBUS is sent to the journald process asynchronously
(i.e. with kill, sigqueue, or raise), either thread handling it will
result in the same behavior: it will install the default handler and
reraise the signal, killing the process.

Fixes: #12042
2019-03-20 13:02:04 +01:00
Chris Morin f36712b7c3 CODING_STYLE: fix grammar mistake 2019-01-17 12:37:40 +01:00
Chris Morin 0367307e27 man: correct journald field name 2018-08-22 16:21:52 +02:00
Chris Morin b44787bd43 man: make bootup graph consistent 2015-02-20 14:52:14 -08:00