Commit Graph

3130 Commits

Author SHA1 Message Date
Steve Block 4ddc88e73e am 16210c12: am 31a02dba: Fix build
* commit '16210c12bc0a8dab5523289de1e51b6fe8d38053':
  Fix build
2011-10-28 15:38:18 +00:00
Jean-Baptiste Queru 604f52e313 Reconcile with AOSP master
Change-Id: I12bbc98729a54df0e3d355f3bb2b943964202235
2011-10-28 08:37:28 -07:00
Steve Block 16210c12bc am 31a02dba: Fix build
* commit '31a02dba709166df30b7c3352222c550146d7c81':
  Fix build
2011-10-28 15:36:45 +00:00
Steve Block 31a02dba70 Fix build
Change-Id: Icbe57024e6018600d47a68132f53f15d7602dc92
2011-10-28 15:38:20 +01:00
The Android Automerger 1c50ba1d8b merge in ics-mr1-release history after reset to ics-mr1 2011-10-27 06:48:16 -07:00
Ken Sumrall 46d21ef292 am 72410ccf: am a286480f: Fix the class_reset command
* commit '72410ccfaa1c47e4a6e0af0c71f138dca05664f6':
  Fix the class_reset command
2011-10-27 02:52:58 +00:00
Ken Sumrall 72410ccfaa am a286480f: Fix the class_reset command
* commit 'a286480f56012abdb4ef4ddab1c19a5c2316b7b8':
  Fix the class_reset command
2011-10-27 02:49:44 +00:00
Jeff Sharkey a820a0e587 Gracefully handle truncated log messages.
Bug: 5522726
Change-Id: I8637c7da854ec1ecb321632c45ee9bc2edc94a67
2011-10-26 18:59:42 -07:00
Ken Sumrall a286480f56 Fix the class_reset command
The class_reset command used to reset services that had been set to
"disabled" in the init.rc file to a non-disabled state.  Now, if the
service was originally set to "disabled", have the reset command set
it back to disabled.  Otherwise, set it to the "reset" state as it
currently does.

Change-Id: I0c10582e46a8e443d4748d9d893ae762b19b653a
2011-10-26 16:58:27 -07:00
Steve Block 69f4cd7f5a Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGE
Bug: 5449033
Change-Id: Ib453f869977a6e909095a578bbf0420851f887d2
2011-10-26 09:59:23 +01:00
Jeff Brown 55bcd2dd8b Merge "A wee little division by 8 makes all the difference." 2011-10-25 19:43:23 -07:00
Jeff Brown bbb4f34640 Merge "Add support for explicitly dumping native stacks." 2011-10-25 19:43:20 -07:00
Jeff Brown bd57bd00b2 A wee little division by 8 makes all the difference.
Change-Id: Idff879a8461e1abc97dfa624c1441c16df1c7a69
2011-10-25 17:50:20 -07:00
Jeff Brown 9524e4158f Add support for explicitly dumping native stacks.
This change modifies debuggerd so that it can be used to grab
the native stacks of a process that has hung and not just crashed.
Note that only the root user can do this (for now).

adb shell debuggerd <tid>

Then use logcat to find the tombstone file that was generated
which will have the native stacks of all threads in the
requested process.  The specified thread will be shown first
and will also appear in the main log.

Also made some minor tweaks to libcorkscrew so that we
could handle statically compiled executables in the future
if we compiled the library statically.

Improved the "wait_for_user_action" function to support
volume down as an alternative for devices that do not
have home keys.

Removed a mess of gotos.

Change-Id: Ic149653986b0c2f503c7f0e8b7cb1f3be7c84d1e
2011-10-25 17:00:17 -07:00
Steve Block 5fb44952f6 Rename (IF_)LOG() to (IF_)ALOG() DO NOT MERGE
Bug: 5449033
Change-Id: Id318736a9caa58c6da2683f8663699ce998e79d8
2011-10-25 16:28:35 +01:00
Jeff Brown 13e715b491 Use libcorkscrew in debuggerd.
Change-Id: I5e3645a39d96c808f87075b49111d0262a19a0c8
2011-10-22 16:43:00 -07:00
Jeff Brown 10484a0684 Add x86 stack unwinding support to libcorkscrew.
Change-Id: I1d4f4b11b4c8bf517b1dd07afccbedc41a84fd1b
2011-10-22 16:43:00 -07:00
Jeff Brown 501edd29b8 Add a new library for collecting stack traces.
Supports collecting the stack trace of the current thread,
another thread in the same process, or a thread in a
different process (using ptrace).

Change-Id: Ica2594e4436edde4ceb7bcc3d78e6c31a7902cbf
2011-10-22 16:42:59 -07:00
The Android Automerger 899ebdca0b merge in ics-release history after reset to master 2011-10-20 07:02:27 -07:00
Andy McFadden 08dedcfd5c Enable verbose register memory dumps
Dump some memory at addresses for all registers that look like they
might have valid addresses.  Previously this was only done for PC
and LR.

(This is expected to be disabled before ship.)

Bug 5484924

Change-Id: I9802eaa396783e1286ae0c53eaf2473892c38a02
2011-10-19 13:28:33 -07:00
Andy McFadden c69b6b70e3 Merge "Add log summary to tombstones" 2011-10-19 12:01:26 -07:00
Nick Kralevich b62ace9132 Merge "liblog: do better checks of log messages." 2011-10-19 09:13:04 -07:00
The Android Automerger 9ccc4aaa3c merge in ics-release history after reset to master 2011-10-19 07:45:11 -07:00
Andy McFadden e5cc5396e8 Add log summary to tombstones
When the tombstones are uploaded to APR, they're truncated at 64KB.
This causes the log data, which is at the end, to be lost if the
process has more than about 12 threads (which many do).

This change adds the last few lines of the log right below the
report for the crashing thread, where we should be guaranteed to
keep it.

Also, clean up trailing newlines on log messages (which end up in
the tombstone), and don't print a "------- log" banner if there
aren't any messages in that log file (e.g. slog).

Also also, don't try to show_nearby_maps unless this is the crashing
thread.

Bug 5471955

Change-Id: Iaa4fd2fafbaeda2f20bb95f202177d7744a91f9d
2011-10-18 20:20:14 -07:00
Andy McFadden 05a28e1cd4 Merge "Enhance debuggerd memory dumps" 2011-10-18 17:12:21 -07:00
Andy McFadden f2eae5a860 Enhance debuggerd memory dumps
This makes two changes:

(1) Display ASCII values next to the memory dumps.  For example:

I DEBUG: 00008ac4 706f6f4c 20676e69 74206425 73656d69  Looping %d times
I DEBUG: 00008ad4 7453000a 6e69726f 6f742067 0a702520  ..Storing to %p.
I DEBUG: 00008ae4 65642f00 657a2f76 55006f72 6c62616e  ./dev/zero.Unabl

(The hex values are still displayed as little-endian word values, while
the ASCII part is byte oriented.)

(2) Optionally display memory dumps for all registers, not just LR
and PC, for the crashing thread.  This is meant for situations where
we crash dereferencing foo->bar and want to see what the memory near
"foo" looks like -- could be handy if it got stomped by MUTF-16 text
or something recognizable.

Change #2 is currently disabled, via a compile-time setting.

Bug 5471955

Change-Id: Iacfd01c314055bad81db2f43b7d239f10086fcfb
2011-10-18 16:18:02 -07:00
Nick Kralevich e1ede1530f liblog: do better checks of log messages.
Testing:

The following test cases all passed and generated log entries:

 # echo -n '\03foo\0bar\0' > /dev/log/main
 # echo -n '\03\0bar\0' > /dev/log/main
 # echo -n '\03\0a\0' > /dev/log/main

The following entries were successfully processed by
logcat but produced no log entries:

 # echo -n '\03\0\0' > /dev/log/main
 # echo -n '\03a\0\0' > /dev/log/main
 # echo -n '\03b\0\0' > /dev/log/main

Also tested the pathological error condition:

 cat /dev/urandom > /dev/log/main

which produced many "+++ LOG: malformed log entry" errors.

Bug: 5478600
Change-Id: I53bc79507242dcfc14445746c29edf47be0a90b4
2011-10-18 15:37:15 -07:00
Nick Kralevich 4423df76f5 Merge "logcat: add sanity check" 2011-10-18 12:42:26 -07:00
The Android Automerger 543cdd2cac merge in ics-release history after reset to master 2011-10-18 07:01:42 -07:00
sinikang 8cdd4c335f am aa75df74: [maguro] : add setprop net.tcp.buffersize.hspa
* commit 'aa75df74db5beffd25821ed6c360c36197d7bac1':
  [maguro] : add setprop net.tcp.buffersize.hspa
2011-10-17 17:03:15 -07:00
sinikang aa75df74db [maguro] : add setprop net.tcp.buffersize.hspa
-window size optimized for hspa
-Patchset2 : space removed

Change-Id: Ia4d1043d1a93c929721a4d7cca60ce9ff8bbf67a
Signed-off-by: sinikang <sinikang@samsung.com>
2011-10-17 15:56:02 -07:00
David 'Digit' Turner 50f128a392 am 0f9581ab: (-s ours) am b064ed88: (-s ours) am 6306d419: DO NOT MERGE libsysutils: Fix potential overwrites in FrameworkListener
* commit '0f9581abf24738c03f572d12f8ef343b66145c61':
  DO NOT MERGE libsysutils: Fix potential overwrites in FrameworkListener
2011-10-17 14:09:56 -07:00
David 'Digit' Turner 0f9581abf2 am b064ed88: (-s ours) am 6306d419: DO NOT MERGE libsysutils: Fix potential overwrites in FrameworkListener
* commit 'b064ed888aaf6c3abbb839dfc60b9b8bfd17fa88':
  DO NOT MERGE libsysutils: Fix potential overwrites in FrameworkListener
2011-10-17 14:06:45 -07:00
David 'Digit' Turner b064ed888a am 6306d419: DO NOT MERGE libsysutils: Fix potential overwrites in FrameworkListener
* commit '6306d4192558c56ac130fe6d66fbca227fd137d6':
  DO NOT MERGE libsysutils: Fix potential overwrites in FrameworkListener
2011-10-17 14:03:37 -07:00
Nick Kralevich 46070505e7 logcat: add sanity check
Sanity check that the length we get back from the kernel matches
how much data we actually received.

Change-Id: I5cfd80321ab41459bb514dfde2da57413a7bd9e6
2011-10-17 11:40:06 -07:00
Nick Kralevich 63f4a84104 liblog: ensure that the message length is consistent
When parsing log entries which may have embedded \0s, it's
possible for entry->messageLen to not be the actual
length of the string in entry->message.  Detect this condition.

Bug: 5417417
Change-Id: I712cac7696af7831e24765b5a1b345d6ff5fb407
2011-10-17 10:47:04 -07:00
The Android Automerger ec14bcec33 merge in ics-release history after reset to master 2011-10-16 07:01:03 -07:00
Andy McFadden 76feaf3721 Merge "Append log data to tombstones" 2011-10-14 10:44:59 -07:00
Andy McFadden 41e0cef301 Append log data to tombstones
The Android Problem Report site shows tombstones uploaded from
devices.  We can see the native stack traces for every thread,
but sometimes there's a very important bit of information sitting
in the log, and without it we can't analyze the failure.

This change modifies debuggerd so that the log contents for the
crashing process are appended to the tombstone.  The format matches
the output of "logcat -v threadtime".  Both "system" and "main" logs
are included (but not interleaved -- we're not that fancy).

This feature is only enabled when the "ro.debuggable" system property
is set to 1 (indicating a development device).

Bug 5456676

Change-Id: I3be1df59813ccf1058cec496a906f6d31fbc7b04
2011-10-13 16:05:08 -07:00
Andy McFadden 90e6f931f2 Merge "Show maps near native fault address" 2011-10-13 15:36:36 -07:00
Dima Zavin 6606dc9532 am 471157a3: charger: key state being the same is not an error
* commit '471157a393d052aece013d1f8b7701aaadca3b6c':
  charger: key state being the same is not an error
2011-10-13 13:30:00 -07:00
Dima Zavin 471157a393 charger: key state being the same is not an error
Change-Id: I58d53899dbcca8329b65b189c1a6c5eea413c289
Signed-off-by: Dima Zavin <dima@android.com>
2011-10-13 13:04:38 -07:00
Dima Zavin d6da4d4fa5 am 47cca063: Merge changes Idcb48155,Iecb8c3db,I4924134b into ics-mr0
* commit '47cca063939a9d5a3ea0b287d64aac0f53f4c45c':
  charger: ignore key event if value didn't change
  charger: sync with the current key state on boot
  charger: print last_kmsg directly using klog_write
2011-10-13 13:03:08 -07:00
Dima Zavin 47cca06393 Merge changes Idcb48155,Iecb8c3db,I4924134b into ics-mr0
* changes:
  charger: ignore key event if value didn't change
  charger: sync with the current key state on boot
  charger: print last_kmsg directly using klog_write
2011-10-13 13:01:56 -07:00
Andy McFadden 136dcc5ce6 Show maps near native fault address
This adds some additional output to native crashes.  For example, if
something tried to access a bit of mmap(/dev/zero) memory that had
been mprotect()ed, you might see output like this:

I DEBUG   : memory map around addr 4015a00c:
I DEBUG   : 40159000-4015a000 /system/lib/libstdc++.so
I DEBUG   : 4015a000-40162000 /dev/zero
I DEBUG   : b0001000-b0009000 /system/bin/linker

The idea is to see what's in and around the fault address to make it
easier to identify bus errors due to file truncation and segmentation
faults caused by buffer over/underruns.

No output is generated for accesses below 0x1000 (which are likely
NULL pointer dereferences) or for signals that don't set si_addr.

Also, suppress the fault address for signals that don't set si_addr:
I DEBUG   : signal 6 (SIGABRT), code 0 (?), fault addr --------

We still print "fault addr" followed by 8 characters for anything
that is parsing the contents.  The "address" shown for signals like
SIGABRT was meaningless and possibly confusing.

Bug 5358516

Change-Id: Icae8ef309ea2d89b129f68d30f96b2ca8a69cc6c
2011-10-13 12:35:55 -07:00
The Android Automerger 50888f7666 merge in ics-release history after reset to master 2011-10-13 07:00:57 -07:00
Wu-cheng Li 5babfad445 am baad2843: Update camera documentation about face detection.
* commit 'baad2843a1af443aa251be510c4476159d064d20':
  Update camera documentation about face detection.
2011-10-12 21:14:15 -07:00
Wu-cheng Li baad2843a1 Update camera documentation about face detection.
bug:5169599
Change-Id: I5280137cee5401fadec36cae732ecb78a2d44dc3
2011-10-13 12:07:05 +08:00
Dima Zavin 2d978c01ee charger: ignore key event if value didn't change
Change-Id: Idcb481550eca53209be217361cac38e48368a04f
Signed-off-by: Dima Zavin <dima@android.com>
2011-10-12 16:18:23 -07:00
Dima Zavin 2471a6a395 charger: sync with the current key state on boot
If the power key was down when we booted, we would not have
gotten the down event and thus the device would not have rebooted until
the user released and pressed it again.

Change-Id: Iecb8c3dba773bce4647748715d056e8e1d77f7e0
Signed-off-by: Dima Zavin <dima@android.com>
2011-10-12 16:16:07 -07:00