pespin has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-pcu/+/36450?usp=email )
Change subject: Make sure GprsMs free() also frees its tbfs
......................................................................
Make sure GprsMs free() also frees its tbfs
This fixes TBF objects leaking and ending up alive when the MS object is
explicitly freed through talloc_free (and sporadically
crashing TbfTest once a timeout for them occur).
This mostly affects unit tests, where most of the explicit free()
happens.
In osmo-pcu, in general, the GprsMs object only gets _free() called when
its resource count reaches 0, aka no more TBFs are attached to it. Hence
in general GprsMs object is freed() only when no TBFs (to be leaked) are
present.
However, in the unit tests it's usual that we want to wipe the entire
context by eg. feeing the PCU, the BTS or MS object, which should also
free the related TBFs.
When running osmo-pcu this may only be an issue when the MS object is
freed explicitly, which could happen for instance when a BTS is torn down,
ie. PCUIF going down, moment at which all GprsMs of that BTS are freed.
But in there actually it iterates over PDCHs to free all TBFs, so it's
fine.
If we iterated over MS, this could have ended up in a crash, like
it happened in TbfTest sporadically, but it's not a bit problem if we
crash + restart at that time since anyway the BTS is gone ore just
getting up around that time.
Related: OS#6359
Change-Id: Ibbdec94acb8132be20508d3178d88da44bfaf91d
---
M src/gprs_ms.c
M tests/alloc/AllocTest.err
M tests/ms/MsTest.cpp
M tests/ms/MsTest.err
M tests/ms/MsTest.ok
M tests/tbf/TbfTest.err
M tests/types/TypesTest.err
M tests/ulc/PdchUlcTest.err
8 files changed, 4,990 insertions(+), 94 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/50/36450/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/36450?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ibbdec94acb8132be20508d3178d88da44bfaf91d
Gerrit-Change-Number: 36450
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-CC: Jenkins Builder
Gerrit-MessageType: newpatchset
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/36449?usp=email )
Change subject: cosmetic: TbfTest: fix typo in comment
......................................................................
cosmetic: TbfTest: fix typo in comment
Change-Id: I35bb28c5669747823b0dfebe27ecd7a5a0c5d60f
---
M tests/tbf/TbfTest.cpp
1 file changed, 10 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/49/36449/1
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index 0205f2b..643551b 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -2525,7 +2525,7 @@
osmo_fsm_inst_dispatch(ms_dl_tbf(second_ms)->state_fi, TBF_EV_ASSIGN_PCUIF_CNF, NULL);
osmo_select_main(0);
- /* get the PACCH PktDlAss for the DL-TBF, allocated one the UL-TBF from the new MS obj: */
+ /* get the PACCH PktDlAss for the DL-TBF, allocated on the UL-TBF from the new MS obj: */
request_dl_rlc_block(dl_tbf->bts, dl_tbf->control_ts, &fn);
fprintf(stderr, "=== end %s ===\n", __func__);
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/36449?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I35bb28c5669747823b0dfebe27ecd7a5a0c5d60f
Gerrit-Change-Number: 36449
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: fixeria.
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/36371?usp=email )
Change subject: ttcn3-*-test: set OSMO_SUT_{HOST,PORT} for more testsuites
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/36371?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Iaa94dd200fdb98962b784cb507c9995096232dc9
Gerrit-Change-Number: 36371
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 25 Mar 2024 16:05:02 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment