blob: a0adcd10826b10d65f5b8fd27ae63d7c297942a3 [file] [log] [blame]
Elliott Hughes2faa5f12012-01-30 14:42:07 -08001/*
2 * Copyright (C) 2011 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
Elliott Hughesffe67362011-07-17 12:09:27 -070016
17#include "runtime.h"
18
Elliott Hughes457005c2012-04-16 13:54:25 -070019#include <signal.h>
Elliott Hughes6c1c69e2012-04-23 16:12:51 -070020#include <string.h>
Elliott Hughes058a6de2012-05-24 19:13:02 -070021#include <sys/utsname.h>
Dmitry Petrochenko611c2c32014-02-10 14:48:12 +070022#include <inttypes.h>
Elliott Hughesffe67362011-07-17 12:09:27 -070023
Ian Rogersc7dd2952014-10-21 23:31:19 -070024#include <sstream>
25
26#include "base/dumpable.h"
Elliott Hughes07ed66b2012-12-12 18:34:25 -080027#include "base/logging.h"
Elliott Hughes76b61672012-12-12 17:47:30 -080028#include "base/mutex.h"
Elliott Hughese222ee02012-12-13 14:41:43 -080029#include "base/stringprintf.h"
Ian Rogersb48b9eb2014-02-28 16:20:21 -080030#include "thread-inl.h"
Andreas Gampe038bb222015-01-13 19:48:14 -080031#include "thread_list.h"
Elliott Hughes46e251b2012-05-22 15:10:45 -070032#include "utils.h"
Elliott Hughesffe67362011-07-17 12:09:27 -070033
34namespace art {
35
Mathieu Chartierc2f4d022014-03-03 16:11:42 -080036static constexpr bool kDumpHeapObjectOnSigsevg = false;
37
Elliott Hughes6c1c69e2012-04-23 16:12:51 -070038struct Backtrace {
Andreas Gampe628a61a2015-01-07 22:08:35 -080039 public:
40 explicit Backtrace(void* raw_context) : raw_context_(raw_context) {}
Ian Rogersc7dd2952014-10-21 23:31:19 -070041 void Dump(std::ostream& os) const {
Andreas Gampe628a61a2015-01-07 22:08:35 -080042 DumpNativeStack(os, GetTid(), "\t", nullptr, raw_context_);
Elliott Hughes6c1c69e2012-04-23 16:12:51 -070043 }
Andreas Gampe628a61a2015-01-07 22:08:35 -080044 private:
45 // Stores the context of the signal that was unexpected and will terminate the runtime. The
46 // DumpNativeStack code will take care of casting it to the expected type. This is required
47 // as our signal handler runs on an alternate stack.
48 void* raw_context_;
Elliott Hughes6c1c69e2012-04-23 16:12:51 -070049};
50
Elliott Hughes76160052012-12-12 16:31:20 -080051struct OsInfo {
Ian Rogersc7dd2952014-10-21 23:31:19 -070052 void Dump(std::ostream& os) const {
Elliott Hughes058a6de2012-05-24 19:13:02 -070053 utsname info;
54 uname(&info);
55 // Linux 2.6.38.8-gg784 (x86_64)
56 // Darwin 11.4.0 (x86_64)
57 os << info.sysname << " " << info.release << " (" << info.machine << ")";
58 }
59};
60
Elliott Hughes6c1c69e2012-04-23 16:12:51 -070061static const char* GetSignalName(int signal_number) {
62 switch (signal_number) {
63 case SIGABRT: return "SIGABRT";
64 case SIGBUS: return "SIGBUS";
65 case SIGFPE: return "SIGFPE";
66 case SIGILL: return "SIGILL";
67 case SIGPIPE: return "SIGPIPE";
68 case SIGSEGV: return "SIGSEGV";
Elliott Hughes833770b2012-05-01 15:41:03 -070069#if defined(SIGSTKFLT)
Elliott Hughes6c1c69e2012-04-23 16:12:51 -070070 case SIGSTKFLT: return "SIGSTKFLT";
71#endif
72 case SIGTRAP: return "SIGTRAP";
73 }
74 return "??";
Elliott Hughesffe67362011-07-17 12:09:27 -070075}
76
Elliott Hughes457005c2012-04-16 13:54:25 -070077static const char* GetSignalCodeName(int signal_number, int signal_code) {
78 // Try the signal-specific codes...
79 switch (signal_number) {
80 case SIGILL:
81 switch (signal_code) {
82 case ILL_ILLOPC: return "ILL_ILLOPC";
83 case ILL_ILLOPN: return "ILL_ILLOPN";
84 case ILL_ILLADR: return "ILL_ILLADR";
85 case ILL_ILLTRP: return "ILL_ILLTRP";
86 case ILL_PRVOPC: return "ILL_PRVOPC";
87 case ILL_PRVREG: return "ILL_PRVREG";
88 case ILL_COPROC: return "ILL_COPROC";
89 case ILL_BADSTK: return "ILL_BADSTK";
90 }
91 break;
92 case SIGBUS:
93 switch (signal_code) {
94 case BUS_ADRALN: return "BUS_ADRALN";
95 case BUS_ADRERR: return "BUS_ADRERR";
96 case BUS_OBJERR: return "BUS_OBJERR";
97 }
98 break;
99 case SIGFPE:
100 switch (signal_code) {
101 case FPE_INTDIV: return "FPE_INTDIV";
102 case FPE_INTOVF: return "FPE_INTOVF";
103 case FPE_FLTDIV: return "FPE_FLTDIV";
104 case FPE_FLTOVF: return "FPE_FLTOVF";
105 case FPE_FLTUND: return "FPE_FLTUND";
106 case FPE_FLTRES: return "FPE_FLTRES";
107 case FPE_FLTINV: return "FPE_FLTINV";
108 case FPE_FLTSUB: return "FPE_FLTSUB";
109 }
110 break;
111 case SIGSEGV:
112 switch (signal_code) {
113 case SEGV_MAPERR: return "SEGV_MAPERR";
114 case SEGV_ACCERR: return "SEGV_ACCERR";
115 }
116 break;
117 case SIGTRAP:
118 switch (signal_code) {
119 case TRAP_BRKPT: return "TRAP_BRKPT";
120 case TRAP_TRACE: return "TRAP_TRACE";
121 }
122 break;
123 }
124 // Then the other codes...
125 switch (signal_code) {
126 case SI_USER: return "SI_USER";
Elliott Hughesac8097f2012-04-16 14:59:44 -0700127#if defined(SI_KERNEL)
Elliott Hughes457005c2012-04-16 13:54:25 -0700128 case SI_KERNEL: return "SI_KERNEL";
Elliott Hughesac8097f2012-04-16 14:59:44 -0700129#endif
Elliott Hughes457005c2012-04-16 13:54:25 -0700130 case SI_QUEUE: return "SI_QUEUE";
131 case SI_TIMER: return "SI_TIMER";
132 case SI_MESGQ: return "SI_MESGQ";
133 case SI_ASYNCIO: return "SI_ASYNCIO";
Elliott Hughesac8097f2012-04-16 14:59:44 -0700134#if defined(SI_SIGIO)
Elliott Hughes457005c2012-04-16 13:54:25 -0700135 case SI_SIGIO: return "SI_SIGIO";
Elliott Hughesac8097f2012-04-16 14:59:44 -0700136#endif
137#if defined(SI_TKILL)
Elliott Hughes457005c2012-04-16 13:54:25 -0700138 case SI_TKILL: return "SI_TKILL";
Elliott Hughesac8097f2012-04-16 14:59:44 -0700139#endif
Elliott Hughes457005c2012-04-16 13:54:25 -0700140 }
141 // Then give up...
142 return "?";
143}
144
Elliott Hughes6c1c69e2012-04-23 16:12:51 -0700145struct UContext {
Ian Rogersc7dd2952014-10-21 23:31:19 -0700146 explicit UContext(void* raw_context) :
147 context(reinterpret_cast<ucontext_t*>(raw_context)->uc_mcontext) {
148 }
Elliott Hughes6c1c69e2012-04-23 16:12:51 -0700149
Ian Rogersc7dd2952014-10-21 23:31:19 -0700150 void Dump(std::ostream& os) const {
Elliott Hughes6c1c69e2012-04-23 16:12:51 -0700151 // TODO: support non-x86 hosts (not urgent because this code doesn't run on targets).
Ian Rogersef7d42f2014-01-06 12:55:46 -0800152#if defined(__APPLE__) && defined(__i386__)
Elliott Hughes6c1c69e2012-04-23 16:12:51 -0700153 DumpRegister32(os, "eax", context->__ss.__eax);
154 DumpRegister32(os, "ebx", context->__ss.__ebx);
155 DumpRegister32(os, "ecx", context->__ss.__ecx);
156 DumpRegister32(os, "edx", context->__ss.__edx);
157 os << '\n';
158
159 DumpRegister32(os, "edi", context->__ss.__edi);
160 DumpRegister32(os, "esi", context->__ss.__esi);
161 DumpRegister32(os, "ebp", context->__ss.__ebp);
162 DumpRegister32(os, "esp", context->__ss.__esp);
163 os << '\n';
164
165 DumpRegister32(os, "eip", context->__ss.__eip);
Elliott Hughes46e251b2012-05-22 15:10:45 -0700166 os << " ";
Elliott Hughes6c1c69e2012-04-23 16:12:51 -0700167 DumpRegister32(os, "eflags", context->__ss.__eflags);
Elliott Hughes46e251b2012-05-22 15:10:45 -0700168 DumpX86Flags(os, context->__ss.__eflags);
Elliott Hughes6c1c69e2012-04-23 16:12:51 -0700169 os << '\n';
170
171 DumpRegister32(os, "cs", context->__ss.__cs);
172 DumpRegister32(os, "ds", context->__ss.__ds);
173 DumpRegister32(os, "es", context->__ss.__es);
174 DumpRegister32(os, "fs", context->__ss.__fs);
175 os << '\n';
176 DumpRegister32(os, "gs", context->__ss.__gs);
177 DumpRegister32(os, "ss", context->__ss.__ss);
Ian Rogersef7d42f2014-01-06 12:55:46 -0800178#elif defined(__linux__) && defined(__i386__)
Elliott Hughes6c1c69e2012-04-23 16:12:51 -0700179 DumpRegister32(os, "eax", context.gregs[REG_EAX]);
180 DumpRegister32(os, "ebx", context.gregs[REG_EBX]);
181 DumpRegister32(os, "ecx", context.gregs[REG_ECX]);
182 DumpRegister32(os, "edx", context.gregs[REG_EDX]);
183 os << '\n';
184
185 DumpRegister32(os, "edi", context.gregs[REG_EDI]);
186 DumpRegister32(os, "esi", context.gregs[REG_ESI]);
187 DumpRegister32(os, "ebp", context.gregs[REG_EBP]);
188 DumpRegister32(os, "esp", context.gregs[REG_ESP]);
189 os << '\n';
190
191 DumpRegister32(os, "eip", context.gregs[REG_EIP]);
Elliott Hughes46e251b2012-05-22 15:10:45 -0700192 os << " ";
Elliott Hughes6c1c69e2012-04-23 16:12:51 -0700193 DumpRegister32(os, "eflags", context.gregs[REG_EFL]);
Elliott Hughes46e251b2012-05-22 15:10:45 -0700194 DumpX86Flags(os, context.gregs[REG_EFL]);
Elliott Hughes6c1c69e2012-04-23 16:12:51 -0700195 os << '\n';
196
197 DumpRegister32(os, "cs", context.gregs[REG_CS]);
198 DumpRegister32(os, "ds", context.gregs[REG_DS]);
199 DumpRegister32(os, "es", context.gregs[REG_ES]);
200 DumpRegister32(os, "fs", context.gregs[REG_FS]);
201 os << '\n';
202 DumpRegister32(os, "gs", context.gregs[REG_GS]);
203 DumpRegister32(os, "ss", context.gregs[REG_SS]);
Dmitry Petrochenko611c2c32014-02-10 14:48:12 +0700204#elif defined(__linux__) && defined(__x86_64__)
205 DumpRegister64(os, "rax", context.gregs[REG_RAX]);
206 DumpRegister64(os, "rbx", context.gregs[REG_RBX]);
207 DumpRegister64(os, "rcx", context.gregs[REG_RCX]);
208 DumpRegister64(os, "rdx", context.gregs[REG_RDX]);
209 os << '\n';
210
211 DumpRegister64(os, "rdi", context.gregs[REG_RDI]);
212 DumpRegister64(os, "rsi", context.gregs[REG_RSI]);
213 DumpRegister64(os, "rbp", context.gregs[REG_RBP]);
214 DumpRegister64(os, "rsp", context.gregs[REG_RSP]);
215 os << '\n';
216
217 DumpRegister64(os, "r8 ", context.gregs[REG_R8]);
218 DumpRegister64(os, "r9 ", context.gregs[REG_R9]);
219 DumpRegister64(os, "r10", context.gregs[REG_R10]);
220 DumpRegister64(os, "r11", context.gregs[REG_R11]);
221 os << '\n';
222
223 DumpRegister64(os, "r12", context.gregs[REG_R12]);
224 DumpRegister64(os, "r13", context.gregs[REG_R13]);
225 DumpRegister64(os, "r14", context.gregs[REG_R14]);
226 DumpRegister64(os, "r15", context.gregs[REG_R15]);
227 os << '\n';
228
229 DumpRegister64(os, "rip", context.gregs[REG_RIP]);
230 os << " ";
231 DumpRegister32(os, "eflags", context.gregs[REG_EFL]);
232 DumpX86Flags(os, context.gregs[REG_EFL]);
233 os << '\n';
234
235 DumpRegister32(os, "cs", (context.gregs[REG_CSGSFS]) & 0x0FFFF);
236 DumpRegister32(os, "gs", (context.gregs[REG_CSGSFS] >> 16) & 0x0FFFF);
237 DumpRegister32(os, "fs", (context.gregs[REG_CSGSFS] >> 32) & 0x0FFFF);
238 os << '\n';
Ian Rogersef7d42f2014-01-06 12:55:46 -0800239#else
240 os << "Unknown architecture/word size/OS in ucontext dump";
Elliott Hughesac8097f2012-04-16 14:59:44 -0700241#endif
Elliott Hughes457005c2012-04-16 13:54:25 -0700242 }
243
Ian Rogersc7dd2952014-10-21 23:31:19 -0700244 void DumpRegister32(std::ostream& os, const char* name, uint32_t value) const {
Elliott Hughes6c1c69e2012-04-23 16:12:51 -0700245 os << StringPrintf(" %6s: 0x%08x", name, value);
246 }
247
Ian Rogersc7dd2952014-10-21 23:31:19 -0700248 void DumpRegister64(std::ostream& os, const char* name, uint64_t value) const {
Dmitry Petrochenko611c2c32014-02-10 14:48:12 +0700249 os << StringPrintf(" %6s: 0x%016" PRIx64, name, value);
250 }
251
Ian Rogersc7dd2952014-10-21 23:31:19 -0700252 void DumpX86Flags(std::ostream& os, uint32_t flags) const {
Elliott Hughes46e251b2012-05-22 15:10:45 -0700253 os << " [";
254 if ((flags & (1 << 0)) != 0) {
255 os << " CF";
256 }
257 if ((flags & (1 << 2)) != 0) {
258 os << " PF";
259 }
260 if ((flags & (1 << 4)) != 0) {
261 os << " AF";
262 }
263 if ((flags & (1 << 6)) != 0) {
264 os << " ZF";
265 }
266 if ((flags & (1 << 7)) != 0) {
267 os << " SF";
268 }
269 if ((flags & (1 << 8)) != 0) {
270 os << " TF";
271 }
272 if ((flags & (1 << 9)) != 0) {
273 os << " IF";
274 }
275 if ((flags & (1 << 10)) != 0) {
276 os << " DF";
277 }
278 if ((flags & (1 << 11)) != 0) {
279 os << " OF";
280 }
281 os << " ]";
282 }
283
Elliott Hughes6c1c69e2012-04-23 16:12:51 -0700284 mcontext_t& context;
285};
286
Andreas Gampe038bb222015-01-13 19:48:14 -0800287static int GetTimeoutSignal() {
288 return SIGRTMIN + 2;
289}
290
291static bool IsTimeoutSignal(int signal_number) {
292 return signal_number == GetTimeoutSignal();
293}
294
Brian Carlstromaf1b8922012-11-27 15:19:57 -0800295void HandleUnexpectedSignal(int signal_number, siginfo_t* info, void* raw_context) {
296 static bool handlingUnexpectedSignal = false;
297 if (handlingUnexpectedSignal) {
Ian Rogersc7dd2952014-10-21 23:31:19 -0700298 LogMessage::LogLine(__FILE__, __LINE__, INTERNAL_FATAL, "HandleUnexpectedSignal reentered\n");
Andreas Gampe038bb222015-01-13 19:48:14 -0800299 if (IsTimeoutSignal(signal_number)) {
300 // Ignore a recursive timeout.
301 return;
302 }
Brian Carlstromaf1b8922012-11-27 15:19:57 -0800303 _exit(1);
304 }
305 handlingUnexpectedSignal = true;
306
Nicolas Geoffraydb978712014-12-09 13:33:38 +0000307 gAborting++; // set before taking any locks
Ian Rogers50b35e22012-10-04 10:09:15 -0700308 MutexLock mu(Thread::Current(), *Locks::unexpected_signal_lock_);
Elliott Hughesd06a6c72012-05-30 17:59:06 -0700309
Elliott Hughes6c1c69e2012-04-23 16:12:51 -0700310 bool has_address = (signal_number == SIGILL || signal_number == SIGBUS ||
311 signal_number == SIGFPE || signal_number == SIGSEGV);
312
Elliott Hughes76160052012-12-12 16:31:20 -0800313 OsInfo os_info;
Elliott Hughes98eedd82012-06-11 17:52:56 -0700314 const char* cmd_line = GetCmdLine();
315 if (cmd_line == NULL) {
Brian Carlstrom7934ac22013-07-26 10:54:15 -0700316 cmd_line = "<unset>"; // Because no-one called InitLogging.
Elliott Hughes98eedd82012-06-11 17:52:56 -0700317 }
Elliott Hughes289be852012-06-12 13:57:20 -0700318 pid_t tid = GetTid();
319 std::string thread_name(GetThreadName(tid));
Elliott Hughes6c1c69e2012-04-23 16:12:51 -0700320 UContext thread_context(raw_context);
Andreas Gampe628a61a2015-01-07 22:08:35 -0800321 Backtrace thread_backtrace(raw_context);
Elliott Hughes8593fdb2012-04-21 20:53:44 -0700322
Elliott Hughes457005c2012-04-16 13:54:25 -0700323 LOG(INTERNAL_FATAL) << "*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***\n"
324 << StringPrintf("Fatal signal %d (%s), code %d (%s)",
Elliott Hughes6c1c69e2012-04-23 16:12:51 -0700325 signal_number, GetSignalName(signal_number),
Elliott Hughes457005c2012-04-16 13:54:25 -0700326 info->si_code,
327 GetSignalCodeName(signal_number, info->si_code))
Elliott Hughes6c1c69e2012-04-23 16:12:51 -0700328 << (has_address ? StringPrintf(" fault addr %p", info->si_addr) : "") << "\n"
Elliott Hughes76160052012-12-12 16:31:20 -0800329 << "OS: " << Dumpable<OsInfo>(os_info) << "\n"
Elliott Hughes98eedd82012-06-11 17:52:56 -0700330 << "Cmdline: " << cmd_line << "\n"
Elliott Hughes289be852012-06-12 13:57:20 -0700331 << "Thread: " << tid << " \"" << thread_name << "\"\n"
Elliott Hughes6c1c69e2012-04-23 16:12:51 -0700332 << "Registers:\n" << Dumpable<UContext>(thread_context) << "\n"
333 << "Backtrace:\n" << Dumpable<Backtrace>(thread_backtrace);
Mathieu Chartier15d34022014-02-26 17:16:38 -0800334 Runtime* runtime = Runtime::Current();
335 if (runtime != nullptr) {
Andreas Gampe038bb222015-01-13 19:48:14 -0800336 if (IsTimeoutSignal(signal_number)) {
337 // Special timeout signal. Try to dump all threads.
338 runtime->GetThreadList()->DumpForSigQuit(LOG(INTERNAL_FATAL));
339 }
Mathieu Chartier15d34022014-02-26 17:16:38 -0800340 gc::Heap* heap = runtime->GetHeap();
341 LOG(INTERNAL_FATAL) << "Fault message: " << runtime->GetFaultMessage();
Mathieu Chartierc2f4d022014-03-03 16:11:42 -0800342 if (kDumpHeapObjectOnSigsevg && heap != nullptr && info != nullptr) {
Mathieu Chartier15d34022014-02-26 17:16:38 -0800343 LOG(INTERNAL_FATAL) << "Dump heap object at fault address: ";
344 heap->DumpObject(LOG(INTERNAL_FATAL), reinterpret_cast<mirror::Object*>(info->si_addr));
345 }
346 }
Elliott Hughes4909ba42012-06-14 13:33:49 -0700347 if (getenv("debug_db_uid") != NULL || getenv("art_wait_for_gdb_on_crash") != NULL) {
Elliott Hughes2554cb92012-04-18 17:19:26 -0700348 LOG(INTERNAL_FATAL) << "********************************************************\n"
Elliott Hughes289be852012-06-12 13:57:20 -0700349 << "* Process " << getpid() << " thread " << tid << " \"" << thread_name << "\""
350 << " has been suspended while crashing.\n"
351 << "* Attach gdb:\n"
352 << "* gdb -p " << tid << "\n"
Elliott Hughes2554cb92012-04-18 17:19:26 -0700353 << "********************************************************\n";
354 // Wait for debugger to attach.
355 while (true) {
356 }
Elliott Hughes457005c2012-04-16 13:54:25 -0700357 }
Ian Rogersc5f17732014-06-05 20:48:42 -0700358#ifdef __linux__
Elliott Hughesd06a6c72012-05-30 17:59:06 -0700359 // Remove our signal handler for this signal...
360 struct sigaction action;
361 memset(&action, 0, sizeof(action));
362 sigemptyset(&action.sa_mask);
363 action.sa_handler = SIG_DFL;
364 sigaction(signal_number, &action, NULL);
365 // ...and re-raise so we die with the appropriate status.
366 kill(getpid(), signal_number);
Ian Rogersc5f17732014-06-05 20:48:42 -0700367#else
368 exit(EXIT_FAILURE);
369#endif
Elliott Hughes457005c2012-04-16 13:54:25 -0700370}
371
Elliott Hughes457005c2012-04-16 13:54:25 -0700372void Runtime::InitPlatformSignalHandlers() {
373 // On the host, we don't have debuggerd to dump a stack for us when something unexpected happens.
374 struct sigaction action;
375 memset(&action, 0, sizeof(action));
376 sigemptyset(&action.sa_mask);
377 action.sa_sigaction = HandleUnexpectedSignal;
Elliott Hughes6c1c69e2012-04-23 16:12:51 -0700378 // Use the three-argument sa_sigaction handler.
379 action.sa_flags |= SA_SIGINFO;
Elliott Hughesd06a6c72012-05-30 17:59:06 -0700380 // Use the alternate signal stack so we can catch stack overflows.
381 action.sa_flags |= SA_ONSTACK;
Elliott Hughes457005c2012-04-16 13:54:25 -0700382
383 int rc = 0;
Elliott Hughes457005c2012-04-16 13:54:25 -0700384 rc += sigaction(SIGABRT, &action, NULL);
385 rc += sigaction(SIGBUS, &action, NULL);
386 rc += sigaction(SIGFPE, &action, NULL);
Elliott Hughes058a6de2012-05-24 19:13:02 -0700387 rc += sigaction(SIGILL, &action, NULL);
388 rc += sigaction(SIGPIPE, &action, NULL);
389 rc += sigaction(SIGSEGV, &action, NULL);
Elliott Hughesac8097f2012-04-16 14:59:44 -0700390#if defined(SIGSTKFLT)
Elliott Hughes457005c2012-04-16 13:54:25 -0700391 rc += sigaction(SIGSTKFLT, &action, NULL);
Elliott Hughesac8097f2012-04-16 14:59:44 -0700392#endif
Elliott Hughes058a6de2012-05-24 19:13:02 -0700393 rc += sigaction(SIGTRAP, &action, NULL);
Andreas Gampe038bb222015-01-13 19:48:14 -0800394 // Special dump-all timeout.
395 rc += sigaction(GetTimeoutSignal(), &action, NULL);
Elliott Hughes457005c2012-04-16 13:54:25 -0700396 CHECK_EQ(rc, 0);
397}
398
Elliott Hughesffe67362011-07-17 12:09:27 -0700399} // namespace art