aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-07-23 14:24:10 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2020-07-23 14:24:15 +0200
commit82a35a1dbff849ecf16b7c70de4c1c7786704b2e (patch)
tree270e10e903ee3aeab9d531b606570857e2145ad8
parent4479c94fd11f3a7a7101c49a76b9511be2f4cbbb (diff)
bts-trx: Fix osmocom dyn ts assert hit during Adm State Unlock
How to reproduce: * Configure a TS to be TCH/F_TCH/H_PDCH in osmo-bsc.cfg * Run the network with osmo-bts-trx, then use osmo-bsc's "rf_locked 1" * Then, unlock it: "rf_locked 0" * The following assert will be hit: Assert failed ts->dyn.pchan_is == ts->dyn.pchan_want /osmo-bts/src/osmo-bts-trx/l1_if.c:349 """ (gdb) bt #0 0x00007ffff5bb9355 in raise () from /usr/lib/libc.so.6 #1 0x00007ffff5ba2853 in abort () from /usr/lib/libc.so.6 #2 0x00007ffff6832361 in osmo_panic_default ( fmt=0x555555814e60 "Assert failed %s %s:%d\n", args=0x7fffffffc6e0) at /libosmocore/src/panic.c:49 #3 0x00007ffff683249d in osmo_panic ( fmt=0x555555814e60 "Assert failed %s %s:%d\n") at /libosmocore/src/panic.c:84 #4 0x000055555570fdf7 in trx_set_ts (ts=0x7ffff1e6bce8) at /osmo-bts/src/osmo-bts-trx/l1_if.c:349 #5 0x00005555557133c1 in bts_model_chg_adm_state (bts=0x627000000160, mo=0x7ffff1e0f8a0, obj=0x7ffff1e0f860, adm_state=2 '\002') at /osmo-bts/src/osmo-bts-trx/l1_if.c:681 #6 0x0000555555769978 in oml_rx_chg_adm_state (bts=0x627000000160, msg=0x633000003e00) at /osmo-bts/src/common/oml.c:1044 #7 0x000055555576a8d3 in down_fom (bts=0x627000000160, msg=0x633000003e00) at /osmo-bts/src/common/oml.c:1129 #8 0x0000555555770aed in down_oml (bts=0x627000000160, msg=0x633000003e00) at /osmo-bts/src/common/oml.c:1476 #9 0x00005555557f8174 in sign_link_cb (msg=0x633000003e00) at /osmo-bts/src/common/abis.c:188 #10 0x00007ffff73b5935 in ipaccess_bts_read_cb (link=0x6120000030a0, --Type <RET> for more, q to quit, c to continue without paging-- msg=0x633000003e00) at /libosmo-abis/src/input/ipaccess.c:980 #11 0x00007ffff73a1060 in ipa_client_read (link=0x6120000030a0) at /libosmo-abis/src/input/ipa.c:72 #12 0x00007ffff73a2458 in ipa_client_fd_cb (ofd=0x62f000038a50, what=1) at /libosmo-abis/src/input/ipa.c:136 #13 0x00007ffff67ebfa7 in osmo_fd_disp_fds (_rset=0x7fffffffdda0, _wset=0x7fffffffde40, _eset=0x7fffffffdee0) at /libosmocore/src/select.c:227 #14 0x00007ffff67ec38c in _osmo_select_main (polling=0) at /libosmocore/src/select.c:265 #15 0x00007ffff67ec46b in osmo_select_main (polling=0) at /libosmocore/src/select.c:274 #16 0x00005555557ef089 in bts_main (argc=7, argv=0x7fffffffe208) at /osmo-bts/src/common/main.c:354 #17 0x00005555556fe621 in main (argc=7, argv=0x7fffffffe208) at /osmo-bts/src/osmo-bts-trx/main.c:176 """ Related: OS#4920 Change-Id: Ia3210e24b921fd0c67f77068b7ef4a65f270cd11
-rw-r--r--src/osmo-bts-trx/l1_if.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c
index d65900fe..bc936c0b 100644
--- a/src/osmo-bts-trx/l1_if.c
+++ b/src/osmo-bts-trx/l1_if.c
@@ -678,6 +678,13 @@ int bts_model_chg_adm_state(struct gsm_bts *bts, struct gsm_abis_mo *mo,
/* Activate timeslots in scheduler and start power ramp up */
for (i = 0; i < ARRAY_SIZE(trx->ts); i++) {
struct gsm_bts_trx_ts *ts = &trx->ts[i];
+ if (ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH) {
+ /* dyn.pchan_is is set to GSM_PCHAN_NONE when
+ * internally deactivated during locking. Simply
+ * internally restore the old status here.
+ */
+ ts->dyn.pchan_is = ts->dyn.pchan_want;
+ }
trx_set_ts(ts);
}
rc = l1if_trx_start_power_ramp(trx, bts_model_chg_adm_state_ramp_compl_cb);