This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged.
Change subject: trans_free: safeguard against a still running CC timer on free
......................................................................
trans_free: safeguard against a still running CC timer on free
Make sure to deactivate trans.cc.timer when freeing a CC transaction.
Log an error if should be necessary.
This prevents a segfault when we receive a BSSMAP Clear Request from BSC during
an ongoing CC operation. The BSSMAP Clear Request currently triggers immediate
freeing of the conn, while we should still do a graceful release first. While
this patch does not fix the underlying error, it does prevent the MSC from
crashing due to a stale timer, whatever the cause might be.
Related: OS#3062
Change-Id: I86b666f23402a6d94af2d903e514770d1fd5157f
---
M src/libmsc/transaction.c
1 file changed, 9 insertions(+), 0 deletions(-)
Approvals:
dexter: Looks good to me, but someone else must approve
Harald Welte: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/libmsc/transaction.c b/src/libmsc/transaction.c
index f500326..cdaba9c 100644
--- a/src/libmsc/transaction.c
+++ b/src/libmsc/transaction.c
@@ -121,6 +121,15 @@
switch (trans->protocol) {
case GSM48_PDISC_CC:
_gsm48_cc_trans_free(trans);
+ if (osmo_timer_pending(&trans->cc.timer)) {
+ LOGP(DCC, LOGL_ERROR,
+ "%s Timer 0x%x is still running while discarding transaction"
+ " -- this is a bug: we were still expecting a response but"
+ " are freeing the transaction anyway\n",
+ vlr_subscr_name(trans->conn->vsub), trans->cc.Tcurrent);
+ osmo_timer_del(&trans->cc.timer);
+ trans->cc.Tcurrent = 0;
+ }
conn_usage_token = MSC_CONN_USE_TRANS_CC;
break;
case GSM48_PDISC_SMS:
--
To view, visit https://gerrit.osmocom.org/7273
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I86b666f23402a6d94af2d903e514770d1fd5157f
Gerrit-PatchSet: 3
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>