platform_system_core/debuggerd
Narayan Kamath c2e98f6340 tombstoned: Fix calls to evconnlistener_new.
The order of arguments is wrong - we're passing flags=static_cast<unsigned>(-1)
and backlog=LEV_OPT_CLOSE_ON_FREE (which is 2).

On versions of libevent prior to 2.1.8, this ends up accidentally setting
OPT_LEAVE_SOCKETS_BLOCKING, OPT_CLOSE_ON_EXEC, OPT_REUSABLE and OPT_THREADSAFE
and limiting our backlog to two. These unintentional changes are relatively
benign; we never make our sockets block, we never exec, we never reuse
sockets and the additional locking overhead should be negligible. The
backlog of two might be a problem in theory, but there haven't been any
reports of issues caused by it.

Things get worse on 2.1.8 - that version introduces several new flags,
one of which is OPT_DISABLED. This disables the new listener by default,
which means that our event loop returns early because it has no active listeners
for any of its events.

Bug: 64543673
Test: Manual.

Change-Id: I9954bc7fe1af761de1a950d935dd2e6ce7e2c5f5
2017-09-13 14:15:57 +01:00
..
client crash_dump: lower THREAD_COUNT in debuggerd_client.race for low-speed devices 2017-06-23 08:59:22 +09:00
common/include tombstoned: allow intercepts for java traces. 2017-05-31 10:35:32 +01:00
crasher Stop asking for old versions of C++ in system/core. 2017-08-02 14:06:28 -07:00
handler libdebuggerd: cleanup. 2017-08-29 15:18:46 -07:00
include/debuggerd tombstoned: allow intercepts for java traces. 2017-05-31 10:35:32 +01:00
libdebuggerd libdebuggerd: cleanup. 2017-08-29 15:18:46 -07:00
tombstoned tombstoned: Fix calls to evconnlistener_new. 2017-09-13 14:15:57 +01:00
.clang-format Remove extraneous .clang-format files 2017-03-14 14:06:31 -07:00
Android.bp base: add Pipe and Socketpair wrappers. 2017-08-28 14:51:07 -07:00
MODULE_LICENSE_APACHE2 auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
NOTICE auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
crash_dump.cpp Recommend using pid instead of tid for gdbclient.py 2017-09-12 10:47:50 +02:00
debuggerd.cpp Remove unnecessary SELinux dependencies 2017-07-01 07:41:48 -07:00
debuggerd_test.cpp crash_dump: print the identity of tracers. 2017-08-18 16:16:58 -07:00
protocol.h tombstoned: allow intercepts for java traces. 2017-05-31 10:35:32 +01:00
signal_sender.cpp liblog: use log/log.h when utilizing ALOG macros 2017-01-11 09:31:15 -08:00
util.cpp base: add Pipe and Socketpair wrappers. 2017-08-28 14:51:07 -07:00
util.h base: add Pipe and Socketpair wrappers. 2017-08-28 14:51:07 -07:00