Mir

a prompt session with an invalid application pid should be an error

Bug #1377968 reported by Alan Griffiths on 2014-10-06
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Critical
Unassigned
Mir
Fix Released
Medium
Alan Griffiths
0.8
Fix Released
Medium
Alan Griffiths
mir (Ubuntu)
Medium
Unassigned
mir (Ubuntu RTM)
Medium
Michał Sawicz

Bug Description

Calling mir_connection_create_prompt_session_sync() with an "application pid" that doesn't correspond to an existing session leads to a "valid" prompt session being created without the (non-existent) application session being added to the prompt session.

An error should be reported by the server so that the result of mir_prompt_session_is_valid() will be false.

Related branches

Changed in mir:
status: New → Confirmed
Changed in mir:
assignee: nobody → Alan Griffiths (alan-griffiths)
status: Confirmed → In Progress
Changed in mir:
milestone: none → 0.9.0
Changed in mir:
importance: Undecided → Medium
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:mir at revision None, scheduled for release in mir, milestone 0.8.0

Changed in mir:
status: In Progress → Fix Committed
Changed in mir (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Alberto Mardegan (mardy) wrote :

This bug is the reason why in Vivid when a scope tries to authenticate to an online accounts, nothing happens: the OA trusted helper sees that the trusted session has succeeded (even if the initiator PID is the one from the scope, which has no UI), and decides to show its UI inside the trusted session.
But the trusted session is effectively non working, so nothing is shown on screen. The worse thing is that the OA process is not even aware of the failure (it thinks that its UI is visible and is waiting the user's input), so it's kind of hanging on that session to finish.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mir - 0.9.0+15.04.20141125-0ubuntu1

---------------
mir (0.9.0+15.04.20141125-0ubuntu1) vivid; urgency=medium

  [ Alberto Aguirre ]
  * New upstream release 0.9.0 (https://launchpad.net/mir/+milestone/0.9.0)
    - Enhancements:
      . New simpler API to configure and run a mir server.
      . The event loop is now based on GLib's main loop library instead of
        Boost.Asio.
      . For Android platforms, the server now sends buffer fence fds to its
        clients instead of potentially stalling the compositor thread waiting
        for them to be signalled.
      . New client debug interface to translate from surface to screen
        coordinates.
    - ABI summary: Servers need rebuilding, but clients do not;
      . Mirclient ABI unchanged at 8
      . Mircommon ABI bumped to 3
      . Mirplatform ABI bumped to 4
      . Mirserver ABI bumped to 27
    - Bug fixes:
      . Add a debug interface to translate from surface to screen coordinates
        (LP: #1346633)
      . Ensure a buffer requested by a surface is not delivered
        after the surface is deleted (LP: #1376324)
      . Overlays are not displayed onscreen in some positions (LP: #1378326)
      . Server aborts when an exception is thrown from the main thread
        (LP: #1378740)
      . Fix race causing lost alarm notifications (LP: #1381925)
      . Avoid lifecycle notifications racing with connection release
        (LP: #1386646)
      . Improve error checking and reporting for the client library
       (LP: #1390388)
      . Mir demo-shell now detects power button using proper Linux scan codes
       (LP: #1303817)
      . A prompt session with an invalid application pid should be an error
        (LP: #1377968)
      . When XDG_RUNTIME_DIR is defined but pointing to a non-existing
        directory use "/tmp" (LP: #1304873)
      . [regression] demo-shell bypass is not used on fullscreen surfaces if
        there are windowed surfaces behind (LP: #1378706)
      . Mir upgrade through dist-upgrade installs incorrect platform
        (LP: #1378995)
      . Fix Mir progressbar example using internal glibc defines(LP: #239272)
      . Stop the default_lifecycle_event_handler raising SIGHUP while
        disconnecting (LP: #1386185)
      . [regression] Mir fails to build with MIR_ENABLE_TESTS=OFF (LP: #1388539)
      . [regression] mir_demo_server_basic does not start (LP: #1391923)

  [ Ubuntu daily release ]
  * New rebuild forced
 -- Ubuntu daily release <email address hidden> Tue, 25 Nov 2014 17:49:24 +0000

Changed in mir (Ubuntu):
status: Triaged → Fix Released
Changed in mir:
status: Fix Committed → Fix Released
Alan Griffiths (alan-griffiths) wrote :

<dbarth> alan_g: the next update is tracked here: https://launchpad.net/canonical-devices-system-image/+milestone/ww51-2014
<dbarth> alan_g: that's also the project name to connect the bug to
<dbarth> the product team will triage it and set the importance to approve or defer the fix

Changed in mir (Ubuntu RTM):
importance: Undecided → Medium
status: New → Triaged
Bill Filler (bfiller) wrote :
Changed in canonical-devices-system-image:
importance: Undecided → Critical
milestone: none → ww03-2015
kevin gunn (kgunn72) wrote :

We're gonna push this fix to RTM, our target is by Tues/Jan13

Michał Sawicz (saviq) on 2015-01-12
Changed in mir (Ubuntu RTM):
status: Triaged → In Progress
assignee: nobody → Michał Sawicz (saviq)
Michał Sawicz (saviq) on 2015-01-13
Changed in canonical-devices-system-image:
status: New → In Progress
Launchpad Janitor (janitor) wrote :
Download full text (11.9 KiB)

This bug was fixed in the package mir - 0.8.1+15.04.20150112.2~rtm-0ubuntu1

---------------
mir (0.8.1+15.04.20150112.2~rtm-0ubuntu1) 14.09; urgency=medium

  [ Daniel van Vugt ]
  * Bug fix release 0.8.1 (https://launchpad.net/mir/+milestone/0.8.1)
    - ABI summary: Servers need rebuilding, but clients do not;
      . Mirclient ABI unchanged at 8
      . Mircommon ABI unchanged at 2
      . Mirplatform ABI unchanged to 3
      . Mirserver ABI bumped to 26.1 (due to breakage in LP: #1355173)
    - Fixes bugs:
      . Switching windows with a Trusted Prompt Session active loses the
        trusted prompt session (LP: #1355173)
      . a prompt session with an invalid application pid should be an error
        (LP: #1377968)
  * mir_demo_client_basic: Don't assert on user errors like failing to
    connect to a Mir server. It's much more useful to tell the user what
    they did wrong than to automatically generate error reports and
    duplicate apport bugs. (LP: #1331958) . (LP: #1331958)
  * Enable "Project Butter" motion event resampling and prediction for a
    more responsive touch experience. .
  * When the server disconnects unexpectedly, give the client SIGHUP
    instead of the present SIGTERM. The former is more appropriate
    because it indicates: "Hangup detected on controlling terminal or
    death of controlling process" [signal(7)] whereas SIGTERM is
    reserved for more polite user-requested shutdowns. .
  * Fix the common/shared source tree layout inconsistency. If it goes
    in libmircommon then it should be called "common" and not "shared":
  * Move mir::time::*Clock out of libmirserver and into libmircommon. It
    will soon be used by libmirclient.
  * Bump version to 0.8.0 as Mir 0.7.0 was released today.
  * Remove dead code "kill_client_processes()" from mir_test_framework.
  * Work around spurious SIGKILL delivered to clients by Valgrind during
    tests. This is why CI is failing randomly (LP: #1364772) Actually
    this workaround is nothing new. A quick grep shows we already use
    the same hack in 13 other locations under tests/. . (LP: #1364772)
  * Privatise (don't install) headers that are unused by clients, QtMir
    or USC. This reduces the size of the public include/ tree from 377
    to 121 files, and reduces the number of those that get installed
    from 208 to 121.
  * Bump the mircommon ABI to 2. We actually broke it in the Mir 0.7.0
    release with symbols.map and didn't notice in time (LP: #1364890)
    (LP: #1364890)
  * Restore support for gcc-4.8/trusty (LP: #1366134) (LP: #1366134)
  * Publish an internal header that QtMir recently started using:
    mir/input/input_channel.h (LP: #1365934) . (LP: #1365934)
  * Relax dependencies on libmirplatform2. Any binary package that uses
    libmirplatform2 should already be ABI compatible with any version of
    libmirplatform2. Assuming we maintain our ABIs correctly...
    Minimising exact version requirements should minimise future package
    upgrade problems. .
  * Privatise more headers -- these are the ones unused by any external
    projects but are used internally by the server code in examples/
    only.
  * Introducing a generic client per...

Changed in mir (Ubuntu RTM):
status: In Progress → Fix Released
Michał Sawicz (saviq) on 2015-01-14
Changed in canonical-devices-system-image:
status: In Progress → Fix Released
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