Surfaces are not properly released in CustomWindowManagement.state_change_requests_are_associated_with_correct_surface

Bug #1445418 reported by Alexandros Frantzis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Fix Released
Low
Alexandros Frantzis
mir (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Memory leak in CustomWindowManagement, state_change_requests_are_associated_with_correct_surface is causing CI failures in unrelated tests.

Seen in https://jenkins.qa.ubuntu.com/job/mir-vivid-amd64-ci/1537/consoleFull:

7: ==13773== 1,359,533 (14,960 direct, 1,344,573 indirect) bytes in 17 blocks are definitely lost in loss record 127 of 127
7: ==13773== at 0x4C2C100: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
7: ==13773== by 0x8E5C24: MirConnection::create_surface(MirSurfaceSpec const&, void (*)(MirSurface*, void*), void*) (mir_connection.cpp:147)
7: ==13773== by 0x8D682F: mir_surface_create (mir_surface_api.cpp:149)
7: ==13773== by 0x8D6A1A: mir_surface_create_sync (mir_surface_api.cpp:133)
7: ==13773== by 0x6D9FC7: (anonymous namespace)::Client::surface_create() const (test_custom_window_management.cpp:77)
...

It's strange that the leak is not consistently detected by valgrind.

Related branches

Revision history for this message
Alexandros Frantzis (afrantzis) wrote : Re: Surfaces are not properly released in CustomWindowManagement, state_change_requests_are_associated_with_correct_surface

The memory leak is the indirect result of improper linking (https://bugs.launchpad.net/mir/+bug/1445473).

The effect can be worked around by properly releasing the surfaces, instead of letting them be released at MirConnection release time.

summary: - Memory leak in CustomWindowManagement,
- state_change_requests_are_associated_with_correct_surface is causing CI
- failures in unrelated tests
+ Surfaces are not properly released in CustomWindowManagement,
+ state_change_requests_are_associated_with_correct_surface
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

Changed priority to low since forgetting to release the surfaces would not normally lead to a leak (since we free any forgotten surface at MirConnection release time).

Changed in mir:
importance: High → Low
status: New → In Progress
milestone: none → 0.13.0
summary: - Surfaces are not properly released in CustomWindowManagement,
- state_change_requests_are_associated_with_correct_surface
+ Surfaces are not properly released in
+ CustomWindowManagement.state_change_requests_are_associated_with_correct_surface
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:mir at revision None, scheduled for release in mir, milestone 0.13.0

Changed in mir:
status: In Progress → Fix Committed
Changed in mir:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mir - 0.13.1+15.10.20150520-0ubuntu1

---------------
mir (0.13.1+15.10.20150520-0ubuntu1) wily; urgency=medium

  [ Cemil Azizoglu ]
  * New upstream release 0.13.1 (https://launchpad.net/mir/+milestone/0.13.1)
    - ABI summary: No ABI break. Servers and clients do not need rebuilding.
      . Mirclient ABI unchanged at 8
      . Mircommon ABI unchanged at 4
      . Mirplatform ABI unchanged at 7
      . Mirserver ABI unchanged at 31
    - Bug fixes:
      . Can't load app purchase UI without a U1 account (LP: #1450377)
      . Crash because uncaught exception in mir::events::add_touch (LP: #1437357)

 -- CI Train Bot <email address hidden> Wed, 20 May 2015 21:20:15 +0000

Changed in mir (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.