Mir

Merge lp:~alan-griffiths/mir/make-mir_demo_server-dlopen-mir into lp:mir

Proposed by Alan Griffiths
Status: Merged
Merged at revision: 2836
Proposed branch: lp:~alan-griffiths/mir/make-mir_demo_server-dlopen-mir
Merge into: lp:mir
Diff against target: 51 lines (+3/-17)
2 files modified
examples/CMakeLists.txt (+2/-16)
examples/mir_demo_server_loader.cpp (+1/-1)
To merge this branch: bzr merge lp:~alan-griffiths/mir/make-mir_demo_server-dlopen-mir
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Alberto Aguirre (community) Approve
Daniel van Vugt Abstain
Kevin DuBois (community) Approve
Cemil Azizoglu (community) Approve
Chris Halse Rogers Approve
Review via email: mp+267498@code.launchpad.net

Commit message

examples: remove mir_demo_server_loader and make mir_demo_server dynamically load Mir

Description of the change

examples: remove mir_demo_server_loader and make mir_demo_server dynamically load Mir

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

[1439208523.452807] <WARNING> mircommon: Failed to load module: /usr/lib/arm-linux-gnueabihf/mir/server-platform/server-mesa-x11.so.4 (error was:/usr/lib/arm-linux-gnueabihf/mir/server-platform/server-mesa-x11.so.4: undefined symbol: _ZN3mir6events10make_eventExNSt6chrono8durationIxSt5ratioILx1ELx1000000000EEEE17MirKeyboardActionjij)
[1439208523.453326] mirplatform: Found graphics driver: dummy
[1439208523.454822] mirplatform: Found graphics driver: android
[1439208523.455402] mirplatform: Found graphics driver: mesa-kms
[1439208523.455951] mirserver: Selected driver: android (version 0.16.0)
/bin/bash: line 1: 12958 Segmentation fault (core dumped) mir_demo_server --test-client /usr/bin/mir_demo_client_basic

Odd.

We're running on a mako and failing to load a mesa-x11 driver because mir::events::make_event(long long, std::chrono::duration<long long, std::ratio<1ll, 1000000000ll> >, MirKeyboardAction, unsigned int, int, unsigned int) isn't defined.

So, server-mesa-x11 links against mirprotobuf and that has a transitive link against mircommon, but neither links against mirclient where the above function resides.

Revision history for this message
Cemil Azizoglu (cemil-azizoglu) wrote :

> [1439208523.452807] <WARNING> mircommon: Failed to load module: /usr/lib/arm-
> linux-gnueabihf/mir/server-platform/server-mesa-x11.so.4 (error was:/usr/lib
> /arm-linux-gnueabihf/mir/server-platform/server-mesa-x11.so.4: undefined
> symbol: _ZN3mir6events10make_eventExNSt6chrono8durationIxSt5ratioILx1ELx100000
> 0000EEEE17MirKeyboardActionjij)
> [1439208523.453326] mirplatform: Found graphics driver: dummy
> [1439208523.454822] mirplatform: Found graphics driver: android
> [1439208523.455402] mirplatform: Found graphics driver: mesa-kms
> [1439208523.455951] mirserver: Selected driver: android (version 0.16.0)
> /bin/bash: line 1: 12958 Segmentation fault (core dumped) mir_demo_server
> --test-client /usr/bin/mir_demo_client_basic
>
> Odd.
>
> We're running on a mako and failing to load a mesa-x11 driver because
> mir::events::make_event(long long, std::chrono::duration<long long,
> std::ratio<1ll, 1000000000ll> >, MirKeyboardAction, unsigned int, int,
> unsigned int) isn't defined.
>
> So, server-mesa-x11 links against mirprotobuf and that has a transitive link
> against mircommon, but neither links against mirclient where the above
> function resides.

Besides mesa-x11, mirserver uses the event builders. It makes more sense to me if event builders were part of mircommon, rather than mirclient, as a long(-ish) term goal.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

> So, server-mesa-x11 links against mirprotobuf and that has a transitive link
> against mircommon, but neither links against mirclient where the above
> function resides.

mirprotobuf does not link against mircommon.

http://pastebin.ubuntu.com/12051149/

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

On Monday, 10 August 2015 21:29:49 BST, Alberto Aguirre wrote:
>> So, server-mesa-x11 links against mirprotobuf and that has a
>> transitive link
>> against mircommon, but neither links against mirclient where the above
>> function resides.
>
> mirprotobuf does not link against mircommon.
>
> http://pastebin.ubuntu.com/12051149/

I meant mirplatform

--
Alan Griffiths. +44 (0)798 9938 758
Octopull Limited. http://www.octopull.co.uk/

Revision history for this message
Alberto Aguirre (albaguirre) wrote :

Umm the segmantation fault is actually a crash in the GL driver....

http://pastebin.ubuntu.com/12052505/

Seems related to TLS collisions between android GL driver and glibc as if I add a dummy thread local array (like in screencast.cpp) the issue goes away. This is becoming quite annoying... I wonder if we should request the android side of things to be built with the slower GL dispatch mode.

Revision history for this message
Chris Halse Rogers (raof) wrote :

Alternatively: could hybris actually claim the relevant TLS slots?

Revision history for this message
Chris Halse Rogers (raof) wrote :

Otherwise seems sensible.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

^--That's for r2830

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Cemil Azizoglu (cemil-azizoglu) wrote :

ok

review: Approve
Revision history for this message
Kevin DuBois (kdub) wrote :

lgtm

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

Doesn't make any sense to me but seems less crazy than the code it replaces. I'll top approve for everyone's votes anyway.

review: Abstain
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

Maybe libhybris doesn't support loading libGLESv2 with RTLD_NOW.

LGTM.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'examples/CMakeLists.txt'
2--- examples/CMakeLists.txt 2015-07-29 17:23:39 +0000
3+++ examples/CMakeLists.txt 2015-08-11 14:23:35 +0000
4@@ -181,20 +181,6 @@
5 ${Boost_LIBRARIES}
6 )
7
8-mir_add_wrapped_executable(mir_demo_server
9- server_example.cpp
10- glog_logger.cpp
11- server_example_test_client.cpp
12-)
13-
14-target_link_libraries(mir_demo_server
15- mirserver
16- exampleserverconfig
17- ${GLog_LIBRARY}
18- ${GFlags_LIBRARY}
19- ${Boost_LIBRARIES}
20-)
21-
22 add_library(mir_demo_server_loadable MODULE
23 server_example.cpp
24 glog_logger.cpp
25@@ -213,11 +199,11 @@
26 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
27 )
28
29-mir_add_wrapped_executable(mir_demo_server_loader
30+mir_add_wrapped_executable(mir_demo_server
31 mir_demo_server_loader.cpp
32 )
33
34-target_link_libraries(mir_demo_server_loader
35+target_link_libraries(mir_demo_server
36 dl
37 )
38
39
40=== modified file 'examples/mir_demo_server_loader.cpp'
41--- examples/mir_demo_server_loader.cpp 2015-05-19 21:34:34 +0000
42+++ examples/mir_demo_server_loader.cpp 2015-08-11 14:23:35 +0000
43@@ -29,7 +29,7 @@
44 int main(int argc, char const* argv[])
45 try
46 {
47- auto const so = dlopen(library, RTLD_NOW|RTLD_LOCAL);
48+ auto const so = dlopen(library, RTLD_LAZY|RTLD_LOCAL);
49 if (!so) throw std::runtime_error(dlerror());
50
51 int (*loaded_main)(int, char const*[]){nullptr};

Subscribers

People subscribed via source and target branches