Project

General

Profile

Actions

Feature #2781

open

Extend OsmBSC TTCN-3 test coverage regarding resource leaks

Added by laforge about 6 years ago. Updated almost 2 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
12/22/2017
Due date:
% Done:

60%

Spec Reference:

Description

let's collect ideas about what we need to test here


Checklist

  • check for memory leaks of bsc_subscriber
  • check for memory leaks of bsc_subscriber_conn
  • check for memory leaks of SCCP connections

Related issues

Related to libosmocore - Feature #2712: implement reproducible talloc context printout, i.e. without memory addressesNew12/06/2017

Actions
Related to OsmoBSC - Bug #2780: OsmoBSC memory leak on bsc_subscriberClosedlaforge12/22/2017

Actions
Related to OsmoBSC - Bug #5355: ttcn3-bsc-test: leaked struct bsc_subscr in LCS testsResolvedneels12/13/2021

Actions
Related to OsmoBSC - Bug #5337: ttcn3-bsc-test: leaked struct bsc_subscr in BSC_Tests.TC_no_mscResolvedfixeria12/05/2021

Actions
Actions #1

Updated by laforge over 5 years ago

  • Assignee deleted (laforge)
Actions #2

Updated by laforge over 4 years ago

  • Subject changed from Extend OsmBSC TTCN-3 test coverage to Extend OsmBSC TTCN-3 test coverage regarding resource leaks
Actions #3

Updated by laforge over 4 years ago

  • Related to Feature #2712: implement reproducible talloc context printout, i.e. without memory addresses added
Actions #4

Updated by laforge almost 4 years ago

Actions #5

Updated by fixeria almost 2 years ago

  • Related to Bug #2780: OsmoBSC memory leak on bsc_subscriber added
Actions #6

Updated by fixeria almost 2 years ago

  • Related to Bug #5355: ttcn3-bsc-test: leaked struct bsc_subscr in LCS tests added
Actions #7

Updated by fixeria almost 2 years ago

  • Related to Bug #5337: ttcn3-bsc-test: leaked struct bsc_subscr in BSC_Tests.TC_no_msc added
Actions #8

Updated by fixeria almost 2 years ago

  • Checklist item check for memory leaks of bsc_subscriber set to Done
  • Checklist item check for memory leaks of bsc_subscriber_conn set to Done
  • Status changed from New to Feedback
  • Assignee set to neels
  • % Done changed from 0 to 60

As far as I can see, in f_shutdown_helper() we do check for memory leaks of:

  • struct bsc_subscr, and
  • struct gsm_subscriber_connection.

Assigning to neels who implemented the related checks.

Actions #9

Updated by neels almost 2 years ago

that's true, this check was added fairly recently in https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26619
after subscr leaks were discovered and fixed in osmo-bsc.
Many BSC tests also required tweaks to properly release conns in the end.

If an SCCP conn also shows in the talloc_report as a distinct type of struct,
we can add the same check against SCCP leaks rather trivially
by adding the name to that talloc check...

These checks of course assume that each test runs alone without unrelated conns being active.
I think the original idea for TTCN3 tests was to at some point be able to run them in parallel.
The reality is that for years the tests are running one by one, so it seemed reasonable to require that they do.

Actions #10

Updated by neels almost 2 years ago

well, the SCCP conn id is kept in struct bsc_subscriber_conn.
That means we already check for SCCP conn leaks, as far as osmo-bsc's state is concerned.
What else can we do, probably count the open conn IDs on TTCN3 side in the MSC_ConnectionHandler?

Actions #11

Updated by laforge almost 2 years ago

Lets not add strange assumptions. The entire complex infrastructure we've built with protocol emulations dispatching different connections to different components makes no sense if you cannot run tests in parallel. I also do think we have (non BSC) tests where we do in fact already execute tests in parallel.

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)