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
1=== modified file 'src/include/server/mir/frontend/connector_report.h'
2--- src/include/server/mir/frontend/connector_report.h 2017-07-28 17:00:43 +0000
3+++ src/include/server/mir/frontend/connector_report.h 2017-08-15 10:05:20 +0000
4@@ -40,6 +40,7 @@
5 virtual void listening_on(std::string const& endpoint) = 0;
6
7 virtual void error(std::exception const& error) = 0;
8+ virtual void warning(std::string const& error) = 0;
9
10 protected:
11 virtual ~ConnectorReport() = default;
12
13=== modified file 'src/server/frontend/published_socket_connector.cpp'
14--- src/server/frontend/published_socket_connector.cpp 2017-07-28 17:00:43 +0000
15+++ src/server/frontend/published_socket_connector.cpp 2017-08-15 10:05:20 +0000
16@@ -138,6 +138,10 @@
17 {
18 create_session_for(socket, [](std::shared_ptr<mf::Session> const&) {});
19 }
20+ else
21+ {
22+ report->warning(ec.message());
23+ }
24 start_accept();
25 }
26
27
28=== modified file 'src/server/report/logging/connector_report.cpp'
29--- src/server/report/logging/connector_report.cpp 2017-07-28 17:00:43 +0000
30+++ src/server/report/logging/connector_report.cpp 2017-08-15 10:05:20 +0000
31@@ -81,5 +81,13 @@
32 logger->log(ml::Severity::warning, ss.str(), component);
33 }
34
35+void mrl::ConnectorReport::warning(std::string const& error)
36+{
37+ std::stringstream ss;
38+ ss << "thread (" << std::this_thread::get_id() << ") " << error;
39+
40+ logger->log(ml::Severity::warning, ss.str(), component);
41+}
42+
43
44
45
46=== modified file 'src/server/report/logging/connector_report.h'
47--- src/server/report/logging/connector_report.h 2017-07-28 17:00:43 +0000
48+++ src/server/report/logging/connector_report.h 2017-08-15 10:05:20 +0000
49@@ -49,6 +49,7 @@
50 void listening_on(std::string const& endpoint) override;
51
52 void error(std::exception const& error) override;
53+ void warning(std::string const& error) override;
54
55 private:
56 std::shared_ptr<mir::logging::Logger> const logger;
57
58=== modified file 'src/server/report/lttng/connector_report.cpp'
59--- src/server/report/lttng/connector_report.cpp 2017-07-28 17:00:43 +0000
60+++ src/server/report/lttng/connector_report.cpp 2017-08-15 10:05:20 +0000
61@@ -53,3 +53,8 @@
62 mir_tracepoint(mir_server_connector, error, boost::diagnostic_information(error).c_str());
63 }
64
65+void mir::report::lttng::ConnectorReport::warning(std::string const& error)
66+{
67+ mir_tracepoint(mir_server_connector, error, error.c_str());
68+}
69+
70
71=== modified file 'src/server/report/lttng/connector_report.h'
72--- src/server/report/lttng/connector_report.h 2017-07-28 17:00:43 +0000
73+++ src/server/report/lttng/connector_report.h 2017-08-15 10:05:20 +0000
74@@ -45,6 +45,8 @@
75 void listening_on(std::string const& endpoint) override;
76
77 void error(std::exception const& error) override;
78+ void warning(std::string const& error) override;
79+
80 private:
81 ServerTracepointProvider tp_provider;
82 };
83
84=== modified file 'src/server/report/null/connector_report.cpp'
85--- src/server/report/null/connector_report.cpp 2017-07-28 17:00:43 +0000
86+++ src/server/report/null/connector_report.cpp 2017-08-15 10:05:20 +0000
87@@ -26,4 +26,5 @@
88 void mrn::ConnectorReport::creating_socket_pair(int /*server_handle*/, int /*client_handle*/) {}
89 void mrn::ConnectorReport::listening_on(std::string const& /*endpoint*/) {}
90 void mrn::ConnectorReport::error(std::exception const& /*error*/) {}
91+void mrn::ConnectorReport::warning(std::string const& /*error*/) {}
92
93
94=== modified file 'src/server/report/null/connector_report.h'
95--- src/server/report/null/connector_report.h 2017-07-28 17:00:43 +0000
96+++ src/server/report/null/connector_report.h 2017-08-15 10:05:20 +0000
97@@ -40,6 +40,7 @@
98 void listening_on(std::string const& endpoint) override;
99
100 void error(std::exception const& error) override;
101+ void warning(std::string const& error) override;
102 };
103 }
104 }
105
106=== modified file 'tests/unit-tests/frontend/test_published_socket_connector.cpp'
107--- tests/unit-tests/frontend/test_published_socket_connector.cpp 2017-07-28 17:00:43 +0000
108+++ tests/unit-tests/frontend/test_published_socket_connector.cpp 2017-08-15 10:05:20 +0000
109@@ -81,6 +81,8 @@
110 MOCK_METHOD1(listening_on, void(std::string const& endpoint));
111
112 MOCK_METHOD1(error, void (std::exception const& error));
113+
114+ void warning(std::string const& /*error*/) /*override*/ {}
115 };
116 }
117

Subscribers

People subscribed via source and target branches