https://jenkins.qa.ubuntu.com/job/mir-vivid-amd64-autolanding/281/consoleFull...
4: [ RUN ] SurfaceSwapBuffers.does_not_block_when_surface_is_not_composited
4: [1423046327.627221] Loader: Loading modules from: /tmp/buildd/mir-0.11.0bzr2293pkg0vivid281/obj-x86_64-linux-gnu/bin/../lib/client-modules/
4: [1423046327.665939] Loader: Loading module: /tmp/buildd/mir-0.11.0bzr2293pkg0vivid281/obj-x86_64-linux-gnu/bin/../lib/client-modules/mesa.so
4: [1423046327.666288] Loader: Loading module: /tmp/buildd/mir-0.11.0bzr2293pkg0vivid281/obj-x86_64-linux-gnu/bin/../lib/client-modules/android.so
4: [1423046327.666614] Loader: Loading module: /tmp/buildd/mir-0.11.0bzr2293pkg0vivid281/obj-x86_64-linux-gnu/bin/../lib/client-modules/dummy.so
4: /tmp/buildd/mir-0.11.0bzr2293pkg0vivid281/tests/acceptance-tests/test_client_surface_swap_buffers.cpp:67: Failure
4: Value of: buffers_swapped.wait_for(std::chrono::seconds{5})
4: Actual: false
4: Expected: true
4: ==26557== Thread 9:
4: ==26557== Conditional jump or move depends on uninitialised value(s)
4: ==26557== at 0x5C8C88F: __lll_lock_elision (elision-lock.c:94)
4: ==26557== by 0x7282F7: __gthread_mutex_lock (gthr-default.h:748)
4: ==26557== by 0x7282F7: lock (mutex:135)
4: ==26557== by 0x7282F7: lock (mutex:474)
4: ==26557== by 0x7282F7: unique_lock (mutex:406)
4: ==26557== by 0x7282F7: mir::test::Signal::raise() (signal.cpp:30)
4: ==26557== by 0x5281DAC: operator() (functional:2439)
4: ==26557== by 0x5281DAC: mir::client::BufferStream::next_buffer_received(std::function<void ()>) (buffer_stream.cpp:240)
4: ==26557== by 0x52839FE: google::protobuf::internal::MethodClosure1<mir::client::BufferStream, std::function<void ()> >::Run() (common.h:942)
4: ==26557== by 0x5297B4C: mir::client::rpc::MirProtobufRpcChannel::receive_file_descriptors(google::protobuf::Message*, google::protobuf::Closure*) (mir_protobuf_rpc_channel.cpp:161)
4: ==26557== by 0x52991FE: google::protobuf::internal::MethodClosure2<mir::client::rpc::MirProtobufRpcChannel, google::protobuf::Message*, google::protobuf::Closure*>::Run() (common.h:990)
4: ==26557== by 0x5296AAF: mir::client::rpc::detail::PendingCallCache::complete_response(mir::protobuf::wire::Result&) (mir_basic_rpc_channel.cpp:70)
4: ==26557== by 0x5299008: mir::client::rpc::MirProtobufRpcChannel::on_data_available() (mir_protobuf_rpc_channel.cpp:342)
4: ==26557== by 0x52900C0: mir::client::rpc::StreamSocketTransport::notify_data_available() (stream_socket_transport.cpp:235)
4: ==26557== by 0x52904E2: mir::client::rpc::StreamSocketTransport::dispatch(unsigned int) (stream_socket_transport.cpp:194)
4: ==26557== by 0x6539D25: wait_for_events_forever (simple_dispatch_thread.cpp:108)
4: ==26557== by 0x6539D25: operator() (simple_dispatch_thread.cpp:147)
4: ==26557== by 0x6539D25: _M_invoke<> (functional:1700)
4: ==26557== by 0x6539D25: operator() (functional:1688)
4: ==26557== by 0x6539D25: std::thread::_Impl<std::_Bind_simple<mir::dispatch::SimpleDispatchThread::SimpleDispatchThread(std::shared_ptr<mir::dispatch::Dispatchable> const&)::{lambda()#1} ()> >::_M_run() (thread:115)
4: ==26557== by 0x6A31E2F: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20)
4: ==26557==
4: ==26557== Conditional jump or move depends on uninitialised value(s)
4: ==26557== at 0x5C879AE: pthread_cond_broadcast@@GLIBC_2.3.2 (pthread_cond_broadcast.S:52)
4: ==26557== by 0x59AC684: google::protobuf::MessageLite::ParseFromString(std::string const&) (in /usr/lib/x86_64-linux-gnu/libprotobuf.so.9.0.1)
4: ==26557== by 0x5296AAF: mir::client::rpc::detail::PendingCallCache::complete_response(mir::protobuf::wire::Result&) (mir_basic_rpc_channel.cpp:70)
4: ==26557== by 0x5299008: mir::client::rpc::MirProtobufRpcChannel::on_data_available() (mir_protobuf_rpc_channel.cpp:342)
4: ==26557== by 0x52900C0: mir::client::rpc::StreamSocketTransport::notify_data_available() (stream_socket_transport.cpp:235)
4: ==26557== by 0x52904E2: mir::client::rpc::StreamSocketTransport::dispatch(unsigned int) (stream_socket_transport.cpp:194)
4: ==26557== by 0x6539D25: wait_for_events_forever (simple_dispatch_thread.cpp:108)
4: ==26557== by 0x6539D25: operator() (simple_dispatch_thread.cpp:147)
4: ==26557== by 0x6539D25: _M_invoke<> (functional:1700)
4: ==26557== by 0x6539D25: operator() (functional:1688)
4: ==26557== by 0x6539D25: std::thread::_Impl<std::_Bind_simple<mir::dispatch::SimpleDispatchThread::SimpleDispatchThread(std::shared_ptr<mir::dispatch::Dispatchable> const&)::{lambda()#1} ()> >::_M_run() (thread:115)
4: ==26557== by 0x6A31E2F: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20)
4: ==26557== by 0x5C830A4: start_thread (pthread_create.c:309)
4: ==26557== by 0x6F9690C: clone (clone.S:111)
4: ==26557==
4: [ FAILED ] SurfaceSwapBuffers.does_not_block_when_surface_is_not_composited (5461 ms)
4: [----------] 1 test from SurfaceSwapBuffers (5466 ms total)
(Set importance to High since this is a potential CI/autolanding blocker)
Valgrind is known to be pathologically slow in certain busy loop scenarios. It seems that a recent code change in the compositor (probably lp:~vanvugt/mir/fix-buffers_ready_for_compositor) triggered such a scenario.
The increased runtime causes SurfaceSwapBuffers to fail "buffers_ swapped. wait_for( std::chrono: :seconds{ 5})" and end the test prematurely. The memory errors are just a side-effect. They are a result of the swap buffers callback trying to access the stack allocated 'buffers_swapped' variable after it has gone out of scope due to the test returning because of the failure.