New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 895561 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 31
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

[Autotest failure] All the bluetooth autotests failing from R71-11142.0.0 build

Project Member Reported by pbath...@chromium.org, Oct 15

Issue description

Status: Assigned (was: Untriaged)
Summary: [Autotest failure] All the bluetooth autotests failing from R71-11142.0.0 build (was: [Autotest failure] All he bluetooth autotests failing from R71-11142.0.0 build)
Cc: npoojary@chromium.org
josephsih@ - Looks like its due to yaml package that you added in https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/1245542


10/10 18:14:26.406 WARNI|              test:0606| The test failed with the following exception
Traceback (most recent call last):
  File "/usr/local/autotest/client/common_lib/test.py", line 587, in _exec
    *args, **dargs)
  File "/usr/local/autotest/client/common_lib/test.py", line 806, in _call_test_function
    raise error.UnhandledTestFail(e)
UnhandledTestFail: Unhandled ConstructorError: while constructing a Python object
cannot find module 'dbus' (No module named dbus)
  in "<string>", line 3, column 5:
      ? !!python/object/new:dbus.String  ... 
        ^
Traceback (most recent call last):
  File "/usr/local/autotest/client/common_lib/test.py", line 800, in _call_test_function
    return func(*args, **dargs)
  File "/usr/local/autotest/client/common_lib/test.py", line 715, in _cherry_pick_call
    return func(*p_args, **p_dargs)
  File "/usr/local/autotest/server/cros/bluetooth/bluetooth_test.py", line 40, in warmup
    self.device = bluetooth_device.BluetoothDevice(device_host)
  File "/usr/local/autotest/server/cros/bluetooth/bluetooth_device.py", line 47, in __init__
    properties = self.get_adapter_properties()
  File "/usr/local/autotest/server/cros/bluetooth/bluetooth_device.py", line 257, in get_adapter_properties
    return yaml.load(self._proxy.get_adapter_properties())
  File "/usr/local/autotest/site-packages/yaml/__init__.py", line 71, in load
    return loader.get_single_data()
  File "/usr/local/autotest/site-packages/yaml/constructor.py", line 39, in get_single_data
    return self.construct_document(node)
  File "/usr/local/autotest/site-packages/yaml/constructor.py", line 43, in construct_document
    data = self.construct_object(node)
  File "/usr/local/autotest/site-packages/yaml/constructor.py", line 90, in construct_object
    data = constructor(self, tag_suffix, node)
  File "/usr/local/autotest/site-packages/yaml/constructor.py", line 610, in construct_python_object_new
    return self.construct_python_object_apply(suffix, node, newobj=True)
  File "/usr/local/autotest/site-packages/yaml/constructor.py", line 593, in construct_python_object_apply
    value = self.construct_mapping(node, deep=True)
  File "/usr/local/autotest/site-packages/yaml/constructor.py", line 208, in construct_mapping
    return BaseConstructor.construct_mapping(self, node, deep=deep)
  File "/usr/local/autotest/site-packages/yaml/constructor.py", line 133, in construct_mapping
    value = self.construct_object(value_node, deep=deep)
  File "/usr/local/autotest/site-packages/yaml/constructor.py", line 95, in construct_object
    for dummy in generator:
  File "/usr/local/autotest/site-packages/yaml/constructor.py", line 398, in construct_yaml_map
    value = self.construct_mapping(node)
  File "/usr/local/autotest/site-packages/yaml/constructor.py", line 208, in construct_mapping
    return BaseConstructor.construct_mapping(self, node, deep=deep)
  File "/usr/local/autotest/site-packages/yaml/constructor.py", line 127, in construct_mapping
    key = self.construct_object(key_node, deep=deep)
  File "/usr/local/autotest/site-packages/yaml/constructor.py", line 90, in construct_object
    data = constructor(self, tag_suffix, node)
  File "/usr/local/autotest/site-packages/yaml/constructor.py", line 610, in construct_python_object_new
    return self.construct_python_object_apply(suffix, node, newobj=True)
  File "/usr/local/autotest/site-packages/yaml/constructor.py", line 599, in construct_python_object_apply
    instance = self.make_python_instance(suffix, node, args, kwds, newobj)
  File "/usr/local/autotest/site-packages/yaml/constructor.py", line 540, in make_python_instance
    cls = self.find_python_name(suffix, node.start_mark)
  File "/usr/local/autotest/site-packages/yaml/constructor.py", line 508, in find_python_name
    "cannot find module %r (%s)" % (module_name.encode('utf-8'), exc), mark)
ConstructorError: while constructing a Python object
cannot find module 'dbus' (No module named dbus)
  in "<string>", line 3, column 5:
      ? !!python/object/new:dbus.String  ... 
        ^

Cc: shijinabraham@chromium.org
This is a regression caused by the lack of dbus module used by yaml. It looks a bit weird to me in that yaml is a popular package in autotest but now there is an issue of using it. I will check the server-side packaging to see if this is the case. 
Cc: roopeshr@chromium.org
Cc: -roopeshr@chromium.org roopeshr@google.com
Cc: lgoo...@google.com
Cc: josephsih@chromium.org
Owner: pbath...@chromium.org
The yaml/dbus modules are not in python's standard libryry and are missing in the server containers. Since we would like to keep the container size as small as possible, we would better off work around with existing serialization modules. Hence, the patch that caused the regression was first reverted here -- https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/1297878/2.

And another patch that use pickle to replace json is being reviewed here -- https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/1304453

Since the first (reverted) patch has landed in R72-11198.0.0., Pramod could you confirm if the autotest dash board looks more normal now? Thanks!
Status: Fixed (was: Assigned)
Thanks, Harpreet, for verifying it!

Sign in to add a comment