Project

General

Profile

Actions

Bug #3516

closed

osmo-trx-lms: Fix memory leaks reported by LeakSanitizer after stopping the process.

Added by pespin over 5 years ago. Updated about 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
LimeSDR
Target version:
-
Start date:
09/03/2018
Due date:
% Done:

100%

Spec Reference:

Description

Scenario: build and run osmo-trx-lms from master with AddressSanitizer enabled, set up the GSM network, register a phone and place a call. Press CTRL+C on osmo-trx-lms, it will stop after a few seconds of shutdown process. Then Leak report will show a huge list of memory leaks.

Actions #1

Updated by pespin over 5 years ago

Similar memory leaks also appear when using CTRL+C to close osmo-trx-uhd when it's connected to an osmo-bts-trx attached to a running network.

Actions #2

Updated by pespin over 5 years ago

More information from report can be obtained by using following env vars:

ASAN_OPTIONS=abort_on_error=1:report_objects=1:fast_unwind_on_malloc=0
LSAN_OPTIONS=report_objects=1:fast_unwind_on_malloc=0

See for more information on the flags:
https://github.com/google/sanitizers/wiki/SanitizerCommonFlags
https://github.com/google/sanitizers/wiki/AddressSanitizerLeakSanitizer

Actions #3

Updated by pespin over 5 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 90

Only 3 memory leaks remain when using osmo-trx-lms after applying following patches:
https://gerrit.osmocom.org/#/c/osmo-trx/+/12061/
https://gerrit.osmocom.org/#/c/osmo-trx/+/12062/
https://gerrit.osmocom.org/#/c/osmo-trx/+/12077/
https://gerrit.osmocom.org/#/c/osmo-trx/+/12085/
https://gerrit.osmocom.org/#/c/osmo-trx/+/12086/

Only 3 memleaks remain and I suspect they are not related to osmo-trx. I opened a ticket in LimeSuite github:
https://github.com/myriadrf/LimeSuite/issues/238

I also opened another issue due to some logging using printf instead of LimeSuite logging callback:
https://github.com/myriadrf/LimeSuite/issues/239

Actions #4

Updated by pespin about 5 years ago

  • Status changed from Feedback to Resolved
  • % Done changed from 90 to 100

mem leaks were fixed, closing.

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)