qmlscene crashed while running music-app autopilot tests

Bug #1366777 reported by Omer Akram
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu Music App
Fix Released
Undecided
Victor Thompson
mediascanner2 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

music-app tests could not succeed due to qmlscene crash

http://ci.ubuntu.com/smokeng/utopic/touch/mako/222:20140904.1:20140903.1/10220/music_app/

_StringException: Binary content:
  FailedTestScreenshot (image/png)

/var/log/syslog: {{{Sep 5 00:59:45 ubuntu-phablet kernel: [ 86.241416] input: autopilot-finger as /devices/virtual/input/input6}}}
Application Log (com.ubuntu.music_music_1.3.611): {{{
/usr/lib/arm-linux-gnueabihf/qt5/bin/qmlscene: unrecognized option '--url='
/usr/lib/arm-linux-gnueabihf/qt5/bin/qmlscene: invalid option -- 'I'
Testability driver loaded. Wire protocol version is "1.4".
Could not create thumbnailer: Unknown error when checking cache access: Is a directory
Failed to register thumbnailer image provider: Unknown error when checking cache access: Is a directory
terminate called after throwing an instance of 'std::runtime_error'
  what(): Tried to open a db with an unsupported schema version.
}}}

test-log: {{{
00:59:45.372 WARNING testcase:115 - No tracing available - install the python-autopilot-trace package!
00:59:45.627 WARNING testcase:162 - Process manager backend unavailable, application snapshot support disabled.
00:59:45.691 INFO logging:45 - str: Set the value of an initctl environment variable. Arguments ('/home/phablet/autopilot/fakeenv/tmp8mgdb_gk',).
Keyword arguments: {}.
00:59:45.712 DEBUG __init__:174 - Patched home to fake home directory /home/phablet/autopilot/fakeenv/tmp8mgdb_gk
00:59:45.713 DEBUG __init__:178 - Creating music library for click test
00:59:45.714 DEBUG __init__:179 - Home set to /home/phablet/autopilot/fakeenv/tmp8mgdb_gk
00:59:45.714 DEBUG __init__:181 - Music path set to /home/phablet/autopilot/fakeenv/tmp8mgdb_gk/Music
00:59:45.715 DEBUG __init__:186 - Mediascanner path set to /home/phablet/autopilot/fakeenv/tmp8mgdb_gk/.cache/mediascanner-2.0
00:59:45.716 DEBUG __init__:192 - Content dir set to /home/phablet/autopilot/music_app/content
00:59:45.819 DEBUG __init__:201 - Music copied, files ['1.ogg', '2.ogg', '3.mp3']
00:59:45.820 DEBUG __init__:214 - Patching fake mediascanner database in /home/phablet/autopilot/fakeenv/tmp8mgdb_gk/.cache/mediascanner-2.0
00:59:45.820 DEBUG __init__:217 - Mediascanner database files ['mediastore.sql', 'mediastore.db']
00:59:45.904 DEBUG __init__:207 - Mediascanner database copied, files ['mediastore.sql', 'mediastore.db']
00:59:45.906 INFO logging:45 - TestMainWindow: launch_test_click. Arguments (). Keyword arguments: {}.
00:59:45.907 INFO _launcher:280 - Attempting to launch click application '(default)' from click package 'com.ubuntu.music' and URIs ''
00:59:46.691 INFO _launcher:120 - Attempting to launch application 'com.ubuntu.music_music_1.3.611' with URIs '' via upstart-app-launch
01:00:13.601 ERROR proxies:410 - Introspect error on :1.96:/com/canonical/Autopilot/Introspection: dbus.exceptions.DBusException:
org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)
01:00:13.602 DEBUG proxies:413 - Executing introspect queue due to error
01:00:36.491 ERROR _launcher:206 - Timed out waiting for Application with app_id 'com.ubuntu.music_music_1.3.611' to stop.
01:00:36.498 INFO logging:45 - str: Set the value of an initctl environment variable. Arguments ('/home/phablet',). Keyword arguments: {}.
}}}

Traceback (most recent call last):
  File "/home/phablet/autopilot/music_app/tests/test_music.py", line 26, in setUp
    super(TestMainWindow, self).setUp()
  File "/home/phablet/autopilot/music_app/tests/__init__.py", line 255, in setUp
    self.app = MusicApp(launcher_method())
  File "/usr/lib/python3/dist-packages/autopilot/logging.py", line 46, in inner
    return f(instance, *args, **kwargs)
  File "/home/phablet/autopilot/music_app/tests/__init__.py", line 92, in launch_test_click
    emulator_base=ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase)
  File "/usr/lib/python3/dist-packages/autopilot/testcase.py", line 310, in launch_click_package
    return launcher.launch(package_id, app_name, app_uris)
  File "/usr/lib/python3/dist-packages/autopilot/application/_launcher.py", line 283, in launch
    return super().launch(app_id, app_uris)
  File "/usr/lib/python3/dist-packages/autopilot/application/_launcher.py", line 146, in launch
    pid=pid
  File "/usr/lib/python3/dist-packages/autopilot/introspection/_search.py", line 176, in get_proxy_object_for_existing_process
    _get_search_criteria_string_representation(**kwargs)
  File "/usr/lib/python3/dist-packages/autopilot/introspection/_search.py", line 375, in _raise_if_not_single_result
    (criteria_string)
autopilot.exceptions.ProcessSearchError: Search criteria (object path = '/com/canonical/Autopilot/Introspection', pid = 3292) returned no results

Related branches

Revision history for this message
Omer Akram (om26er) wrote :
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

I retraced the crash file in bug #1367142 where it shows this crash happens inside mediascanner. Changing the package accordingly.

---
#0 0xb5ecf8e6 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
No symbol table info available.
#1 0xb5edde5e in raise () from /lib/arm-linux-gnueabihf/libc.so.6
No symbol table info available.
#2 0xb5edeb4e in abort () from /lib/arm-linux-gnueabihf/libc.so.6
No symbol table info available.
#3 0xb6065184 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6
No symbol table info available.
#4 0xb60639b4 in ?? () from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6
No symbol table info available.
#5 0xb6063a0a in std::terminate() () from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6
No symbol table info available.
#6 0xb6063c2a in __cxa_throw () from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6
No symbol table info available.
#7 0xae533e70 in mediascanner::MediaStore::MediaStore(std::string const&, mediascanner::OpenType, std::string const&) () from /usr/lib/arm-linux-gnueabihf/libmediascanner-2.0.so.3
No symbol table info available.
#8 0xae533f00 in mediascanner::MediaStore::MediaStore(mediascanner::OpenType, std::string const&) () from /usr/lib/arm-linux-gnueabihf/libmediascanner-2.0.so.3
No symbol table info available.
#9 0xae57e514 in mediascanner::qml::MediaStoreWrapper::MediaStoreWrapper(QObject*) () from /usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/MediaScanner.0.1/libmediascanner-qml.so
No symbol table info available.
#10 0xae57b31c in void QQmlPrivate::createInto<mediascanner::qml::MediaStoreWrapper>(void*) () from /usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/MediaScanner.0.1/libmediascanner-qml.so
No symbol table info available.
#11 0xb6c7805c in QQmlType::create() const () from /usr/lib/arm-linux-gnueabihf/libQt5Qml.so.5
No symbol table info available.
#12 0xb6cb6430 in ?? () from /usr/lib/arm-linux-gnueabihf/libQt5Qml.so.5
No symbol table info available.
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
---

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in qtdeclarative-opensource-src (Ubuntu):
status: New → Confirmed
affects: qtdeclarative-opensource-src (Ubuntu) → mediascanner (Ubuntu)
Changed in mediascanner (Ubuntu):
status: Confirmed → New
Changed in mediascanner:
status: New → Confirmed
Changed in mediascanner (Ubuntu):
status: New → Confirmed
Revision history for this message
Jussi Pakkanen (jpakkane) wrote :

This text:

what(): Tried to open a db with an unsupported schema version.

means that an old version of Mediascanner's database is being used. This can be caused, among other things, by the following:

- not properly wiping ~/.cache/mediascanner-2.0 between tests
- installing a new version of MS and not restarting the apps so they keep using code in the old .so file
- Mediascanner has not been started yet (so the db file does not exist)

Most Mediascanner updates do not trigger this issue because changing the schema is a very rare occurrance.

Revision history for this message
Omer Akram (om26er) wrote :

So I looked at the logs. mediascanner-service-2.0 is running before and after with the same PID, so it never crashed. I suspect the your first point might be the case, so we need to handle clearing the db better.

Revision history for this message
Andrew Hayzen (ahayzen) wrote :

We patch the mediascanner db and there was a schema change in #222 [0], we had a fix but just missed getting it into the store for #222 but it should have been fixed in the next image when CI was run.

Which looks like the case from [1], however there is one failure in that run (we are currently refactoring autopilot so these issues will hopefully be resolved soon).

0 - http://people.canonical.com/~ogra/touch-image-stats/222.changes
1 - http://ci.ubuntu.com/smokeng/utopic/touch/mako/234:20140909:20140903.1/10313/music_app/

Revision history for this message
Andrew Hayzen (ahayzen) wrote :

Marking as invalid as we believe this was fixed.

Changed in music-app:
status: New → Invalid
Revision history for this message
Jussi Pakkanen (jpakkane) wrote :

To be absolutely sure that Mediascanner is properly initialised, do the equivalent to the following commands:

stop mediascanner-service-2.0
rm -rf ~/.cache/mediascanner-2.0
start mediascanner-service-2.0
<wait until Mediascanner has finished scanning directories>

If you want to be exact about the wait you can listen to the dbus signal Mediascanner sends when it is ready (or, to be more precise, when a change in the list of media files happens). The specifics are on this page:

https://bazaar.launchpad.net/~mediascanner-team/mediascanner2/trunk/view/head:/src/daemon/InvalidationSender.cc

Revision history for this message
Victor Thompson (vthompson) wrote :

Just to elaborate upon what Andrew said so there is no confusion about the cause of this failure. This bug is due to the Autopilot tests of the Music app crashing/not working. The music app has saved mediascanner2 "mediastore.db" SQLite db. The tests then mock the device's home directory and uses this db to seed mediascanner2. When mediascanner2 releases a schema update the Autopilot tests break and this SQLite db needs to be stepped up to the current schema.

Changed in music-app:
status: Invalid → Fix Released
assignee: nobody → Victor Thompson (vthompson)
affects: mediascanner → mediascanner2
affects: mediascanner (Ubuntu) → mediascanner2 (Ubuntu)
no longer affects: mediascanner2
Revision history for this message
James Henstridge (jamesh) wrote :

Marking invalid, since the test environment was not using a database created by an old version of mediascanner, and was not running the mediascanner service to upgrade it.

Changed in mediascanner2 (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.