History log of /system/connectivity/shill/dbus/chromeos_supplicant_network_proxy.cc
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
03e6719bae1e0903d94853b896673a033196bcf5 13-Oct-2015 Alex Vakulenko <avakulenko@google.com> shill: Rename "chromeos" -> "brillo" in include paths and namespaces

libchromeos is transitioning to libbrillo and chromeos namespaces
and include directory is changing to brillo.

Bug: 24872993
TEST=built for aosp and brillo, all unit tests pass on dragonboard

Change-Id: I804311e49ee780ca96e05f6a581e8c95709d4e1d
/system/connectivity/shill/dbus/chromeos_supplicant_network_proxy.cc
a252f5be9870291e800ce2ffa1d6f6b4bbb32258 22-Sep-2015 Peter Qiu <zqiu@google.com> dbus: release D-Bus object upon proxy destruction

Currently, the generated Chrome OS D-Bus proxies are leaking
memory/resources, since it never remove the underlying object
proxy from the bus upon destruction. This causes a problem
when we frequently create/destroy proxies (ChromeosSupplicantBSSProxy),
where the bus would permenantly fail to add match rules for
new object proxies once the limit for match rules is reached.
Without match rules, object proxies will not be able to receive
any signals from the bus.

Previously, we tried to resolve this issue by releasing D-Bus
object upon proxy destruction for all proxies (CL:171310). This causes
problem for proxies with well known path. When multiple instances
of such proxies are created, detructing the first one will remove
the underlying D-Bus object on the bus. SupplicantProcessProxy is
one of them, it is created by both Ethernet (for wired 802.1x) and
WiFi.

So to work around this issue, only release the D-Bus objects for
proxies with unique paths. The memory/resource leaks from the
proxies with well known paths are very insignificant compare to the
proxies that were created dynamically/on-demand.

Bug: 23560086
TEST=Run wifi_matfunc test
TEST=Run platform_ExternalUsbPeripherals.set1 on a DUT where shill would
crash with the previous fix CL:171310
TEST=Run network_WiMaxSmoke test

Change-Id: I2808e6b80f3753432cb36e51f38d6dcbd6d880ed
/system/connectivity/shill/dbus/chromeos_supplicant_network_proxy.cc
5413cb70ed2ec916e98118c8e545f6db0ad78551 18-Sep-2015 Ningyuan Wang <nywang@google.com> shill: use a synchronous property set for wpa_supplicant

Currently shill is using an asynchronous property set to enable or
disable the supplicant network.
In this CL shill uses synchronous property set instead.

Bug: 24131409
TEST=run tests on a veyron_jaq chromebook
TEST=unittests

Change-Id: I2c16b92b9f3b981b63093b6f2f6ee4669c25b294
/system/connectivity/shill/dbus/chromeos_supplicant_network_proxy.cc
2148dfd552b045aff8eed4c3fb8cf9ff5a3758ef 22-Sep-2015 Peter Qiu <zqiu@google.com> Revert "dbus: release object proxy from the bus"

This reverts commit a9a0e8356b33ccac1f06ffb1cb8a601dca4d62f2.

The original CL causes shill crash on reboot and suspend/resume
https://code.google.com/p/chromium/issues/detail?id=534299.

Revert it for now to unblock others. Will dig deeper to find
the root cause.

Bug: None
TEST=Run ExternalUsbPeripherals autotest

Change-Id: I3a568ba09fc669a93a74fca0957c93211737134f
/system/connectivity/shill/dbus/chromeos_supplicant_network_proxy.cc
a9a0e8356b33ccac1f06ffb1cb8a601dca4d62f2 17-Sep-2015 Peter Qiu <zqiu@google.com> dbus: release object proxy from the bus

Currently, the generated Chrome OS D-Bus proxies are leaking
memory/resources, since they never remove the underlying object
proxy from the bus upon destruction. This causes a problem
when we frequently create/destroy proxies (ChromeosSupplicantBSSProxy),
where the bus would permenantly fail to add match rules for
new object proxies once the limit for match rules is reached.
Without match rules, object proxies will not be able to receive
any signals from the bus.

To resolve this issue, explicitly release the object proxy from
the bus upon proxy destruction.

Note: ReleaseObjectProxy calls Bus::RemoveObjectProxy, which is
an asynchronous call. So the bus can only be destructed after the
asynchronous object proxy cleanup is completed.

Note: do not release the object proxy from the bus for cellular proxies.
It turns out that cellular initializes a lot of their proxies using
the same service name and path. And in libchrome's D-Bus library,
D-Bus objects are mapped based on service name and path. So
for proxies with same service name and path, only one D-Bus object
is actually allocated by the bus. Based to this behavior, the
resource leak from cellular proxies should be minimal, and
shouldn't have any negative impact on shill.

While there, defer the destruction for the ChromeosDBusControl
to ChromeosDaemon's destructor. Since the proxy bus can only be
deleted after the asynchronous object proxy cleanups are completed.

Bug: 23560086
TEST=Verify no "org.freedesktop.DBus.Error.LimitsExceeded" error
TEST=in /var/log/net.log after leaving a wolf device up for a day.
TEST=Verify no shill crash after restarting shill

Change-Id: Ic78eed00b448743f11738717f2b0ac7da08fc135
/system/connectivity/shill/dbus/chromeos_supplicant_network_proxy.cc
c0beca55d290fe0b1c96d78cbbcf94b05c23f5a5 03-Sep-2015 Peter Qiu <zqiu@google.com> License shill to Apache2

This patch automatically replaced the license on all text files from
Chromium OS (BSD style) to AOSP (Apache2), keeping the original year as
a reference.

The license header was added to .gyp and .gypi, the NOTICE was added with a copy
of the Apache2 license and MODULE_LICENSE_* file was added.

BUG=23587594
TEST=grep 'Chromium OS Authors' doesn't find anything.

Change-Id: If41ede586c2465f5831fb7fee270ff41dbfdb596
/system/connectivity/shill/dbus/chromeos_supplicant_network_proxy.cc
3b86eb2bd80b06ccf240368375e78718d94a3a7f 12-Aug-2015 Peter Qiu <zqiu@chromium.org> shill: update proxy creation APIs for chromeos dbus

Update APIs to account for proxies that monitor on its service
availability. And remove unnecessary arguments, such as well known
service name and path.

Also use chromeos::dbus_utils::Property instead of dbus::Property,
which supports more complex type such as variant diciontary. And
do not register unused properties.

BUG=chromium:517680
TEST=unittests, wifi_matfunc tests

Change-Id: Id5873dfa73da68cc56394edac7fa97144ae47e89
Reviewed-on: https://chromium-review.googlesource.com/292927
Commit-Ready: Zeping Qiu <zqiu@chromium.org>
Tested-by: Zeping Qiu <zqiu@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Reviewed-by: Zeping Qiu <zqiu@chromium.org>
/system/connectivity/shill/dbus/chromeos_supplicant_network_proxy.cc
d0f54b608798f230eee2e79fd2130cae2f8e70cf 29-Jul-2015 Peter Qiu <zqiu@chromium.org> shill: use interface name when registering properties

Supplicant's service name is currently being used to register
properties for various DBus interfaces. Instead, use the respective
interface name.

BUG=chromium:507869
TEST=unittests

Change-Id: I4129242e922392c5dddec1dc6062e355f43e017e
Reviewed-on: https://chromium-review.googlesource.com/289323
Tested-by: Zeping Qiu <zqiu@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Trybot-Ready: David James <davidjames@chromium.org>
Commit-Queue: Zeping Qiu <zqiu@chromium.org>
/system/connectivity/shill/dbus/chromeos_supplicant_network_proxy.cc
c34da84ef49b32c27c879c3d37831c7970a8538b 24-Jul-2015 Peter Qiu <zqiu@chromium.org> shill: fix WeakPtrFactory declaration in chromeos DBus proxies

Thanks to @avakulento for pointing out that WeakPtrFactory must be
the last member of the class. So during destruction, it will be
destroyed first, which will invalidate all delegates.

Fix it for newly added chromeos DBus proxies that violated this.

BUG=None
TEST=USE="asan clang chromeos_dbus" FEATURES=test emerge-$BOARD shill

Change-Id: I1fb7d5f446ef3f64d434724ac15bb962d898faaf
Reviewed-on: https://chromium-review.googlesource.com/288364
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Zeping Qiu <zqiu@chromium.org>
Tested-by: Zeping Qiu <zqiu@chromium.org>
/system/connectivity/shill/dbus/chromeos_supplicant_network_proxy.cc
55ce0b668c0096a2a0ae2c6dfe154635e80b169c 20-Jul-2015 Peter Qiu <zqiu@chromium.org> shill: chromeos DBus proxy for supplicant DBus interfaces

Implement chromeos DBus proxy for fi.w1.wpa_supplicant1.Interface,
fi.w1.wpa_supplicant1.Network, and fi.w1.wpa_supplicant1.BSS interfaces.

Note: PropertySet::Set method is async call, proxy interface APIs
that uses PropertySet::Set method will always return success, with
failures being logged in the callback. Since the caller of those
APIs generally only use the return status for logging purpose.

BUG=chromium:507869
TEST=USE="asan clang chromeos_dbus" FEATURES=test emerge-$BOARD shill

Change-Id: I0efe529d08ba0b41b3ddef2df2adbec499a5477a
Reviewed-on: https://chromium-review.googlesource.com/286850
Trybot-Ready: Zeping Qiu <zqiu@chromium.org>
Tested-by: Zeping Qiu <zqiu@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Zeping Qiu <zqiu@chromium.org>
/system/connectivity/shill/dbus/chromeos_supplicant_network_proxy.cc