Mir

Merge lp:~afrantzis/mir/fix-1506137-ci-blocker into lp:mir

Proposed by Alexandros Frantzis
Status: Merged
Approved by: Daniel van Vugt
Approved revision: no longer in the source branch.
Merged at revision: 3071
Proposed branch: lp:~afrantzis/mir/fix-1506137-ci-blocker
Merge into: lp:mir
Diff against target: 59 lines (+9/-7)
4 files modified
src/include/server/mir/default_server_configuration.h (+6/-0)
src/platforms/android/server/platform.cpp (+1/-1)
src/platforms/android/server/platform.h (+2/-0)
src/server/graphics/default_configuration.cpp (+0/-6)
To merge this branch: bzr merge lp:~afrantzis/mir/fix-1506137-ci-blocker
Reviewer Review Type Date Requested Status
Daniel van Vugt Approve
PS Jenkins bot (community) continuous-integration Approve
Alan Griffiths Needs Fixing
Kevin DuBois (community) Approve
Review via email: mp+276410@code.launchpad.net

Commit message

Replace static objects which cause various teardown issues with instance objects

Description of the change

Replace static objects which cause various teardown issues with instance objects

To post a comment you must log in.
Revision history for this message
Kevin DuBois (kdub) wrote :

looks good to me, I guess we'll see if CI turns green

review: Approve
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 :

I see a bunch of segfaults. E.g.

[ RUN ] ShellSurfaceConfiguration.the_window_manager_is_notified_of_attribute_changes
/home/alan/display_server/mir4/tools/detect_fd_leaks.bash: line 84: 2956 Segmentation fault (core dumped) $@ 2>&1
...
[ RUN ] ClientMirSurface.sends_optional_params
/home/alan/display_server/mir4/tools/detect_fd_leaks.bash: line 84: 2954 Segmentation fault (core dumped) $@ 2>&1
...
[ RUN ] DebugAPI.translates_surface_coordinates_to_screen_coordinates
/home/alan/display_server/mir4/tools/detect_fd_leaks.bash: line 84: 2947 Segmentation fault (core dumped) $@ 2>&1

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

> I see a bunch of segfaults. E.g.
>
> [ RUN ]
> ShellSurfaceConfiguration.the_window_manager_is_notified_of_attribute_changes
> /home/alan/display_server/mir4/tools/detect_fd_leaks.bash: line 84: 2956
> Segmentation fault (core dumped) $@ 2>&1
> ...
> [ RUN ] ClientMirSurface.sends_optional_params
> /home/alan/display_server/mir4/tools/detect_fd_leaks.bash: line 84: 2954
> Segmentation fault (core dumped) $@ 2>&1
> ...
> [ RUN ] DebugAPI.translates_surface_coordinates_to_screen_coordinates
> /home/alan/display_server/mir4/tools/detect_fd_leaks.bash: line 84: 2947
> Segmentation fault (core dumped) $@ 2>&1

The above errors are seen with "make ptest" - "make test" seems to work.

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

> > I see a bunch of segfaults. E.g.
> >
> > [ RUN ]
> >
> ShellSurfaceConfiguration.the_window_manager_is_notified_of_attribute_changes
> > /home/alan/display_server/mir4/tools/detect_fd_leaks.bash: line 84: 2956
> > Segmentation fault (core dumped) $@ 2>&1
> > ...
> > [ RUN ] ClientMirSurface.sends_optional_params
> > /home/alan/display_server/mir4/tools/detect_fd_leaks.bash: line 84: 2954
> > Segmentation fault (core dumped) $@ 2>&1
> > ...
> > [ RUN ] DebugAPI.translates_surface_coordinates_to_screen_coordinates
> > /home/alan/display_server/mir4/tools/detect_fd_leaks.bash: line 84: 2947
> > Segmentation fault (core dumped) $@ 2>&1
>
> The above errors are seen with "make ptest" - "make test" seems to work.

All my fault - Fix is here:
https://code.launchpad.net/~andreas-pokorny/mir/fix-ptest/+merge/276470

Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

^PPA failure above..

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Awesome.

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/default_server_configuration.h'
2--- src/include/server/mir/default_server_configuration.h 2015-10-29 16:09:36 +0000
3+++ src/include/server/mir/default_server_configuration.h 2015-11-02 15:56:02 +0000
4@@ -349,6 +349,12 @@
5 virtual std::shared_ptr<ServerActionQueue> the_server_action_queue();
6 virtual std::shared_ptr<SharedLibraryProberReport> the_shared_library_prober_report();
7
8+private:
9+ // We need to ensure the platform library is destroyed last as the
10+ // DisplayConfiguration can hold weak_ptrs to objects created from the library
11+ // TODO: We need a better way to manage the lifetimes of platform libraries
12+ std::shared_ptr<mir::SharedLibrary> platform_library;
13+
14 protected:
15 std::shared_ptr<options::Option> the_options() const;
16
17
18=== modified file 'src/platforms/android/server/platform.cpp'
19--- src/platforms/android/server/platform.cpp 2015-10-30 01:16:32 +0000
20+++ src/platforms/android/server/platform.cpp 2015-11-02 15:56:02 +0000
21@@ -105,7 +105,7 @@
22 //LP: 1371619. Some devices cannot call gralloc's open()/close() function repeatedly without crashing
23 static std::mutex allocator_mutex;
24 std::unique_lock<std::mutex> lk(allocator_mutex);
25- static std::shared_ptr<mg::GraphicBufferAllocator> preserved_allocator;
26+
27 if (!preserved_allocator)
28 preserved_allocator = std::make_shared<mga::AndroidGraphicBufferAllocator>(quirks);
29 return preserved_allocator;
30
31=== modified file 'src/platforms/android/server/platform.h'
32--- src/platforms/android/server/platform.h 2015-10-07 02:34:05 +0000
33+++ src/platforms/android/server/platform.h 2015-11-02 15:56:02 +0000
34@@ -59,6 +59,8 @@
35 std::shared_ptr<PlatformIpcOperations> const ipc_operations;
36 std::shared_ptr<DeviceQuirks> const quirks;
37 OverlayOptimization const overlay_option;
38+
39+ std::shared_ptr<graphics::GraphicBufferAllocator> preserved_allocator;
40 };
41
42 }
43
44=== modified file 'src/server/graphics/default_configuration.cpp'
45--- src/server/graphics/default_configuration.cpp 2015-10-30 01:16:32 +0000
46+++ src/server/graphics/default_configuration.cpp 2015-11-02 15:56:02 +0000
47@@ -48,12 +48,6 @@
48 namespace ml = mir::logging;
49 namespace mgn = mir::graphics::nested;
50
51-namespace
52-{
53-// TODO: Temporary, until we actually manage module lifetimes
54-static std::shared_ptr<mir::SharedLibrary> platform_library;
55-}
56-
57 std::shared_ptr<mg::DisplayConfigurationPolicy>
58 mir::DefaultServerConfiguration::the_display_configuration_policy()
59 {

Subscribers

People subscribed via source and target branches