diff options
author | Josh Gao <jmgao@google.com> | 2017-06-01 12:19:53 -0700 |
---|---|---|
committer | Josh Gao <jmgao@google.com> | 2017-06-01 12:42:44 -0700 |
commit | 5675f3c321b7c6a9bbb2a7aacf18a01126f2f2cb (patch) | |
tree | 9453ac0ed689d7084b73ede163d29dd3a5d274d0 /debuggerd/debuggerd_test.cpp | |
parent | b0e51e388b8c952e28280f0e7035dc18fb9aa4e5 (diff) |
debuggerd_client: increase pipe buffer size to max.
If a process tries to dump itself (e.g. system_server during ANRs),
crash_dump will block trying to write to its pipe if it's not
sufficiently large. Increase the pipe size to the max, and add a test
to make sure that it's always at least 1MB (the default value).
Bug: http://b/38427757
Test: debuggerd_test
Change-Id: Iddb0cb1e5ce9e687efa9e94c2748a1edfe09f119
Diffstat (limited to 'debuggerd/debuggerd_test.cpp')
-rw-r--r-- | debuggerd/debuggerd_test.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/debuggerd/debuggerd_test.cpp b/debuggerd/debuggerd_test.cpp index 8c00b76a0..9008b95ac 100644 --- a/debuggerd/debuggerd_test.cpp +++ b/debuggerd/debuggerd_test.cpp @@ -119,6 +119,8 @@ static void tombstoned_intercept(pid_t target_pid, unique_fd* intercept_fd, uniq FAIL() << "failed to set pipe size: " << strerror(errno); } + ASSERT_GE(pipe_buffer_size, 1024 * 1024); + if (send_fd(intercept_fd->get(), &req, sizeof(req), std::move(output_pipe_write)) != sizeof(req)) { FAIL() << "failed to send output fd to tombstoned: " << strerror(errno); } |