Mir client crash occurred during executing 01_hello_SDL (SDL_VIDEODRIVER=mir ./01_hello_SDL) program (program source is available here: http://lazyfoo.net/tutorials/SDL/01_hello_SDL/01_hello_SDL.zip ).
Stack trace:
#0 0x00007ffff00050c0 in ?? ()
#1 0x00007ffff59e796f in google::protobuf::MessageLite::ParseFromString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /usr/lib/x86_64-linux-gnu/libprotobuf-lite.so.9
#2 0x00007ffff6affb88 in mir::client::rpc::MirProtobufRpcChannel::<lambda(google::protobuf::MessageLite*)>::operator()(google::protobuf::MessageLite *) const (__closure=0x7ffff4bc9a20, result_message=0x7ffff0004f80)
at /media/kinga/Dane/mir/mir_nowy/src/client/rpc/mir_protobuf_rpc_channel.cpp:506
#3 0x00007ffff6b00897 in std::_Function_handler<void(google::protobuf::MessageLite*), mir::client::rpc::MirProtobufRpcChannel::on_data_available()::<lambda(google::protobuf::MessageLite*)> >::_M_invoke(const std::_Any_data &, <unknown type in /usr/local/lib/libmirclient.so.9, CU 0x5376df, DIE 0x58367b>) (__functor=...,
__args#0=<unknown type in /usr/local/lib/libmirclient.so.9, CU 0x5376df, DIE 0x58367b>)
at /usr/include/c++/5/functional:1871
#4 0x00007ffff6afbab5 in std::function<void (google::protobuf::MessageLite*)>::operator()(google::protobuf::MessageLite*) const (this=0x7ffff4bc9a20, __args#0=0x7ffff0004f80) at /usr/include/c++/5/functional:2267
#5 0x00007ffff6afad99 in mir::client::rpc::detail::PendingCallCache::populate_message_for_result(mir::protobuf::wire::Result&, std::function<void (google::protobuf::MessageLite*)> const&) (this=0x61e990, result=...,
populator=...) at /media/kinga/Dane/mir/mir_nowy/src/client/rpc/mir_basic_rpc_channel.cpp:74
#6 0x00007ffff6affed5 in mir::client::rpc::MirProtobufRpcChannel::on_data_available (this=0x61e960)
at /media/kinga/Dane/mir/mir_nowy/src/client/rpc/mir_protobuf_rpc_channel.cpp:508
#7 0x00007ffff6b09c95 in mir::client::rpc::TransportObservers::<lambda(auto:1)>::operator()<std::shared_ptr<mir::client::rpc::StreamTransport::Observer> >(std::shared_ptr<mir::client::rpc::StreamTransport::Observer>) const (
__closure=0x7ffff4bc9bd0, observer=warning: RTTI symbol not found for class 'std::_Sp_counted_deleter<mir::client::rpc::MirProtobufRpcChannel*, mir::client::rpc::MirProtobufRpcChannel::MirProtobufRpcChannel(std::unique_ptr<mir::client::rpc::StreamTransport, std::default_delete<mir::client::rpc::StreamTransport> >, std::shared_ptr<mir::client::SurfaceMap> const&, std::shared_ptr<mir::client::AsyncBufferFactory> const&, std::shared_ptr<mir::client::DisplayConfiguration> const&, std::shared_ptr<mir::input::InputDevices> const&, std::shared_ptr<mir::client::rpc::RpcReport> const&, std::shared_ptr<mir::client::AtomicCallback<MirLifecycleState> > const&, std::shared_ptr<mir::client::AtomicCallback<int> > const&, std::shared_ptr<mir::client::AtomicCallback<MirError const*> > const&, std::shared_ptr<mir::client::EventSink> const&)::NullDeleter, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>'
warning: RTTI symbol not found for class 'std::_Sp_counted_deleter<mir::client::rpc::MirProtobufRpcChannel*, mir::client::rpc::MirProtobufRpcChannel::MirProtobufRpcChannel(std::unique_ptr<mir::client::rpc::StreamTransport, std::default_delete<mir::client::rpc::StreamTransport> >, std::shared_ptr<mir::client::SurfaceMap> const&, std::shared_ptr<mir::client::AsyncBufferFactory> const&, std::shared_ptr<mir::client::DisplayConfiguration> const&, std::shared_ptr<mir::input::InputDevices> const&, std::shared_ptr<mir::client::rpc::RpcReport> const&, std::shared_ptr<mir::client::AtomicCallback<MirLifecycleState> > const&, std::shared_ptr<mir::client::AtomicCallback<int> > const&, std::shared_ptr<mir::client::AtomicCallback<MirError const*> > const&, std::shared_ptr<mir::client::EventSink> const&)::NullDeleter, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>'
std::shared_ptr (count 3, weak 0) 0x61e970)
at /media/kinga/Dane/mir/mir_nowy/src/client/rpc/stream_socket_transport.cpp:40
#8 0x00007ffff6b0ad2c in std::_Function_handler<void(const std::shared_ptr<mir::client::rpc::StreamTransport::Observer>&), mir::client::rpc::TransportObservers::on_data_available()::<lambda(auto:1)> >::_M_invoke(const std::_Any_data &, const std::shared_ptr<mir::client::rpc::StreamTransport::Observer> &) (__functor=..., __args#0=warning: RTTI symbol not found for class 'std::_Sp_counted_deleter<mir::client::rpc::MirProtobufRpcChannel*, mir::client::rpc::MirProtobufRpcChannel::MirProtobufRpcChannel(std::unique_ptr<mir::client::rpc::StreamTransport, std::default_delete<mir::client::rpc::StreamTransport> >, std::shared_ptr<mir::client::SurfaceMap> const&, std::shared_ptr<mir::client::AsyncBufferFactory> const&, std::shared_ptr<mir::client::DisplayConfiguration> const&, std::shared_ptr<mir::input::InputDevices> const&, std::shared_ptr<mir::client::rpc::RpcReport> const&, std::shared_ptr<mir::client::AtomicCallback<MirLifecycleState> > const&, std::shared_ptr<mir::client::AtomicCallback<int> > const&, std::shared_ptr<mir::client::AtomicCallback<MirError const*> > const&, std::shared_ptr<mir::client::EventSink> const&)::NullDeleter, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>'
warning: RTTI symbol not found for class 'std::_Sp_counted_deleter<mir::client::rpc::MirProtobufRpcChannel*, mir::client::rpc::MirProtobufRpcChannel::MirProtobufRpcChannel(std::unique_ptr<mir::client::rpc::StreamTransport, std::default_delete<mir::client::rpc::StreamTransport> >, std::shared_ptr<mir::client::SurfaceMap> const&, std::shared_ptr<mir::client::AsyncBufferFactory> const&, std::shared_ptr<mir::client::DisplayConfiguration> const&, std::shared_ptr<mir::input::InputDevices> const&, std::shared_ptr<mir::client::rpc::RpcReport> const&, std::shared_ptr<mir::client::AtomicCallback<MirLifecycleState> > const&, std::shared_ptr<mir::client::AtomicCallback<int> > const&, std::shared_ptr<mir::client::AtomicCallback<MirError const*> > const&, std::shared_ptr<mir::client::EventSink> const&)::NullDeleter, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>'
std::shared_ptr (count 3, weak 0) 0x61e970) at /usr/include/c++/5/functional:1871
#9 0x00007ffff6b0c551 in std::function<void (std::shared_ptr<mir::client::rpc::StreamTransport::Observer> const&)>::operator()(std::shared_ptr<mir::client::rpc::StreamTransport::Observer> const&) const (this=0x7ffff4bc9bd0,
__args#0=warning: RTTI symbol not found for class 'std::_Sp_counted_deleter<mir::client::rpc::MirProtobufRpcChannel*, mir::client::rpc::MirProtobufRpcChannel::MirProtobufRpcChannel(std::unique_ptr<mir::client::rpc::StreamTransport, std::default_delete<mir::client::rpc::StreamTransport> >, std::shared_ptr<mir::client::SurfaceMap> const&, std::shared_ptr<mir::client::AsyncBufferFactory> const&, std::shared_ptr<mir::client::DisplayConfiguration> const&, std::shared_ptr<mir::input::InputDevices> const&, std::shared_ptr<mir::client::rpc::RpcReport> const&, std::shared_ptr<mir::client::AtomicCallback<MirLifecycleState> > const&, std::shared_ptr<mir::client::AtomicCallback<int> > const&, std::shared_ptr<mir::client::AtomicCallback<MirError const*> > const&, std::shared_ptr<mir::client::EventSink> const&)::NullDeleter, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>'
warning: RTTI symbol not found for class 'std::_Sp_counted_deleter<mir::client::rpc::MirProtobufRpcChannel*, mir::client::rpc::MirProtobufRpcChannel::MirProtobufRpcChannel(std::unique_ptr<mir::client::rpc::StreamTransport, std::default_delete<mir::client::rpc::StreamTransport> >, std::shared_ptr<mir::client::SurfaceMap> const&, std::shared_ptr<mir::client::AsyncBufferFactory> const&, std::shared_ptr<mir::client::DisplayConfiguration> const&, std::shared_ptr<mir::input::InputDevices> const&, std::shared_ptr<mir::client::rpc::RpcReport> const&, std::shared_ptr<mir::client::AtomicCallback<MirLifecycleState> > const&, std::shared_ptr<mir::client::AtomicCallback<int> > const&, std::shared_ptr<mir::client::AtomicCallback<MirError const*> > const&, std::shared_ptr<mir::client::EventSink> const&)::NullDeleter, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>'
std::shared_ptr (count 3, weak 0) 0x61e970) at /usr/include/c++/5/functional:2267
#10 0x00007ffff6b0b817 in mir::ThreadSafeList<std::shared_ptr<mir::client::rpc::StreamTransport::Observer> >::for_each(std::function<void (std::shared_ptr<mir::client::rpc::StreamTransport::Observer> const&)> const&) (
this=0x61e870, f=...) at /media/kinga/Dane/mir/mir_nowy/src/include/common/mir/thread_safe_list.h:80
#11 0x00007ffff6b09ce0 in mir::client::rpc::TransportObservers::on_data_available (this=0x61e868)
at /media/kinga/Dane/mir/mir_nowy/src/client/rpc/stream_socket_transport.cpp:40
#12 0x00007ffff6b0a8c0 in mir::client::rpc::StreamSocketTransport::dispatch (this=0x61e850, events=1)
at /media/kinga/Dane/mir/mir_nowy/src/client/rpc/stream_socket_transport.cpp:208
#13 0x00007ffff65657fc in mir::dispatch::MultiplexingDispatchable::dispatch (this=0x61eb98, events=1)
at /media/kinga/Dane/mir/mir_nowy/src/common/dispatch/multiplexing_dispatchable.cpp:140
#14 0x00007ffff6b00305 in mir::client::rpc::MirProtobufRpcChannel::dispatch (this=0x61e960, events=1)
at /media/kinga/Dane/mir/mir_nowy/src/client/rpc/mir_protobuf_rpc_channel.cpp:555
#15 0x00007ffff65657fc in mir::dispatch::MultiplexingDispatchable::dispatch (this=0x61f3f0, events=1)
at /media/kinga/Dane/mir/mir_nowy/src/common/dispatch/multiplexing_dispatchable.cpp:140
#16 0x00007ffff6568ade in (anonymous namespace)::dispatch_loop(const std::__cxx11::string &, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::Dispatchable>, const std::function<void()> &) (name="RPC Thread", thread_register=std::shared_ptr (count 4, weak 0) 0x61f2a0,
dispatcher=std::shared_ptr (count 2, weak 0) 0x61f3f0, exception_handler=...)
at /media/kinga/Dane/mir/mir_nowy/src/common/dispatch/threaded_dispatcher.cpp:211
---Type <return> to continue, or q <return> to quit---
llocator<char> >, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::MultiplexingDispatchable>, std::function<void ()>))(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::Dispatchable>, std::function<void ()> const&)>::_M_invoke<0ul, 1ul, 2ul, 3ul>(std::_Index_tuple<0ul, 1ul, 2ul, 3ul>) (this=0x61f4e8)
at /usr/include/c++/5/functional:1531
#18 0x00007ffff6574374 in std::_Bind_simple<void (*(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::MultiplexingDispatchable>, std::function<void ()>))(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::Dispatchable>, std::function<void ()> const&)>::operator()() (this=0x61f4e8) at /usr/include/c++/5/functional:1520
#19 0x00007ffff6573ec6 in std::thread::_Impl<std::_Bind_simple<void (*(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::MultiplexingDispatchable>, std::function<void ()>))(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::Dispatchable>, std::function<void ()> const&)> >::_M_run() (this=0x61f4d0) at /usr/include/c++/5/thread:115
#20 0x00007ffff56fdc80 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#21 0x00007ffff6fc56ba in start_thread (arg=0x7ffff4bca700) at pthread_create.c:333
#22 0x00007ffff77ee82d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
I have found that the problem is caused by line: message- >ParseFromStrin g(result- >response( )); ufRpcChannel: :on_data_ available( )
result_
in void mclr::MirProtob
I checked that response() return invalid data (which previously client has received from server).
I have checked server side and I have found that issue is caused by this part of code:
catch (std::exception const& x) :string_ literals;
result_ message. set_error( "Error processing request: "s +
x. what() + "\nInternal error details: " + boost:: diagnostic_ information( x));
self-> send_response( invocation. id(), &result_message);
{
using namespace std::literals:
in template_ protobuf_ message_ processor. h
Where result_message type is protobuf::Void and send_response function has signature:
mfd::ProtobufRe sponder: :send_response( :protobuf: :uint32 id, :protobuf: :MessageLite* response,
::google:
google:
FdSets const& fd_sets)
Inexplicit type conversion from protobuf::Void to protobuf: :MessageLite probably causes that send_response_ buffer in ProtobufRespond er::send_ response function is broken and contains string:
Error processing request: Invalid SurfaceId kinga/Dane/ mir/mir_ nowy/src/ server/ scene/applicati on_session. cpp(176) : Throw in function std::map< mir::IntWrapper <mir::frontend: :detail: :SessionsSurfac eIdTag> , std::shared_ ptr<mir: :scene: :Surface> >::const_iterator mir::scene: :ApplicationSes sion::checked_ find(mir: :frontend: :SurfaceId) const exception_ detail: :clone_ impl<boost: :exception_ detail: :error_ info_injector< std::runtime_ error> > :what: Invalid SurfaceId
Internal error details: /media/
Dynamic exception type: boost::
std::exception: