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

Bug #1329141 reported by Leo Arias on 2014-06-12
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
Christian Dywan
unity-mir
Undecided
Unassigned
qtmir (Ubuntu)
Undecided
Unassigned
qtubuntu (Ubuntu)
Undecided
Unassigned
unity8 (Ubuntu)
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

Michał Sawicz (saviq) on 2014-06-16
no longer affects: unity8
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
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
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

Timo Jyrinki (timo-jyrinki) wrote :

Retraced at bug #1340571 - leans towards qtubuntu.

affects: qtdeclarative-opensource-src (Ubuntu) → qtubuntu (Ubuntu)
Leo Arias (elopio) wrote :

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

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?

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) on 2014-07-18
Changed in ubuntu-ui-toolkit:
importance: Undecided → Critical
tags: added: lt-category-noimpact lt-date-20140717 lt-prio-high
tags: added: lt-blocker
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.

Leo Arias (elopio) wrote :
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.

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.

Christian 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/

Michał Sawicz (saviq) wrote :

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

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.
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.

Michał Sawicz (saviq) wrote :
Michał Sawicz (saviq) wrote :

To reproduce with the two attached files:

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

Changed in ubuntu-ui-toolkit:
assignee: nobody → Christian Dywan (kalikiana)
Leo Arias (elopio) wrote :

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

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) on 2014-09-09
no longer affects: unity8
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) on 2014-09-30
Changed in ubuntu-ui-toolkit:
status: New → Fix Released
Zsombor Egri (zsombi) on 2014-09-30
Changed in ubuntu-ui-toolkit:
status: Fix Released → Fix Committed
Zoltan Balogh (bzoltan) on 2014-10-01
Changed in ubuntu-ui-toolkit:
status: Fix Committed → Fix Released
Changed in unity8 (Ubuntu):
status: New → Invalid
Gerry Boland (gerboland) on 2015-04-29
Changed in unity-mir:
status: New → Won't Fix
Launchpad Janitor (janitor) wrote :

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

Michał Sawicz (saviq) on 2017-03-13
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  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers