[MERGED] osmo-msc[master]: trans_free: drop bad assertion

2018-04-10 Thread Neels Hofmeyr
Neels Hofmeyr has submitted this change and it was merged.

Change subject: trans_free: drop bad assertion
..


trans_free: drop bad assertion

I assumed that trans_free() would always be called before freeing the FSM. But
the actual conn free dance that tries to make sure a release is triggered from
all directions actually may run into a situation where conn->fi is NULL.

The situation is described in OS#3125.

For now simply drop the assert.

The subscr conn and FSM dealloc will soon be glued firmly together; but I want
to add a test against OS#3062 before that, and that would also hit above 
assertion.

Related: OS#3125 OS#3062
Change-Id: I5c30e0f9545fb76615776ff6cc16b56aeb5b043a
---
M src/libmsc/transaction.c
1 file changed, 0 insertions(+), 3 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/libmsc/transaction.c b/src/libmsc/transaction.c
index 5b033dc..66b929a 100644
--- a/src/libmsc/transaction.c
+++ b/src/libmsc/transaction.c
@@ -158,9 +158,6 @@
trans->conn = NULL;
talloc_free(trans);
 
-   /* trans_free() should always happen while the fi is still around. */
-   OSMO_ASSERT(conn->fi);
-
/* Possibly this was the last transaction used by this conn. */
subscr_conn_release_when_unused(conn);
 }

-- 
To view, visit https://gerrit.osmocom.org/7702
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5c30e0f9545fb76615776ff6cc16b56aeb5b043a
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


osmo-msc[master]: trans_free: drop bad assertion

2018-04-09 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/7702
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I5c30e0f9545fb76615776ff6cc16b56aeb5b043a
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[PATCH] osmo-msc[master]: trans_free: drop bad assertion

2018-04-09 Thread Neels Hofmeyr

Review at  https://gerrit.osmocom.org/7702

trans_free: drop bad assertion

I assumed that trans_free() would always be called before freeing the FSM. But
the actual conn free dance that tries to make sure a release is triggered from
all directions actually may run into a situation where conn->fi is NULL.

The situation is described in OS#3125.

For now simply drop the assert.

The subscr conn and FSM dealloc will soon be glued firmly together; but I want
to add a test against OS#3062 before that, and that would also hit above 
assertion.

Related: OS#3125 OS#3062
Change-Id: I5c30e0f9545fb76615776ff6cc16b56aeb5b043a
---
M src/libmsc/transaction.c
1 file changed, 0 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/02/7702/1

diff --git a/src/libmsc/transaction.c b/src/libmsc/transaction.c
index 5b033dc..66b929a 100644
--- a/src/libmsc/transaction.c
+++ b/src/libmsc/transaction.c
@@ -158,9 +158,6 @@
trans->conn = NULL;
talloc_free(trans);
 
-   /* trans_free() should always happen while the fi is still around. */
-   OSMO_ASSERT(conn->fi);
-
/* Possibly this was the last transaction used by this conn. */
subscr_conn_release_when_unused(conn);
 }

-- 
To view, visit https://gerrit.osmocom.org/7702
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5c30e0f9545fb76615776ff6cc16b56aeb5b043a
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr