Mir

If the server dies, clients sometimes display "Caught exception at Mir/EGL driver boundary: ... std::exception::what: Failed to send message to server: Broken pipe"

Bug #1368652 reported by Daniel van Vugt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Triaged
Medium
Unassigned
mir (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

If the server dies, clients sometimes display "Caught exception at Mir/EGL driver boundary: ... std::exception::what: Failed to send message to server: Broken pipe":

Test case: Start a bunch of demo clients all at once and then kill the server.

Expected: All clean client shutdowns (Signal 1 received. Good night.)

Observed:
Signal 1 received. Good night.
Signal 1 received. Good night.
Signal 1 received. Good night.
Signal 1 received. Good night.
Caught exception at Mir/EGL driver boundary: /home/dan/bzr/mir/toy/src/client/rpc/stream_socket_transport.cpp(276): Throw in function virtual void mir::client::rpc::StreamSocketTransport::send_data(const std::vector<unsigned char>&)
Dynamic exception type: N5boost16exception_detail10clone_implINS0_19error_info_injectorIN12_GLOBAL__N_125socket_disconnected_errorEEEEE
std::exception::what: Failed to send message to server: Broken pipe
32, "Broken pipe"
Signal 1 received. Good night.
Caught exception at Mir/EGL driver boundary: /home/dan/bzr/mir/toy/src/client/rpc/stream_socket_transport.cpp(276): Throw in function virtual void mir::client::rpc::StreamSocketTransport::send_data(const std::vector<unsigned char>&)
Dynamic exception type: N5boost16exception_detail10clone_implINS0_19error_info_injectorIN12_GLOBAL__N_125socket_disconnected_errorEEEEE
std::exception::what: Failed to send message to server: Broken pipe
32, "Broken pipe"
Signal 1 received. Good night.

Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

This happens because the server disconnection is detected while in a driver callback (e.g. a call from the driver to get the next buffer). I don't think we can avoid this, unless we don't log the boundary exceptions at all, or perphaps only ignore this particular exception?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It's just a user interface issue really. Especially if we're already cleaning up correctly, no exception text should be spewed to the client's stderr/out.

Revision history for this message
kevin gunn (kgunn72) wrote :

there's a log here, in this duplicate bug 1383696
marking rtm14 likewise

Revision history for this message
kevin gunn (kgunn72) wrote :

description from the other bug to repro

"When opening an application I sometimes get an app that never opens, on launch ps shows the whole group (oxide) as being suspended and there's this error in the log"

tags: added: rtm14
Changed in mir:
importance: Undecided → Critical
tags: added: touch-2014-10-30
Revision history for this message
kevin gunn (kgunn72) wrote :

unduping the other bug since this is talking about the error logging rather than a cause

Changed in mir:
importance: Critical → Medium
tags: removed: rtm14 touch-2014-10-30
Changed in mir:
status: New → Triaged
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The problem's now a bit worse since r2194:

Signal 1 received. Good night.
Caught exception at Mir/EGL driver boundary: /home/dan/bzr/mir/managed-surface/src/client/rpc/stream_socket_transport.cpp(166): Throw in function virtual void mir::client::rpc::StreamSocketTransport::send_message(const std::vector<unsigned char>&, const std::vector<mir::Fd>&)
Dynamic exception type: N5boost16exception_detail10clone_implINS0_19error_info_injectorIN3mir25socket_disconnected_errorEEEEE
std::exception::what: Failed to send message to server: Broken pipe
32, "Broken pipe"
[1420515827.256161] (EE) MirSurfaceAPI: Caught exception at client library boundary (in mir_surface_release): Failed to send message to server: Broken pipe
[1420515827.256314] (EE) MirConnectionAPI: Caught exception at client library boundary (in release): Failed to send message to server: Broken pipe

So we need to remove the old exception message first. Second we shouldn't be logging anything because "Broken pipe" isn't really an error. The same information is already conveyed to the client app by SIGHUP.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Still happening in Mir release 0.11.0:

Signal 1 received. Good night.
[1423635409.524339] <ERROR> MirSurfaceAPI: Caught exception at client library boundary (in mir_surface_release): /build/buildd/mir-0.11.0+15.04.20150209.1/src/client/rpc/stream_socket_transport.cpp(154): Throw in function virtual void mir::client::rpc::StreamSocketTransport::send_message(const std::vector<unsigned char>&, const std::vector<mir::Fd>&)
Dynamic exception type: N5boost16exception_detail10clone_implINS0_19error_info_injectorIN3mir25socket_disconnected_errorEEEEE
std::exception::what: Failed to send message to server: Broken pipe
32, "Broken pipe"
[1423635409.524508] <ERROR> MirConnectionAPI: Caught exception at client library boundary (in release): /build/buildd/mir-0.11.0+15.04.20150209.1/src/client/rpc/stream_socket_transport.cpp(154): Throw in function virtual void mir::client::rpc::StreamSocketTransport::send_message(const std::vector<unsigned char>&, const std::vector<mir::Fd>&)
Dynamic exception type: N5boost16exception_detail10clone_implINS0_19error_info_injectorIN3mir25socket_disconnected_errorEEEEE
std::exception::what: Failed to send message to server: Broken pipe
32, "Broken pipe"

See also bug 1312099.

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

Syncing task from Mir.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.