Two underscores in .desktop file name causes assumption that this is an appId and app is rejected.

Bug #1329141 reported by Leo Arias
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Ubuntu Application Launcher
Fix Released
Critical
Unassigned
Ubuntu UI Toolkit
Fix Released
Critical
Cris Dywan
unity-mir
Won't Fix
Undecided
Unassigned
qtmir (Ubuntu)
Confirmed
Undecided
Unassigned
qtubuntu (Ubuntu)
Invalid
Undecided
Unassigned
unity8 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

On the daily image testing for mako, image#78, one of the lifecycle management tests in unity failed because of a qmlscene crash (see attachment).

21:15:34.162 INFO _launcher:116 - Attempting to launch application 'tmp991xm1vf' with URIs '' via upstart-app-launch
21:15:36.367 INFO _launcher:116 - Attempting to launch application 'tmpbeb_op_3' with URIs '' via upstart-app-launch
21:16:08.689 ERROR _launcher:202 - Timed out waiting for Application with app_id 'tmpbeb_op_3' to stop.

http://ci.ubuntu.com/smokeng/utopic/touch/mako/78:20140611.1:20140530/8530/unity8/1241528/

Related branches

Revision history for this message
Leo Arias (elopio) wrote :
Michał Sawicz (saviq)
no longer affects: unity8
Revision history for this message
Ted Gould (ted) wrote :

Doesn't look like something UAL would be effecting. Seems to be a crash in the QML Scene binary itself.

Changed in ubuntu-app-launch:
status: New → Invalid
Revision history for this message
Leo Arias (elopio) wrote :

Marking as incomplete because the crash file lacks information. Andy is hacking the phablet-test-run script to run whoopsie-collect-all after the tests.

Changed in qtdeclarative-opensource-src (Ubuntu):
status: New → Incomplete
Revision history for this message
Leo Arias (elopio) wrote :

This has happened again on image #124.

http://ci.ubuntu.com/smokeng/utopic/touch/mako/124:20140710.1:20140709/8982/unity8/1354177/

Attached is the crash.
The application log only says:
QUbuntu: Could not create application instance

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

Retraced at bug #1340571 - leans towards qtubuntu.

affects: qtdeclarative-opensource-src (Ubuntu) → qtubuntu (Ubuntu)
Revision history for this message
Leo Arias (elopio) wrote :

Thanks Timo. I'm seeing qmlscene crashes more often this week, so it would be nice if somebody can investigate.

Revision history for this message
Tim Peeters (tpeeters) wrote :

We get a lot of failures in autolanding lately, with errors like:

  File "/usr/lib/python2.7/dist-packages/psutil/__init__.py", line 331, in _init
    raise NoSuchProcess(pid, None, msg)
NoSuchProcess: no process found with pid 4908

See https://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/2289/testReport/junit/ubuntuuitoolkit.tests.custom_proxy_objects.test_textfield/TextFieldTestCase/test_select_all_selects_all_text/

Is it caused by this bug?

Revision history for this message
Tim Peeters (tpeeters) wrote :

We have almost all of our MRs failing on autolanding with NoSuchProcess errors so I confirmed the bug and changed the importance to Critical. If someone more knowledgable about this issue thinks it is another bug, please let me know (timp/t1mp on irc).

Changed in ubuntu-app-launch:
importance: Undecided → Critical
Changed in qtubuntu (Ubuntu):
status: Incomplete → Confirmed
Changed in ubuntu-app-launch:
status: Invalid → Confirmed
Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit:
importance: Undecided → Critical
tags: added: lt-category-noimpact lt-date-20140717 lt-prio-high
tags: added: lt-blocker
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

The crash as retraced in https://bugs.launchpad.net/ubuntu/+bug/1340571 , is caused by qtubuntu not being able to connect to the mir server/shell. It doesn't necessarily indicate there is a problem in qtubuntu (of course it doesn't preclude it either). For example you would get the same "crash" if the server had died.

Revision history for this message
Leo Arias (elopio) wrote :
Revision history for this message
Leo Arias (elopio) wrote :

To reproduce the crash on mako:

$ phablet-shell
$ sudo mount -o remount,rw /
$ sudo apt-get install ubuntu-ui-toolkit-autopilot
$ wget https://bugs.launchpad.net/ubuntu-app-launch/+bug/1329141/+attachment/4155946/+files/test.py
$ while autopilot3 run test; do :; done

I've just run it on a freshly flashed mako with devel-proposed, and it failed in 3 minutes.

Revision history for this message
Gerry Boland (gerboland) wrote :

The output of unity8.log would help, as it would show if unity8 rejected the client connection (and thus causing client to crash) or not. That's usually the reason for this error.

Revision history for this message
Cris Dywan (kalikiana) wrote :

This one crashed like that, but I can't seem to get the logs out of it https://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/2304/

Revision history for this message
Michał Sawicz (saviq) wrote :

After running the test for 15 mins or so I got the log, attached.

Revision history for this message
Michał Sawicz (saviq) wrote :

OK I think I found what happens here:

WARNING: long App ID encountered: tmpu_5uhy_8

** (process:2551): WARNING **: Unable to get manifest for 'tmpu' package: tmpu does not exist in any database for user phablet

** (process:2551): CRITICAL **: manifest_version: assertion '*manifest != NULL' failed

** (process:2551): CRITICAL **: ubuntu_app_launch_triplet_to_app_id: assertion 'version != NULL' failed
ApplicationManager REJECTED connection from app with pid 13154 as desktop_file_hint file not found

The random tmp application name sometimes includes underscores, and at some point it randomizes to two underscores, at which point it's assumed that this is an app id and things go haywire.

Simple solution: stop the tmp app name from having underscores.

Needs investigation: can we be more robust in unity-mir/unity8 here?

Changed in qtubuntu (Ubuntu):
status: Confirmed → Invalid
summary: - qmlscene crashed while running test_can_launch_multiple_applications
+ Two underscores in .desktop file name causes assumption that this is an
+ appId and app is rejected.
Revision history for this message
Michał Sawicz (saviq) wrote :

The temp file is created in:
http://bazaar.launchpad.net/~ubuntu-sdk-team/ubuntu-ui-toolkit/trunk/view/head:/tests/autopilot/ubuntuuitoolkit/fixture_setup.py#L84

Unfortunately NamedTemporaryFile does not let you to tell it not to use underscores... We should be able to rename it after creation, though. It's not a great solution unfortunately.

We still need to verify what caused this to start happening.

Revision history for this message
Michał Sawicz (saviq) wrote :
Revision history for this message
Michał Sawicz (saviq) wrote :

To reproduce with the two attached files:

$ qmlscene foo_bar_baz.qml --desktop_file_hint=$PWD/foo_bar_baz.desktop

Cris Dywan (kalikiana)
Changed in ubuntu-ui-toolkit:
assignee: nobody → Christian Dywan (kalikiana)
Revision history for this message
Leo Arias (elopio) wrote :

Wow, intersting. Thanks for the investigation saviq.
Christian's branch is looking good as a workaround.

Revision history for this message
Alejandro J. Cura (alecu) wrote :

A simpler solution might be to remove _ from the list of chars that tempfile uses to create filenames, with something like:
tempfile._RandomNameSequence.characters = tempfile._RandomNameSequence.characters.strip("_")

It seems to work ok: http://pastebin.ubuntu.com/7831443/

Michał Sawicz (saviq)
no longer affects: unity8
Revision history for this message
Ted Gould (ted) wrote :

We're using whether the click hook created a link for us to determine whether it's a click package today, so I think this is fixed.

Changed in ubuntu-app-launch:
status: Confirmed → Fix Released
Zoltan Balogh (bzoltan)
Changed in ubuntu-ui-toolkit:
status: New → Fix Released
Zsombor Egri (zsombi)
Changed in ubuntu-ui-toolkit:
status: Fix Released → Fix Committed
Zoltan Balogh (bzoltan)
Changed in ubuntu-ui-toolkit:
status: Fix Committed → Fix Released
Changed in unity8 (Ubuntu):
status: New → Invalid
Gerry Boland (gerboland)
Changed in unity-mir:
status: New → Won't Fix
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Michał Sawicz (saviq)
affects: qtmir → qtmir (Ubuntu)
Changed in qtmir (Ubuntu):
status: New → Confirmed
Changed in qtmir (Ubuntu):
status: New → Confirmed
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.