Running the memory usage test suite on the device crashes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Autopilot |
Fix Released
|
Undecided
|
Unassigned | ||
autopilot (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Running on the latest flash (Build: 20130711.2 (Saucy-41)) I get the following error message:
Loading tests from: /usr/lib/
09:49:22.354 INFO globals:48 - *******
09:49:22.355 INFO globals:49 - Starting test ubuntu_
09:49:22.355 WARNING testcase:113 - No tracing available - install the python-
09:49:22.561 WARNING testcase:146 - Process manager backend unavailable, application snapshot support disabled.
09:49:22.622 ERROR importer:51 - Could not find any typelib for Gdk
09:49:22.918 DEBUG probes:42 - smem start: Browser started
09:49:22.938 INFO __init__:136 - Launching process: ['/usr/
09:49:22.955 INFO __init__:169 - Looking for autopilot interface for PID 2541 (and children)
09:49:23.000 WARNING __init__:186 - Caught exception while searching for autopilot interface: 'DBusException(
09:49:24.112 WARNING __init__:186 - Caught exception while searching for autopilot interface: 'DBusException(
09:49:24.243 DEBUG dbus:354 - Selecting objects of type QQuickWindow with attributes: {}
09:49:24.257 WARNING dbus:479 - Generating introspection instance for type 'QQuickWindow' based on generic class.
09:49:24.292 DEBUG probes:58 - smem stop: Browser started
09:49:24.292 DEBUG probes:59 - Running 'smem-tabs'...
09:49:24.973 INFO testcase:382 - waiting for process to exit.
09:49:26.018 ERROR testresult:35 - ERROR: ubuntu_
09:49:26.020 ERROR testresult:35 - traceback: {{{
Traceback (most recent call last):
File "/usr/lib/
self.
File "/usr/lib/
self.gen.next()
File "/usr/lib/
self.
File "/usr/lib/
.format(
KeyError: <subprocess.Popen object at 0xc7ff50>
}}}
09:49:26.021 ERROR testresult:35 - process-stdout: {{{
}}}
09:49:26.021 ERROR testresult:35 - traceback-2: {{{
Traceback (most recent call last):
File "/usr/lib/
obj.
TypeError: on_test_end() takes no arguments (2 given)
}}}
09:49:26.022 ERROR testresult:35 - traceback-1: {{{
Traceback (most recent call last):
File "/usr/lib/
indent=4, sort_keys=True)
File "/usr/lib/
for chunk in iterable:
File "/usr/lib/
for chunk in _iterencode_dict(o, _current_
File "/usr/lib/
for chunk in chunks:
File "/usr/lib/
for chunk in chunks:
File "/usr/lib/
o = _default(o)
File "/usr/lib/
raise TypeError(repr(o) + " is not JSON serializable")
TypeError: <subprocess.Popen object at 0xc7ff50> is not JSON serializable
}}}
09:49:26.022 ERROR testresult:35 - process-stderr: {{{
unknown option -- t
unknown option -- e
unknown option -- s
unknown option -- t
unknown option -- a
unknown option -- b
unknown option -- i
unknown option -- l
unknown option -- i
unknown option -- t
unknown option -- y
loaded the dummy plugin
loaded the Linux plugin
Registered the AalSensorPlugin types
Loading testability driver.
WARNING: This project is using the experimental QML API extensions for QtWebKit and is therefore tied to a specific QtWebKit release.
WARNING: The experimental API will change from version to version, or even be removed. You have been warned!
callbacks 0x42af0499 0x42af049d
creating surface at (0, 58) with size (720, 1222)loaded the dummy plugin
loaded the Linux plugin
Registered the AalSensorPlugin types
}}}
Tests running...
__pthread_gettid -2
-------
=======
ERROR: ubuntu_
-------
_StringException: Empty attachments:
process-stdout
process-stderr: {{{
unknown option -- t
unknown option -- e
unknown option -- s
unknown option -- t
unknown option -- a
unknown option -- b
unknown option -- i
unknown option -- l
unknown option -- i
unknown option -- t
unknown option -- y
loaded the dummy plugin
loaded the Linux plugin
Registered the AalSensorPlugin types
Loading testability driver.
WARNING: This project is using the experimental QML API extensions for QtWebKit and is therefore tied to a specific QtWebKit release.
WARNING: The experimental API will change from version to version, or even be removed. You have been warned!
callbacks 0x42af0499 0x42af049d
creating surface at (0, 58) with size (720, 1222)loaded the dummy plugin
loaded the Linux plugin
Registered the AalSensorPlugin types
}}}
test-log: {{{
09:49:22.354 INFO globals:48 - *******
09:49:22.355 INFO globals:49 - Starting test ubuntu_
09:49:22.355 WARNING testcase:113 - No tracing available - install the python-
09:49:22.561 WARNING testcase:146 - Process manager backend unavailable, application snapshot support disabled.
09:49:22.622 ERROR importer:51 - Could not find any typelib for Gdk
09:49:22.918 DEBUG probes:42 - smem start: Browser started
09:49:22.938 INFO __init__:136 - Launching process: ['/usr/
09:49:22.955 INFO __init__:169 - Looking for autopilot interface for PID 2541 (and children)
09:49:23.000 WARNING __init__:186 - Caught exception while searching for autopilot interface: 'DBusException(
09:49:24.112 WARNING __init__:186 - Caught exception while searching for autopilot interface: 'DBusException(
09:49:24.243 DEBUG dbus:354 - Selecting objects of type QQuickWindow with attributes: {}
09:49:24.257 WARNING dbus:479 - Generating introspection instance for type 'QQuickWindow' based on generic class.
09:49:24.292 DEBUG probes:58 - smem stop: Browser started
09:49:24.292 DEBUG probes:59 - Running 'smem-tabs'...
09:49:24.973 INFO testcase:382 - waiting for process to exit.
}}}
traceback-1: {{{
Traceback (most recent call last):
File "/usr/lib/
indent=4, sort_keys=True)
File "/usr/lib/
for chunk in iterable:
File "/usr/lib/
for chunk in _iterencode_dict(o, _current_
File "/usr/lib/
for chunk in chunks:
File "/usr/lib/
for chunk in chunks:
File "/usr/lib/
o = _default(o)
File "/usr/lib/
raise TypeError(repr(o) + " is not JSON serializable")
TypeError: <subprocess.Popen object at 0xc7ff50> is not JSON serializable
}}}
traceback-2: {{{
Traceback (most recent call last):
File "/usr/lib/
obj.
TypeError: on_test_end() takes no arguments (2 given)
}}}
Traceback (most recent call last):
File "/usr/lib/
self.
File "/usr/lib/
self.gen.next()
File "/usr/lib/
self.
File "/usr/lib/
.format(
KeyError: <subprocess.Popen object at 0xc7ff50>
Ran 1 test in 3.669s
FAILED (failures=1)
Related branches
- PS Jenkins bot: Approve (continuous-integration)
- Thomi Richards (community): Approve
-
Diff: 28 lines (+5/-5)1 file modifiedautopilot/introspection/__init__.py (+5/-5)
Changed in autopilot: | |
milestone: | none → 1.4 |
status: | Fix Committed → Fix Released |
The problem according to the traceback is as follows:
- test case fails
- cleanup runs
- an attempt to write report is made
- json module fails because data is not serializable
Anyway, there is another issue here that I'd like to bring up. According to the
tests I've run there's something that doesn't behave the same way in autopilot
depending on where the test is executed.
If the test case is executed in the desktop, then `proxy.app.process` seems to
be a `subprocess.Popen` object and `proxy.app.pid` is an integer that indeed
matches the process id for the application that was launched.
However, when the test case is executed in a device, `proxy.app.process` is an
integer that matches the process id for the application that was launched and
`proxy.app.pid` doesn't seem to exist.
What I think that happened in this case is that the test case was executed in a
desktop and, when it failed, the json module failed to serialize the data
because instead of an integer (as it happens in the touch image), what it found
was a `subprocess.Popen` object that cannot be serialized.
Consequently, what I'm going to do is move this bug to the `autopilot` project
since the root cause is that autopilot isn't providing a consistent way to
access the PID of an application that has been launched through the proxy
object.