Commit graph

19482 commits

Author SHA1 Message Date
Josh Gao
56e9bb9bd6 adb: tag fatal, fatal_errno with printf attribute.
Also, fix bugs that this uncovered. In particular, the sysdeps_win32
FATAL macro would only print __FUNCTION__.

Change-Id: I6307ec9749edec21b4fee192e135a86ec445c84b
2016-01-15 15:25:31 -08:00
Josh Gao
2783126cab Merge "Increase the maximum shell command length to 4096ish."
am: 3472410eac

* commit '3472410eac9e0c4a01b949c9e9d2ab2fe93e1acd':
  Increase the maximum shell command length to 4096ish.
2016-01-15 23:12:35 +00:00
Josh Gao
3472410eac Merge "Increase the maximum shell command length to 4096ish." 2016-01-15 23:06:37 +00:00
Josh Gao
7e6683ce40 Increase the maximum shell command length to 4096ish.
The actual maximum length will depend on the version of the shell
protocol being used, and any additional parameters being passed through
(e.g. TERM=xterm-256color). This should be able to be raised to 64K for
devices with commit 3d2904c (L-MR1 and above), but that'll require some
plumbing.

Bug: http://b/20467103
Change-Id: Idf0c46af5b18b854110aba58df13a53297d2475f
2016-01-15 15:02:19 -08:00
Steve Fung
05de86ac25 crash_reporter: Add README.md
Add a README describing the basic functionality and configuration
of crash_reporter.  Also include some development tips based on
feedback from users.

Bug: 26387853
Change-Id: I42655841171fcfb0a8efdf587e596e6930357e4e
2016-01-15 14:58:17 -08:00
Dan Albert
b2d312749e Merge "Fix a couple sign-comparison warnings."
am: 422359aad4

* commit '422359aad4dee6018001b18e16ac8af6101ee509':
  Fix a couple sign-comparison warnings.
2016-01-15 21:40:20 +00:00
Dan Albert
422359aad4 Merge "Fix a couple sign-comparison warnings." 2016-01-15 21:29:58 +00:00
Christopher Ferris
64686bcd9e Merge "Add a ZipArchiveStreamEntry class."
am: 9162c1496d

* commit '9162c1496dd6f6ce2a663352632c1de3c429a29a':
  Add a ZipArchiveStreamEntry class.
2016-01-15 21:13:22 +00:00
Christopher Ferris
9162c1496d Merge "Add a ZipArchiveStreamEntry class." 2016-01-15 21:00:46 +00:00
Dan Albert
bac7bb5c16 Fix a couple sign-comparison warnings.
Bug: http://b/26523949
Change-Id: Id33146b5544147945fee3f14f7f72f39bae449f6
2016-01-15 12:18:14 -08:00
Josh Gao
f983e6ce5a Merge "debuggerd: fix debug.debuggerd.wait_for_gdb."
am: a590596dca

* commit 'a590596dcac8cc6a2ffaab110bdd89fdb5f837d8':
  debuggerd: fix debug.debuggerd.wait_for_gdb.
2016-01-15 19:40:49 +00:00
Josh Gao
2318cc0155 Merge "debuggerd: fix several bugs caused by fork/setuid change."
am: 1bf7000033

* commit '1bf700003368e8b68b34a0f9968ae5afd25dd4f2':
  debuggerd: fix several bugs caused by fork/setuid change.
2016-01-15 19:40:41 +00:00
Josh Gao
a590596dca Merge "debuggerd: fix debug.debuggerd.wait_for_gdb." 2016-01-15 19:32:08 +00:00
Josh Gao
c362c45949 debuggerd: fix debug.debuggerd.wait_for_gdb.
Bug: http://b/26513486
Change-Id: I01c28ce810a49f8a4e0e2a86c7d018d95f9617c8
2016-01-15 11:31:17 -08:00
Josh Gao
1bf7000033 Merge "debuggerd: fix several bugs caused by fork/setuid change." 2016-01-15 19:30:03 +00:00
Josh Gao
7c89f9e955 debuggerd: fix several bugs caused by fork/setuid change.
Previously, we weren't PTRACE_ATTACHing to all of the threads of a
process, and we were also trying to do it after forking and dropping
privileges. This patch ensures that all ptrace attaching/detaching
happens in one place, before forking/exiting respectively.

Bug: http://b/26443860
Bug: http://b/26436605
Bug: http://b/26436486
Change-Id: Id94e0c1d9d56c051d0dd281d895aaa3285079198
2016-01-14 15:06:37 -08:00
Christopher Ferris
e6884ce56f Add a ZipArchiveStreamEntry class.
This allows someone to stream the data out of a zip archive
instead of extracting to a file or to memory.

Included in this change is a small cleanup of the makefile.

Change-Id: I8b679a679c3502ff4ea0bc4f9e918303657fa424
2016-01-14 12:30:20 -08:00
Steve Fung
312292e78c Merge "crash_reporter: Remove udev collector from Android build"
am: 047597b3fc

* commit '047597b3fc345ee657ff1f00ad87521cf4ae455f':
  crash_reporter: Remove udev collector from Android build
2016-01-14 02:04:58 +00:00
Dimitry Ivanov
108eaa1429 Merge "Add libRS.so to the list of public libraries"
am: ebe04a9b89

* commit 'ebe04a9b891230f13b264342e5aed40ff28d4a10':
  Add libRS.so to the list of public libraries
2016-01-14 02:04:44 +00:00
Thierry Strudel
234a846ac8 Merge "[DO NOT MERGE] Use FUSE_SHORTCIRCUIT if available" into mnc-dr1.5-dev am: b84295d027
am: bbaa2b296a

* commit 'bbaa2b296ad836e9d6511549661884d94b53ccee':
  [DO NOT MERGE] Use FUSE_SHORTCIRCUIT if available
2016-01-14 00:52:50 +00:00
Thierry Strudel
bbaa2b296a Merge "[DO NOT MERGE] Use FUSE_SHORTCIRCUIT if available" into mnc-dr1.5-dev
am: b84295d027

* commit 'b84295d027c9d86720d93e19eb5c1b644553d647':
  [DO NOT MERGE] Use FUSE_SHORTCIRCUIT if available
2016-01-14 00:48:29 +00:00
Thierry Strudel
b84295d027 Merge "[DO NOT MERGE] Use FUSE_SHORTCIRCUIT if available" into mnc-dr1.5-dev 2016-01-14 00:32:01 +00:00
Steve Fung
047597b3fc Merge "crash_reporter: Remove udev collector from Android build" 2016-01-14 00:16:21 +00:00
Dimitry Ivanov
ebe04a9b89 Merge "Add libRS.so to the list of public libraries" 2016-01-13 23:27:20 +00:00
Dimitry Ivanov
cdb6fee17c Add libRS.so to the list of public libraries
Bug: http://b/26509995
Change-Id: I8c0ae3629928171d229a901cfc997780665e3ae8
2016-01-13 15:19:35 -08:00
Thierry Strudel
ac5175f9a6 [DO NOT MERGE] Use FUSE_SHORTCIRCUIT if available
Use a non yet maintainer reviewed kernel patch from QCOM that greatly
improves IO speed in case it is available from the device specific
kernel headers.

Bug: 24216004
Change-Id: I4101d80082c9ad9d042dde5c620ddb309d193d52
2016-01-13 15:11:35 -08:00
Mark Salyzyn
ccfb90d1aa Merge "logd: prune maintain per-id watermark"
am: 7b7b2da6b8

* commit '7b7b2da6b82d9477591a183efde262ead33812fb':
  logd: prune maintain per-id watermark
2016-01-13 20:26:54 +00:00
Mark Salyzyn
7b7b2da6b8 Merge "logd: prune maintain per-id watermark" 2016-01-13 20:23:28 +00:00
Bertrand SIMONNET
0586504e01 metricsd: Persist the metrics to disk periodically.
Every now and then (5 minutes by default), the uploader will persist the
current metrics to disk to avoid losing them in case we exit
unexpectedly (reboot or crash).
When starting up, metricsd will load the previously saved log and resume
the metrics collection from there.

Bug: 25670584
Test: Unit tests.
Test: manual: restart metricsd. The saved log is detected and parsed
correctly.
Test: manual: Send a sample to metricsd, send SIGTERM to metricsd, the
log is saved to disk, metricsd restarts and picks up the log where it
left.

Change-Id: I4cefc62c7ea1fa51333d84d8a7ba0a2e9c7fd58f
2016-01-12 15:54:11 -08:00
Elliott Hughes
6f97784152 Merge "Toolbox: |ps -t| now correctly displays the USER for threads"
am: 7a6cb3063c

* commit '7a6cb3063cb9b0e8bf85b2d6b38b9754a478a376':
  Toolbox: |ps -t| now correctly displays the USER for threads
2016-01-12 23:12:54 +00:00
Elliott Hughes
7a6cb3063c Merge "Toolbox: |ps -t| now correctly displays the USER for threads" 2016-01-12 23:07:12 +00:00
Phani (Gargey) Avadhanam
6268d4c057 Toolbox: |ps -t| now correctly displays the USER for threads
use tid to display thread information

Bug: https://code.google.com/p/android/issues/detail?id=198564
Bug: http://b/26470660
Signed-off-by: "Phani (Gargey) Avadhanam" <pgargey@codeaurora.org>
Change-Id: Ife8ce59d7b6eb6906ab39acebea18c7aee50339a
2016-01-12 15:06:09 -08:00
Mark Salyzyn
15bc48b75e Merge "logd: wrap timed entry too early, timeout immediately"
am: ae6aa1f1ed

* commit 'ae6aa1f1ed2a342b826b4e3a69267af8284ba52f':
  logd: wrap timed entry too early, timeout immediately
2016-01-12 22:04:00 +00:00
Mark Salyzyn
ae6aa1f1ed Merge "logd: wrap timed entry too early, timeout immediately" 2016-01-12 21:57:50 +00:00
Tom Cherry
44e06f5f00 Merge "Remove special case handling of "ro." properties permissions"
am: b45f8179be

* commit 'b45f8179be0fc14f86d5076bdc75a58cca5ef46b':
  Remove special case handling of "ro." properties permissions
2016-01-12 20:54:46 +00:00
Tom Cherry
b45f8179be Merge "Remove special case handling of "ro." properties permissions" 2016-01-12 20:36:32 +00:00
Calin Juravle
6d5017803e nativebrige: log code_cache access errors to stderr as well
115-native-bridge is a flaky tests. This will help tracing the flakiness
cause.

Change-Id: I7b8000738cd97b9cdb1055a0480ff9acbd85cae6
2016-01-12 12:24:16 -08:00
Mark Salyzyn
bf5bb53a43 Merge "logd: unaligned access on security buffer"
am: 27460366e8

* commit '27460366e806f3bca0db0780b53165b82deab684':
  logd: unaligned access on security buffer
2016-01-12 19:49:23 +00:00
Mark Salyzyn
27460366e8 Merge "logd: unaligned access on security buffer" 2016-01-12 19:30:13 +00:00
Bertrand SIMONNET
b6c77af499 metricsd: Cleanup on TERM signal.
metricsd should shutdown cleanly when receiving a TERM signal:
* stop the binder watcher.
* wait for the thread to quit.
* Exit cleanly.

Note: This is not directly used as we don't send SIGTERM on shutdown or
when stopping services yet.

Bug: 25670584
Change-Id: I878d1e67474c72d24790f3540470e37a23112a95
2016-01-12 10:29:40 -08:00
Mark Salyzyn
4690640760 logd: unaligned access on security buffer
Bug: 26485626
Change-Id: I990447ca59982bb2de15decda575fd0e2838b5ed
2016-01-12 10:09:31 -08:00
Elliott Hughes
be6d330c18 Merge "libnetutils: Check socket() return value"
am: e4b332c7e4

* commit 'e4b332c7e4ce19e1e2e6d8fe001d8c9e1709f280':
  libnetutils: Check socket() return value
2016-01-12 04:50:38 +00:00
Elliott Hughes
e4b332c7e4 Merge "libnetutils: Check socket() return value" 2016-01-12 04:46:37 +00:00
Steve Fung
c490e0fe98 crash_reporter: Remove udev collector from Android build
Currently one of the udev collector tests is failing due to the lack
of gzip on the device.  Since we don't have gzip nor udev in Android builds,
remove the udev collector (and tests) from Android builds.

See http://r.android.com/184708 for discussion on removing the udev
collector completely from the source.

Bug: 25779348
Test: `/data/nativetest/crash_reporter_tests/crash_reporter_tests` passes

Change-Id: I883359ac8219f2e1fa6a78927433dbc0be295fe7
2016-01-12 01:46:51 +00:00
Ching Tzung Lin
ebb00c8155 Mount debugfs earlier regardless build variant am: df2d782368 am: 905ad1d3e7
am: 4ce0a17f89  -s ours

* commit '4ce0a17f8903fda898d482e62ad6eee933bb5482':
  Mount debugfs earlier regardless build variant
2016-01-11 23:19:12 +00:00
Ching Tzung Lin
4ce0a17f89 Mount debugfs earlier regardless build variant am: df2d782368
am: 905ad1d3e7

* commit '905ad1d3e7531b49374573cd801fa92a480c97b8':
  Mount debugfs earlier regardless build variant
2016-01-11 22:51:48 +00:00
Ching Tzung Lin
905ad1d3e7 Mount debugfs earlier regardless build variant
am: df2d782368

* commit 'df2d78236834f5f6a99e88c8cd629b09d8292bb6':
  Mount debugfs earlier regardless build variant
2016-01-11 22:50:00 +00:00
Mark Salyzyn
507eb9fec2 logd: prune maintain per-id watermark
Without this change LogBuffer::prune and LogBuffer::erase
contributes 16.7% and 1.79% respectively. With this change,
they contributes 3.06 and 2.33% respectively. Pruning is
performed roughly 1 in every 255 log entries, a periodic
tamer latency spike.

Bug: 23685592
Change-Id: I6ae1cf9f3559bca4cf448efe8bcb2b96a1914c54
2016-01-11 14:46:51 -08:00
Tom Cherry
c787cf291a Remove special case handling of "ro." properties permissions
Currently, properties that begin with "ro." are special cased to skip
over the "ro." part of the prefix before matching with entries in
property_contexts.  This is not strictly needed however and it is
causing complications with the separated prop files work from Bug
21852512, so it is now removed.

Bug 26425619

Change-Id: I3cd14fa2176f96b3931e5f6a50c4a7bcd3af3da6
2016-01-11 14:00:40 -08:00
Ching Tzung Lin
df2d782368 Mount debugfs earlier regardless build variant
ag/835596 can be reverted after this CL is merged.

BUG:26455292
Change-Id: I453b0f1d08d822f8cd2d4d33f1c1b21f0d7f543a
2016-01-11 13:00:22 -08:00