Bug #5355
closedttcn3-bsc-test: leaked struct bsc_subscr in LCS tests
100%
Description
fixeria reports leaked bsc_subscr in tests
OsmoBSC# show subscriber all IMSI TMSI Use 001018839845904 ffffffff 1 (paging-start) # TC_lcs_loc_req_for_active_ms_ta_req 001015247946574 ffffffff 1 (paging-start) # TC_lcs_loc_req_for_active_ms_le_timeout2 001019330051280 ffffffff 1 (paging-start) # TC_lcs_loc_req_for_active_ms_ta_req 001019060050196 ffffffff 1 (paging-start) # TC_lcs_loc_req_for_active_ms_le_timeout2 001017749471063 ffffffff 1 (paging-start) # TC_cm_service_during_lcs_loc_req
So both TC_lcs_loc_req_for_active_ms_{ta_req,le_timeout2} trigger two subscriber leaks each.
See #5337
Related issues
Updated by neels over 2 years ago
Some time ago I already noticed that the osmo-bsc conn clearing procedure is full of holes.
At the time I started the branch neels/clear to make the gscon FSM waterproof in its release/clear handling.
Then some other things became higher priority, and i lost track a bit.
But now I see that the branch in fact has the proper fix(es) for this leak.
So went back to it now and it didn't take too long to iron out the last bits of it.
Among other things, I add a safeguard timeout for waiting for an SCCP RLSD,
which of course will never arrive when there is no MSC
(the main reason for the leak -- the clear procedure never finishes).
In a second step, I add a tweak so that in case of no SCCP conn being present, we also skip the safeguard timeout
and dealloc the conn immediately, hence drop the use count on bsc_subscr, and fix the conn and subscr leaks.
In BSC_Tests, I verify that the talloc context shows zero bsc_subscr and gsm_subcsriber_connection entries.
Adding this to f_shutdown_helper(), so that most tests will now implicitly safeguard against subscr and conn leaks.
This also means that all tests than run after a leak-provoking test will light up red, from the single earlier leak.
That's because a leaked bsc_subscr stays around in the talloc report forever.
Especially for the "latest" tests, that will look like massive fallout, even though it just shows a long
existing bug.
Still running through the entire BSC_Tests.* to verify, will then post the patches.
Updated by fixeria over 2 years ago
- Related to Bug #5337: ttcn3-bsc-test: leaked struct bsc_subscr in BSC_Tests.TC_no_msc added
Updated by fixeria over 2 years ago
- Status changed from New to Feedback
- Assignee set to neels
neels wrote in #note-1:
Still running through the entire BSC_Tests.* to verify, will then post the patches.
SCNR: are you still running it for ~2 months? :D
AFAICS, the problem has been fixed for master
, but not for latest
, 2021q1
, nor 2021q4
.
Updated by neels over 2 years ago
- Status changed from Feedback to Resolved
- % Done changed from 0 to 100
remaining test failures tracked elsewhere
Updated by fixeria about 2 years ago
- Related to Feature #2781: Extend OsmBSC TTCN-3 test coverage regarding resource leaks added