Mir

[testsfail] ServerDisconnect.is_detected_by_client

Bug #1728931 reported by Alan Griffiths
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Invalid
High
Alan Griffiths
mir (Ubuntu)
High
Unassigned

Bug Description

[ RUN ] ServerDisconnect.is_detected_by_client
[2017-10-27 21:38:41.897919] mirserver: Starting
[2017-10-27 21:38:41.898180] mirserver: Selected driver: mir:stub-graphics (version 0.28.1)
[2017-10-27 21:38:41.908376] mirserver: Using software cursor
[2017-10-27 21:38:41.912088] mirserver: Selected input driver: mir:stub-input (version: 0.28.1)
[2017-10-27 21:38:41.920187] <WARNING> mirserver: No WaylandAllocator EGL support!
error: XDG_RUNTIME_DIR not set in the environment
[2017-10-27 21:38:41.922664] mirserver: Mir version 0.28.1
[2017-10-27 21:38:41.923122] mirserver: Initial display configuration:
[2017-10-27 21:38:41.923141] mirserver: CTestConfig.cmake CTestTestfile.cmake mir_acceptance_tests.bin_10.xml mir_acceptance_tests.bin_11.xml mir_acceptance_tests.bin_1.xml mir_acceptance_tests.bin_2.xml mir_acceptance_tests.bin_3.xml mir_acceptance_tests.bin_4.xml mir_acceptance_tests.bin_5.xml mir_acceptance_tests.bin_6.xml mir_acceptance_tests.bin_7.xml mir_acceptance_tests.bin_8.xml mir_acceptance_tests.bin_9.xml mir_acceptance_tests.bin.xml steer.cmake Testing Output 1: VGA connected, used
[2017-10-27 21:38:41.923157] mirserver: . |_ Physical size 0.0" 0x0mm
[2017-10-27 21:38:41.923162] mirserver: . |_ Power is on
[2017-10-27 21:38:41.923167] mirserver: . |_ Current mode 1600x1600 60.00Hz
[2017-10-27 21:38:41.923172] mirserver: . |_ Preferred mode 1600x1600 60.00Hz
[2017-10-27 21:38:41.923175] mirserver: . |_ Orientation normal
[2017-10-27 21:38:41.923181] mirserver: . |_ Logical size 1600x1600
[2017-10-27 21:38:41.923184] mirserver: . |_ Logical position +0+0
[2017-10-27 21:38:41.923188] mirserver: . |_ Scaling factor: 1.00
[2017-10-27 21:38:41.940284] mirserver: Stopping
/spread/mir/tests/mir_test_framework/interprocess_client_server_test.cpp:167: Failure
Value of: result.exit_code
Expected: is equal to 0
Actual: 1 (of type int)
[2017-10-27 21:38:41.953366] <ERROR> MirWindowAPI: Caught exception at client library boundary (in window_release_helper): /spread/mir/src/client/rpc/stream_socket_transport.cpp(168): Throw in function virtual void mir::client::rpc::StreamSocketTransport::send_message(const std::vector<unsigned char>&, const std::vector<mir::Fd>&)
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<mir::socket_disconnected_error> >
std::exception::what: Failed to send message to server: Broken pipe
32, "Broken pipe"
[2017-10-27 21:38:41.953754] <ERROR> MirConnectionAPI: Caught exception at client library boundary (in mir_connection_release): /spread/mir/src/client/rpc/stream_socket_transport.cpp(168): Throw in function virtual void mir::client::rpc::StreamSocketTransport::send_message(const std::vector<unsigned char>&, const std::vector<mir::Fd>&)
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<mir::socket_disconnected_error> >
std::exception::what: Failed to send message to server: Broken pipe
32, "Broken pipe"
[ FAILED ] ServerDisconnect.is_detected_by_client (58 ms)

Related branches

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

$ while cmake-build-debug/bin/mir_acceptance_tests --gtest_filter=ServerDisconnect.is_detected_by_client; do :; done

Fails after a few seconds

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

I've not yet tracked down where, but the server is occasionally segfaulting during shutdown.

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

The segfault happens when there are only two threads still active:

1. the main thread is in ~ThreadExecutor() (specifically, at dispatch_thread.join() in quiesce())
2. the dispatch thread is destroying a lambda created by AutoSendBuffer. Specifically, destroying the buffer it owns as "to_send" is where the segfault is reported.

Presumably this buffer was allocated by "mirserver: Selected driver: mir:stub-graphics", perhaps that .so has been unloaded meantime?

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Yes, info sharedlibrary shows stub-graphics isn't loaded. And if I prevent it unloading then I can't reproduce the crash.

That should be fixable!

Revision history for this message
Michał Sawicz (saviq) wrote :

Syncing task from Mir.

Changed in mir (Ubuntu):
importance: Undecided → High
status: New → In Progress
Changed in mir (Ubuntu):
status: In Progress → Invalid
Changed in mir:
status: In Progress → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers