Mir

Merge lp://qastaging/~afrantzis/mir/fix-1335741-surface-destruction-after-teardown into lp://qastaging/mir

Proposed by Alexandros Frantzis
Status: Rejected
Rejected by: Alexandros Frantzis
Proposed branch: lp://qastaging/~afrantzis/mir/fix-1335741-surface-destruction-after-teardown
Merge into: lp://qastaging/mir
Diff against target: 50 lines (+9/-4)
1 file modified
tests/acceptance-tests/test_client_surface_events.cpp (+9/-4)
To merge this branch: bzr merge lp://qastaging/~afrantzis/mir/fix-1335741-surface-destruction-after-teardown
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Alan Griffiths Needs Fixing
Cemil Azizoglu (community) Approve
Review via email: mp+224961@code.qastaging.launchpad.net

Commit message

tests: Don't keep surfaces alive and try to destroy them after the server has been torn down

The server is torn down during TearDown() but we keep a surface alive after that and try to destroy it when destroying the test fixture, leading to occasional crashes.

Description of the change

tests: Don't keep surfaces alive and try to destroy them after the server has been torn down

The server is torn down during TearDown() but we keep a surface alive after that and try to destroy it when destroying the test fixture, leading to occasional crashes.

It is debatable whether we should handle this case more gracefully in the server itself. For further investigation here is the address sanitizer backtrace of the problem:

http://paste.ubuntu.com/7725250/

To post a comment you must log in.
Revision history for this message
Cemil Azizoglu (cemil-azizoglu) wrote :

Looks good (for now).

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

I have difficulty reproducing. (I see intermittent "Invalid write" errors with and without this fix but not lp:1335741.)

I think it is simpler to add "scene_surface.reset();" in ClientSurfaceEvents::TearDown() - before the server is torn down in "BasicClientServerFixture::TearDown();".

Does that work for those that can reproduce?

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

I don't think this fix is related to lp:1335741. I also think it can be simplified as above.

lp:1335741 reports an error during the test, not during teardown and can be "fixed" by adding the following line to the start of client_can_query_current_orientation:

    EXPECT_FALSE(wait_for_event(mir_event_type_orientation, std::chrono::milliseconds(1)));

That isn't a *good* fix but it does strongly suggests that the problem there is with setup not teardown.

So, I suggest we should break the association with lp:1335741 and then land this (or something equivalent).

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

Unmerged revisions

1732. By Alexandros Frantzis

tests: Don't keep surfaces alive and try to destroy them after the server has been torn down

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches