Commit Graph

357 Commits

Author SHA1 Message Date
Anders 3 Fridlund
0e851c78e3 Move NTP updates outside locks
When the ServerThread handles ACTION_SHUTDOWN intent it sometimes get
stuck on mStatsLock in NetworkStatsService.java.
0  com.android.server.net.NetworkStatsService$5.onReceive()
1  android.app.LoadedApk$ReceiverDispatcher$Args.run()
2  android.os.Handler.handleCallback()
3  android.os.Handler.dispatchMessage()
4  android.os.Looper.loop()
5  com.android.server.ServerThread.run()
This happens when the NetworkStats thread is already holding the
mStatsLock while updating NTP.
0  libcore.io.Posix.getaddrinfo()
1  libcore.io.ForwardingOs.getaddrinfo()
2  java.net.InetAddress.lookupHostByName()
3  java.net.InetAddress.getAllByNameImpl()
4  java.net.InetAddress.getByName()
5  android.net.SntpClient.requestTime()
6  android.util.NtpTrustedTime.forceRefresh()
7  com.android.server.net.NetworkStatsService.performPoll()
8  com.android.server.net.NetworkStatsService.access$100()
9  com.android.server.net.NetworkStatsService$2.onReceive()
10 android.app.LoadedApk$ReceiverDispatcher$Args.run()
11 android.os.Handler.handleCallback()
12 android.os.Handler.dispatchMessage()
13 android.os.Looper.loop()
14 android.os.HandlerThread.run()
Since the NTP update consists of several socket operations it may get
stuck long enough to trigger a System Server Watchdog even though the
socket timeout is set to 20 second.
Further, the NTP update doesn't actually need to be performed inside
the locks and an attempt to change this was made earlier, but the code
wasn't actually moved outside the locks.

Change-Id: Ib37a2b8c2d51a01adb7ff01764f82309433703f0
2012-11-16 13:28:29 +01:00
The Android Open Source Project
cd3eb048ce Reconcile with jb-mr1.1-release - do not merge
Change-Id: Iff336b51ffc2893168e67406d96bc6dd97735b7e
2012-11-06 12:37:23 -08:00
The Android Open Source Project
bb83b1c345 am 32477a8d: am 8d5f8e2b: Reconcile with jb-mr1-factory-release jb-mr1-release - do not merge
* commit '32477a8dbf812795a19529d52c4ec2e079989cef':
2012-11-06 12:26:57 -08:00
The Android Open Source Project
8d5f8e2b7b Reconcile with jb-mr1-factory-release jb-mr1-release - do not merge
Change-Id: I72634b08506c4fed29edd474553cb416dce9cc8e
2012-11-06 12:17:05 -08:00
The Android Automerger
9f62b71346 merge in jb-mr1.1-release history after reset to jb-mr1.1-dev 2012-11-06 02:25:30 -08:00
The Android Open Source Project
5adafd52a0 Reconcile with jb-mr1-release - do not merge
Change-Id: Ib9f5712e4d1a5e0f0b4807cffda4769196c64c21
2012-11-05 14:21:22 -08:00
The Android Automerger
d81cd2fe45 merge in jb-mr1-release history after reset to jb-mr1-dev 2012-11-02 17:34:34 -07:00
Jeff Sharkey
a49ee22913 am 35d0dea3: am 1c743650: Merge "Sanity check network stats coming from disk." into jb-mr1-dev
* commit '35d0dea38bad69082f4153d9c335061a70fac4fc':
  Sanity check network stats coming from disk.
2012-11-02 15:54:50 -07:00
Jeff Sharkey
3a8abe7eec Sanity check network stats coming from disk.
Throw early when structure is unstable, which allows the normal
recoverFromWtf() path to recover automatically.

Bug: 7440485
Change-Id: Ic150d17daac4de7c9ff3489025403a9b485b4620
2012-11-02 15:38:15 -07:00
The Android Open Source Project
477bc569cc Reconcile with jb-mr1-release - do not merge
Change-Id: Ic7d71f0ada5470023de4dafc45024145d4d21a5b
2012-10-02 09:18:17 -07:00
The Android Automerger
42644faf88 merge in jb-mr1-release history after reset to jb-mr1-dev 2012-09-28 06:59:29 -07:00
Jeff Sharkey
233698fe0e am 3a8af8ef: Merge "Migrate more Secure settings to Global." into jb-mr1-dev
* commit '3a8af8efff93ca8ee80fc8c7841e7bee9a8b7786':
  Migrate more Secure settings to Global.
2012-09-27 19:33:38 -07:00
Jeff Sharkey
c783695df2 Migrate more Secure settings to Global.
Migrate networking, storage, battery, DropBox, and PackageManager
related Secure settings to Global table.

Bug: 7232014, 7231331, 7231198
Change-Id: I772c2a9586a2f708c9db95622477f235064b8f4d
2012-09-27 16:22:53 -07:00
The Android Open Source Project
e7e41f555c Reconcile with jb-mr1-release - do not merge
Change-Id: I37715a9d2489d282d09a60cf32d92f13c3d82b13
2012-09-24 10:12:10 -07:00
The Android Automerger
1b044270f3 merge in jb-mr1-release history after reset to jb-mr1-dev 2012-09-20 06:59:44 -07:00
Jeff Sharkey
8f9bdabafc am c3e3311c: Merge "Migrate network stats from removed users." into jb-mr1-dev
* commit 'c3e3311c050f47a229e1b49f1fdf685669d79d53':
  Migrate network stats from removed users.
2012-09-20 06:09:01 -07:00
Jeff Sharkey
8c8309a6fe Migrate network stats from removed users.
When a user is removed, migrate all network stats belonging to that
user into special UID_REMOVED bucket.  Also removes those stats from
kernel to avoid double-counting if another user is created.

Bug: 7194784
Change-Id: I03f1d660fe3754566326b7749cae8068fc224ea9
2012-09-19 14:54:05 -07:00
The Android Automerger
71234dc56e merge in jb-mr1-release history after reset to jb-mr1-dev 2012-09-14 14:10:27 -07:00
Jeff Sharkey
9e52673e90 am 04a34b37: Merge "Actually move to Global settings." into jb-mr1-dev
* commit '04a34b375513eaeec67f54bb203ef6b763328751':
  Actually move to Global settings.
2012-09-14 13:51:10 -07:00
Jeff Sharkey
77127d1c93 Actually move to Global settings.
Also add better ConnectivityService logging.

Bug: 7157464
Change-Id: Ia235a7e62ed809240913c4782920c1410c7d597d
2012-09-14 13:47:51 -07:00
Jeff Sharkey
eb92325f0e am a043c2c0: Merge "Move to Global.NETSTATS and Global.NTP constants." into jb-mr1-dev
* commit 'a043c2c0534afe418fc39bdb43bfaab394ba821a':
  Move to Global.NETSTATS and Global.NTP constants.
2012-09-14 13:17:38 -07:00
Jeff Sharkey
633746dc75 Move to Global.NETSTATS and Global.NTP constants.
Bug: 7157464
Change-Id: Ief10fd37940f62420f5684940994c9f93802e0be
2012-09-14 13:14:21 -07:00
The Android Open Source Project
dc11364026 Reconcile with jb-mr1-release - do not merge
Change-Id: I78543f98dd668123d26915177c2c65ed01b9d2be
2012-09-07 15:03:50 -07:00
The Android Automerger
fb8de3e2b5 merge in jb-mr1-release history after reset to jb-mr1-dev 2012-09-03 06:33:59 -07:00
Dianne Hackborn
6c51b02db4 am 73365695: Merge "Improve multi-user broadcasts." into jb-mr1-dev
* commit '73365695e4d169126c6932df8e8e932aefe6aaca':
  Improve multi-user broadcasts.
2012-08-30 14:58:23 -07:00
Dianne Hackborn
692107e827 Improve multi-user broadcasts.
You can now use ALL and CURRENT when sending broadcasts, to specify
where the broadcast goes.

Sticky broadcasts are now correctly separated per user, and registered
receivers are filtered based on the requested target user.

New Context APIs for more kinds of sending broadcasts as users.

Updating a bunch of system code that sends broadcasts to explicitly
specify which user the broadcast goes to.

Made a single version of the code for interpreting the requested
target user ID that all entries to activity manager (start activity,
send broadcast, start service) use.

Change-Id: Ie29f02dd5242ef8c8fa56c54593a315cd2574e1c
2012-08-30 14:33:22 -07:00
The Android Open Source Project
7c41b0f446 Reconcile with jb-mr1-release - do not merge
Change-Id: Ieb696e80156846e1396e3508347bc02c01b9553e
2012-08-07 11:03:33 -07:00
The Android Automerger
70cf63b19d merge in jb-mr1-release history after reset to jb-mr1-dev 2012-08-07 06:34:26 -07:00
Jeff Sharkey
66762a4bee am bec1d13d: Merge "Make generic BaseNetworkObserver." into jb-mr1-dev
* commit 'bec1d13da2ef3c8c2c4cc4f740474d095068bd8b':
  Make generic BaseNetworkObserver.
2012-08-05 15:00:25 -07:00
Jeff Sharkey
0066733be0 Make generic BaseNetworkObserver.
This makes it easier to add new INetworkManagementEventObserver events
in future.

Change-Id: I432263d745558de4b878f313c1951230ed9db2b1
2012-08-05 14:32:41 -07:00
The Android Open Source Project
3f24f7c510 Reconcile with jb-mr1-release - do not merge
Change-Id: Id4ed97d910fb1a57271ac4dd2ba530e047242003
2012-08-03 13:56:30 -07:00
The Android Automerger
6ddcc4a07e merge in jb-mr1-release history after reset to jb-mr1-dev 2012-08-02 07:16:57 -07:00
The Android Open Source Project
d56b647d67 Reconcile with jb-mr1-release - do not merge
Change-Id: I2a14632780e1a82c04a53ef60c7e4040a4fe0653
2012-08-01 15:13:34 -07:00
The Android Automerger
90400390cf merge in jb-mr1-release history after reset to jb-mr1-dev 2012-08-01 07:10:35 -07:00
Dianne Hackborn
2c5a4b3d9e am 4e61e3f8: Merge "Make AtomicFile a public API. It\'s about time!" into jb-mr1-dev
* commit '4e61e3f8d3992597bb1f4d0a0e27f3c0049311a8':
  Make AtomicFile a public API.  It's about time!
2012-07-31 18:13:38 -07:00
Dianne Hackborn
4e61e3f8d3 Merge "Make AtomicFile a public API. It's about time!" into jb-mr1-dev 2012-07-31 18:11:03 -07:00
Dianne Hackborn
3dfb8b498a Make AtomicFile a public API. It's about time!
Change-Id: Ib34e294747405b7ab709cb0bbb2d9a0cc80ce86a
2012-07-31 17:54:52 -07:00
Jeff Sharkey
12afb1cfcc am e1cf73eb: Revert "API to adjust network stats."
* commit 'e1cf73eb6949117df598f5ba5b26439058f8adb5':
  Revert "API to adjust network stats."
2012-07-31 17:19:34 -07:00
Jeff Sharkey
e1cf73eb69 Revert "API to adjust network stats." 2012-07-31 17:11:07 -07:00
Jeff Sharkey
0942c6f705 am 16ef5779: Merge "API to adjust network stats. DO NOT MERGE." into jb-mr1-dev
* commit '16ef57791766b92b8e34de4f752db2f522f34c82':
  API to adjust network stats. DO NOT MERGE.
2012-07-31 12:11:46 -07:00
Jeff Sharkey
6615400fe8 API to adjust network stats. DO NOT MERGE.
Enables system apps to correctly account network usage performed on
behalf of another application.

Bug: 6695246
Change-Id: I39e243afd57936b6b30157a6ca511a17b6c55c39
2012-07-31 11:45:17 -07:00
The Android Automerger
efbd30abc6 merge in jb-mr1-release history after reset to jb-mr1-dev 2012-07-30 09:46:04 -07:00
Jeff Sharkey
0dbcedeece API to adjust network stats.
Enables system apps to correctly account network usage performed on
behalf of another application.

Bug: 6695246
Change-Id: I39e243afd57936b6b30157a6ca511a17b6c55c39
2012-07-27 17:47:21 -07:00
Jean-Baptiste Queru
e94ac8b67e am 1fe7a813: (-s ours) Merge "Enhance StateMachine Quitting and logging support. DO NOT MERGE" into jb-dev-plus-aosp
* commit '1fe7a81383a0b7c87be2cc4291e1ede9d85bf819':
  Enhance StateMachine Quitting and logging support. DO NOT MERGE
2012-07-02 14:50:47 -07:00
Wink Saville
66f04e9ddb Enhance StateMachine Quitting and logging support. DO NOT MERGE
Make StateMachine#quit non-conditional and remove the need to
process the SM_QUIT_CMD it is now private.

Rename halting to onHalting.

Add onQuitting

Change the message specific logging to be more generic and change
the xxxProcessedMessagesYyy methods to xxxLogRecXyy names. Also add
addLogRec(String) and addLogRec(String, State) as the generic logging
methods.

bug: 5678189
Change-Id: I22f66d11828bfd70498db625fe1be728b90478b7

Conflicts:

	services/java/com/android/server/NsdService.java
2012-07-02 10:57:11 -07:00
Robert Greenwalt
1819c4f10e Merge "Fix a sync problem in NativeDaemonConnector." 2012-06-07 11:37:15 -07:00
Robert Greenwalt
610bc9678d Fix a sync problem in NativeDaemonConnector.
We had a gap in sync coverage between doing a check and waiting and a
matching gap between setting a condition and notifying.  It was possible
to get context switched just so and have the notify hit before the waiter
had started waiting.

bug:6492166
Change-Id: Idc876cf85b35902a79fae932547957ed5ef00e4f
2012-06-07 11:22:54 -07:00
The Android Open Source Project
7cf507222a am 5418b476: Reconcile with jb-release nakasi-factoryrom-release
* commit '5418b476be6bc998fe1de7cefe1fe61453cb7f50':
  Always queue A2DP connection state message with wakelock held
  Adding more logging for bug: 6499508
  Fix bug 6558006: SystemUI native heap is huge. Fix memory leak
  Fix build.
  Revert "Make the protectionLevel of framework permissions consistent and related to sensitive user data. Dangerous permissions are applied only where sensitive user data may be exposed."
  Survey says: NIET!
  Fix 6580421: make sure MultiWaveView.reset() makes handle visible
  Fix issue #6579824: Email crash observed after updating...
  Fix 6398209: SearchPanel gesture improvements
2012-06-07 07:55:38 -07:00
The Android Open Source Project
5418b476be Reconcile with jb-release nakasi-factoryrom-release
Change-Id: Ibd5be536b10a8df19d365da267d2ad46b84dc14c
2012-06-07 07:49:05 -07:00
Irfan Sheriff
a481387a1f resolved conflicts for merge of 43996db6 to master
Change-Id: Icb13c37491d3e9f0252198f98d8110740fa1f997
2012-06-05 09:49:24 -07:00