[testfail] StaleFrames.are_dropped_when_restarting_compositor in CI

Bug #1390388 reported by Alan Griffiths
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
Chris Halse Rogers
mir (Ubuntu)
Fix Released

Bug Description


[ RUN ] StaleFrames.are_dropped_when_restarting_compositor
/tmp/buildd/mir-0.8.0+14.10.20141010bzr2039pkg0vivid4+autopilot0/tests/integration-tests/test_stale_frames.cpp:203: Failure
Expected: (stale_buffer_id1) != (stale_buffer_id2), actual: 3 vs 3
/tmp/buildd/mir-0.8.0+14.10.20141010bzr2039pkg0vivid4+autopilot0/tests/integration-tests/test_stale_frames.cpp:204: Failure
Expected: (stale_buffer_id2) != (buffer_id3), actual: 3 vs 3
/tmp/buildd/mir-0.8.0+14.10.20141010bzr2039pkg0vivid4+autopilot0/tests/integration-tests/test_stale_frames.cpp:209: Failure
Value of: new_buffers[0]
Actual: 40
Expected: buffer_id3
Which is: 3
[ FAILED ] StaleFrames.are_dropped_when_restarting_compositor (221 ms)

Tags: testsfail

Related branches

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :
Changed in mir:
importance: Undecided → Critical
status: New → Confirmed
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

So, on vivid-touch every buffer ID is 3:

    Expected: (stale_buffer_id1) != (stale_buffer_id2), actual: 3 vs 3
    Expected: (stale_buffer_id2) != (buffer_id3), actual: 3 vs 3

I can't reproduce locally (on desktop utopic nor phone).

Changed in mir:
assignee: nobody → Alan Griffiths (alan-griffiths)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

OK, finally got a phone into a state where I could run -r 2043 of lp:~alan-griffiths/mir/fix-1390388. Here's the result:

Running main() from command_line_server_configuration.cpp
Note: Google Test filter = StaleFrame*
[==========] Running 2 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 2 tests from StaleFrames
[ RUN ] StaleFrames.are_dropped_when_restarting_compositor
DEBUG (BufferBasic() ctor): buffer id:0
DEBUG (BufferBasic() ctor): buffer id:1
DEBUG (deposit_package): buffer id:0
DEBUG (194): buffer id:3
DEBUG (BufferBasic() ctor): buffer id:2
DEBUG (deposit_package): buffer id:2
DEBUG (198): buffer id:3
DEBUG (deposit_package): buffer id:1
/tmp/buildd/mir-0.8.0+14.10.20141010bzr2043pkg0vivid16+autopilot0/tests/integration-tests/test_stale_frames.cpp:202: Failure
Value of: stale_buffers.size()
Expected: is equal to 2
  Actual: 1 (of type unsigned int)
DEBUG (204): buffer id:3
DEBUG (deposit_package): buffer id:0
[ FAILED ] StaleFrames.are_dropped_when_restarting_compositor (270 ms)
[ RUN ] StaleFrames.only_fresh_frames_are_used_after_restarting_compositor
DEBUG (BufferBasic() ctor): buffer id:3
DEBUG (BufferBasic() ctor): buffer id:4
DEBUG (deposit_package): buffer id:3
DEBUG (224): buffer id:3
DEBUG (BufferBasic() ctor): buffer id:5
DEBUG (deposit_package): buffer id:5
DEBUG (226): buffer id:3
DEBUG (deposit_package): buffer id:4
DEBUG (229): buffer id:3
DEBUG (deposit_package): buffer id:3
/tmp/buildd/mir-0.8.0+14.10.20141010bzr2043pkg0vivid16+autopilot0/tests/integration-tests/test_stale_frames.cpp:237: Failure
Value of: new_buffers[0]
Expected: is equal to 3
  Actual: 4
[ FAILED ] StaleFrames.only_fresh_frames_are_used_after_restarting_compositor (234 ms)
[----------] 2 tests from StaleFrames (506 ms total)

[----------] Global test environment tear-down
[==========] 2 tests from 1 test case ran. (508 ms total)
[ PASSED ] 0 tests.
[ FAILED ] 2 tests, listed below:
[ FAILED ] StaleFrames.are_dropped_when_restarting_compositor
[ FAILED ] StaleFrames.only_fresh_frames_are_used_after_restarting_compositor


Clearly the buffers are getting sane IDs but result of mir_debug_surface_current_buffer_id() is wrong and that's what causes the test to fail.

Dunno why though.

Steps to reproduce (not necessarily optimal):

ubuntu-device-flash --channel=ubuntu-touch/vivid-proposed
phablet-config writable-image --remotepassword ****
 wget http://s-jenkins.ubuntu-ci:8080//view/mediumtests/job/mir-mediumtests-builder-vivid-armhf/16/artifact/*zip*/archive.zip
adb shell mkdir /home/phablet/mirtest
adb push archive.zip /home/phablet/mirtest
adb shell

(now on device)

sudo apt-get install unzip
cd /mirtest
unzip archive.zip
cd archive/work//output/
dpkg -i *
sudo apt-get install -f
dpkg -i *
mir_integration_tests --gtest_filter=StaleFrame*

Changed in mir:
assignee: Alan Griffiths (alan-griffiths) → nobody
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

OK investigated this a bit and found that android gralloc is failing to register the buffers received from the server on the client side in this test.

It seems also we are propagating exceptions across a loaded shared library and also through c code, so mcl::ClientBufferDepository::deposit_package never manages to put anything in its buffer list after the exception is thrown during actory->create_buffer(package, size, pf);

In addition, mcl::ClientBufferDepository::current_buffer_id() does not check if the list is empty so the id returned is garbage.

mir_demo_server_shell + mir_demo_client_egltriangle works ok so I suspect the test setup.

Revision history for this message
Alberto Aguirre (albaguirre) wrote :

Oooooh....platforms are mismatched in the client and server. The server is using the StubGraphicPlatform and the client is using hte Android client platform.

Revision history for this message
Alberto Aguirre (albaguirre) wrote :

So the root cause is UsingStubClientPlatform is broken as it fails to provide a stub client platform.

StubMirConnectionAPI::connect just calls DefaultMirConnectionAPI::connect (prev_api pointer) which will use an instance of DefaultConnectionConfiguration.

It's not currently possible to insert a StubConnectionConfiguration.

Revision history for this message
Alberto Aguirre (albaguirre) wrote :
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

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

Changed in mir:
status: Confirmed → Fix Committed
Changed in mir:
milestone: none → 0.9.0
importance: Critical → High
assignee: nobody → Chris Halse Rogers (raof)
Changed in mir (Ubuntu):
importance: Undecided → High
status: New → Triaged
Revision history for this message
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
      . 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
    - 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
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers