osmo-bsc/tests
Alexander Chemeris 45f73247ee Fix crash in bsc_patch_mm_info()
osmo-bsc has crashed with the following backtrace:

0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
1  0x00007f0bc49b38db in __GI_abort () at abort.c:100
2  0x00007f0bc581ba30 in osmo_panic () from /usr/lib/x86_64-linux-gnu/libosmocore.so.12
3  0x00005648ceeced69 in conn_get_bts (conn=<optimized out>) at ../../include/osmocom/bsc/gsm_data.h:1392
4  0x00005648cef37164 in conn_get_bts (conn=0x5648cf769e80) at osmo_bsc_filter.c:87
5  bsc_patch_mm_info (conn=conn@entry=0x5648cf769e80, data=<optimized out>, length=<optimized out>) at osmo_bsc_filter.c:48
6  0x00005648cef371b6 in bsc_scan_msc_msg (conn=conn@entry=0x5648cf769e80, msg=msg@entry=0x5648cf77ead0) at osmo_bsc_filter.c:159
7  0x00005648cef33988 in dtap_rcvmsg (msg=0x5648cf72b2f0, length=40, conn=0x5648cf769e80) at osmo_bsc_bssap.c:1215
8  bsc_handle_dt (conn=conn@entry=0x5648cf769e80, msg=0x5648cf72b2f0, len=40) at osmo_bsc_bssap.c:1299
9  0x00005648cef3b2b7 in handle_data_from_msc (msg=<optimized out>, conn=0x5648cf769e80) at osmo_bsc_sigtran.c:152
10 sccp_sap_up (oph=0x5648cf72b378, _scu=<optimized out>) at osmo_bsc_sigtran.c:267
11 0x00007f0bc5813c03 in _osmo_fsm_inst_dispatch () from /usr/lib/x86_64-linux-gnu/libosmocore.so.12
12 0x00007f0bc51a8935 in sccp_scoc_rx_from_scrc (inst=inst@entry=0x5648cf6a8d60, xua=xua@entry=0x5648cf720150) at sccp_scoc.c:1695
13 0x00007f0bc51a62f3 in scrc_rx_mtp_xfer_ind_xua (inst=inst@entry=0x5648cf6a8d60, xua=xua@entry=0x5648cf720150) at sccp_scrc.c:459
14 0x00007f0bc51a9545 in mtp_user_prim_cb (oph=0x5648cf7681f8, ctx=0x5648cf6a8d60) at sccp_user.c:182
15 0x00007f0bc51a09c6 in m3ua_rx_xfer (xua=0x5648cf764a80, asp=0x5648cf45f540) at m3ua.c:586
16 m3ua_rx_msg (asp=asp@entry=0x5648cf45f540, msg=msg@entry=0x5648cf71e880) at m3ua.c:739
17 0x00007f0bc51b0763 in xua_cli_read_cb (conn=0x5648cf441ed0) at osmo_ss7.c:1761
18 0x00007f0bc55fab53 in osmo_stream_cli_read (cli=0x5648cf441ed0) at stream.c:232
19 osmo_stream_cli_fd_cb (ofd=<optimized out>, what=1) at stream.c:321
20 0x00007f0bc580edcf in ?? () from /usr/lib/x86_64-linux-gnu/libosmocore.so.12
21 0x00007f0bc580f526 in osmo_select_main_ctx () from /usr/lib/x86_64-linux-gnu/libosmocore.so.12
22 0x00005648ceecfb2f in main (argc=<optimized out>, argv=<optimized out>) at osmo_bsc_main.c:953

Apparently, there is no lchan allocated at this moment, so
conn_get_bts() crashes. But we only use it to get to "network" which
we can do much easier and safer by doing conn->network.

Change-Id: Id3f7b3efba60c0f050c1be98e5e539f1dab4cd57
2020-05-19 20:33:42 +00:00
..
abis bsc: Send MS Power Control msg upon max MS power change 2019-11-20 15:35:05 +01:00
bsc Fix crash in bsc_patch_mm_info() 2020-05-19 20:33:42 +00:00
codec_pref Fix some typos 2019-11-13 22:10:41 +01:00
gsm0408 bsc: Send MS Power Control msg upon max MS power change 2019-11-20 15:35:05 +01:00
handover handover_test: Properly allocate MSC data struct. 2020-05-11 00:33:05 +03:00
nanobts_omlattr bsc: Send MS Power Control msg upon max MS power change 2019-11-20 15:35:05 +01:00
subscr cosmetic: bsc_subscr_alloc: log initial get 2018-06-08 16:16:42 +00:00
Makefile.am tests/Makefile.am: allow running only one VTY test 2020-03-11 10:35:49 +01:00
atlocal.in Fix repo split aftermath 2017-10-02 08:38:34 +00:00
ctrl_test_runner.py debian, osmoappdesc.py, tests: switch to python 3 2019-12-11 09:31:40 +01:00
gprs_bvci_default.vty osmo-bsc/bsc_vty: set default gprs cell bvci to 2 2020-03-12 12:00:24 +01:00
handover_cfg.vty doc/manuals, vty doc: more handover doc clarifications 2019-07-09 15:42:38 +00:00
neighbor_ident.vty add vty 'no neighbors' to remove all HO targets 2019-08-13 21:45:34 +00:00
osmo-bsc.vty resurrect meas_feed.c: vty, vty-test 2018-05-04 15:02:24 +00:00
testsuite.at inter-BSC HO: add neighbor_ident API to manage neighbor-BSS-cells 2018-07-28 12:18:23 +02:00
vty_test_runner.py debian, osmoappdesc.py, tests: switch to python 3 2019-12-11 09:31:40 +01:00