Mir

Merge lp:~alan-griffiths/mir/connector-report-warning into lp:mir

Proposed by Alan Griffiths
Status: Merged
Approved by: Gerry Boland
Approved revision: no longer in the source branch.
Merged at revision: 4227
Proposed branch: lp:~alan-griffiths/mir/connector-report-warning
Merge into: lp:mir
Diff against target: 116 lines (+25/-0)
9 files modified
src/include/server/mir/frontend/connector_report.h (+1/-0)
src/server/frontend/published_socket_connector.cpp (+4/-0)
src/server/report/logging/connector_report.cpp (+8/-0)
src/server/report/logging/connector_report.h (+1/-0)
src/server/report/lttng/connector_report.cpp (+5/-0)
src/server/report/lttng/connector_report.h (+2/-0)
src/server/report/null/connector_report.cpp (+1/-0)
src/server/report/null/connector_report.h (+1/-0)
tests/unit-tests/frontend/test_published_socket_connector.cpp (+2/-0)
To merge this branch: bzr merge lp:~alan-griffiths/mir/connector-report-warning
Reviewer Review Type Date Requested Status
Gerry Boland (community) Approve
Mir CI Bot continuous-integration Approve
Review via email: mp+329030@code.launchpad.net

Commit message

connector-report: Warn when there's an error connecting

Description of the change

connector-report: Warn when there's an error connecting

This sheds a light on lp:~raof/mir/no-ipc-on-compositor-threads as new connections attempts lead to: "[2017-08-15 10:56:39.760091] <WARNING> frontend::Connector: thread (139841375299328) Too many open files"

To post a comment you must log in.
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:4227
https://mir-jenkins.ubuntu.com/job/mir-ci/3555/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/4868
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/5081
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=artful/5070
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/5070
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/5070
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/4905
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/4905/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4905
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4905/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/4905
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/4905/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/4905
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/4905/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4905
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4905/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/4905
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/4905/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4905
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4905/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/4905
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/4905/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/3555/rebuild

review: Approve (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) wrote :

Looks sensible

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/include/server/mir/frontend/connector_report.h'
--- src/include/server/mir/frontend/connector_report.h 2017-07-28 17:00:43 +0000
+++ src/include/server/mir/frontend/connector_report.h 2017-08-15 10:05:20 +0000
@@ -40,6 +40,7 @@
40 virtual void listening_on(std::string const& endpoint) = 0;40 virtual void listening_on(std::string const& endpoint) = 0;
4141
42 virtual void error(std::exception const& error) = 0;42 virtual void error(std::exception const& error) = 0;
43 virtual void warning(std::string const& error) = 0;
4344
44protected:45protected:
45 virtual ~ConnectorReport() = default;46 virtual ~ConnectorReport() = default;
4647
=== modified file 'src/server/frontend/published_socket_connector.cpp'
--- src/server/frontend/published_socket_connector.cpp 2017-07-28 17:00:43 +0000
+++ src/server/frontend/published_socket_connector.cpp 2017-08-15 10:05:20 +0000
@@ -138,6 +138,10 @@
138 {138 {
139 create_session_for(socket, [](std::shared_ptr<mf::Session> const&) {});139 create_session_for(socket, [](std::shared_ptr<mf::Session> const&) {});
140 }140 }
141 else
142 {
143 report->warning(ec.message());
144 }
141 start_accept();145 start_accept();
142}146}
143147
144148
=== modified file 'src/server/report/logging/connector_report.cpp'
--- src/server/report/logging/connector_report.cpp 2017-07-28 17:00:43 +0000
+++ src/server/report/logging/connector_report.cpp 2017-08-15 10:05:20 +0000
@@ -81,5 +81,13 @@
81 logger->log(ml::Severity::warning, ss.str(), component);81 logger->log(ml::Severity::warning, ss.str(), component);
82}82}
8383
84void mrl::ConnectorReport::warning(std::string const& error)
85{
86 std::stringstream ss;
87 ss << "thread (" << std::this_thread::get_id() << ") " << error;
88
89 logger->log(ml::Severity::warning, ss.str(), component);
90}
91
8492
8593
8694
=== modified file 'src/server/report/logging/connector_report.h'
--- src/server/report/logging/connector_report.h 2017-07-28 17:00:43 +0000
+++ src/server/report/logging/connector_report.h 2017-08-15 10:05:20 +0000
@@ -49,6 +49,7 @@
49 void listening_on(std::string const& endpoint) override;49 void listening_on(std::string const& endpoint) override;
5050
51 void error(std::exception const& error) override;51 void error(std::exception const& error) override;
52 void warning(std::string const& error) override;
5253
53private:54private:
54 std::shared_ptr<mir::logging::Logger> const logger;55 std::shared_ptr<mir::logging::Logger> const logger;
5556
=== modified file 'src/server/report/lttng/connector_report.cpp'
--- src/server/report/lttng/connector_report.cpp 2017-07-28 17:00:43 +0000
+++ src/server/report/lttng/connector_report.cpp 2017-08-15 10:05:20 +0000
@@ -53,3 +53,8 @@
53 mir_tracepoint(mir_server_connector, error, boost::diagnostic_information(error).c_str());53 mir_tracepoint(mir_server_connector, error, boost::diagnostic_information(error).c_str());
54}54}
5555
56void mir::report::lttng::ConnectorReport::warning(std::string const& error)
57{
58 mir_tracepoint(mir_server_connector, error, error.c_str());
59}
60
5661
=== modified file 'src/server/report/lttng/connector_report.h'
--- src/server/report/lttng/connector_report.h 2017-07-28 17:00:43 +0000
+++ src/server/report/lttng/connector_report.h 2017-08-15 10:05:20 +0000
@@ -45,6 +45,8 @@
45 void listening_on(std::string const& endpoint) override;45 void listening_on(std::string const& endpoint) override;
4646
47 void error(std::exception const& error) override;47 void error(std::exception const& error) override;
48 void warning(std::string const& error) override;
49
48private:50private:
49 ServerTracepointProvider tp_provider;51 ServerTracepointProvider tp_provider;
50};52};
5153
=== modified file 'src/server/report/null/connector_report.cpp'
--- src/server/report/null/connector_report.cpp 2017-07-28 17:00:43 +0000
+++ src/server/report/null/connector_report.cpp 2017-08-15 10:05:20 +0000
@@ -26,4 +26,5 @@
26void mrn::ConnectorReport::creating_socket_pair(int /*server_handle*/, int /*client_handle*/) {}26void mrn::ConnectorReport::creating_socket_pair(int /*server_handle*/, int /*client_handle*/) {}
27void mrn::ConnectorReport::listening_on(std::string const& /*endpoint*/) {}27void mrn::ConnectorReport::listening_on(std::string const& /*endpoint*/) {}
28void mrn::ConnectorReport::error(std::exception const& /*error*/) {}28void mrn::ConnectorReport::error(std::exception const& /*error*/) {}
29void mrn::ConnectorReport::warning(std::string const& /*error*/) {}
2930
3031
=== modified file 'src/server/report/null/connector_report.h'
--- src/server/report/null/connector_report.h 2017-07-28 17:00:43 +0000
+++ src/server/report/null/connector_report.h 2017-08-15 10:05:20 +0000
@@ -40,6 +40,7 @@
40 void listening_on(std::string const& endpoint) override;40 void listening_on(std::string const& endpoint) override;
4141
42 void error(std::exception const& error) override;42 void error(std::exception const& error) override;
43 void warning(std::string const& error) override;
43};44};
44}45}
45}46}
4647
=== modified file 'tests/unit-tests/frontend/test_published_socket_connector.cpp'
--- tests/unit-tests/frontend/test_published_socket_connector.cpp 2017-07-28 17:00:43 +0000
+++ tests/unit-tests/frontend/test_published_socket_connector.cpp 2017-08-15 10:05:20 +0000
@@ -81,6 +81,8 @@
81 MOCK_METHOD1(listening_on, void(std::string const& endpoint));81 MOCK_METHOD1(listening_on, void(std::string const& endpoint));
8282
83 MOCK_METHOD1(error, void (std::exception const& error));83 MOCK_METHOD1(error, void (std::exception const& error));
84
85 void warning(std::string const& /*error*/) /*override*/ {}
84};86};
85}87}
8688

Subscribers

People subscribed via source and target branches