laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/28481 )
Change subject: xua_snm: assert to guard against NULL ptr
......................................................................
xua_snm: assert to guard against NULL ptr
This is similarly done for same IE in other functions, so let's do it
here too in order to make coverity happy, and avoid random access ptr
probably ending up in obscure crash.
Fixes: Coverity CID#272994
Change-Id: I72059ffaa608bb4f5c4bd274645878e0b31ed6e0
---
M src/xua_snm.c
1 file changed, 2 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/src/xua_snm.c b/src/xua_snm.c
index 1212162..c7d0d2e 100644
--- a/src/xua_snm.c
+++ b/src/xua_snm.c
@@ -464,6 +464,8 @@
const uint32_t *cong_level = xua_msg_get_u32p(xua, M3UA_IEI_CONG_IND, &_cong_level);
int log_ss = osmo_ss7_asp_get_log_subsys(asp);
+ OSMO_ASSERT(ie_aff_pc);
+
LOGPASP(asp, log_ss, LOGL_NOTICE, "RX SCON(%s) for %s level=%u\n", info_str ? info_str : "",
format_affected_pcs_c(xua, asp->inst, ie_aff_pc), cong_level ? *cong_level : 0);
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/28481
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I72059ffaa608bb4f5c4bd274645878e0b31ed6e0
Gerrit-Change-Number: 28481
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged
Attention is currently required from: pespin.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/28481 )
Change subject: xua_snm: assert to guard against NULL ptr
......................................................................
Patch Set 1: Code-Review+2
(1 comment)
Patchset:
PS1:
note that we can only do this here because we have previous codee which will reject (gracefully, at protocol level) if messages without mandatory IEs are received. Otherwise we of course don't want to ASSERT in case of a missing IE.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/28481
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I72059ffaa608bb4f5c4bd274645878e0b31ed6e0
Gerrit-Change-Number: 28481
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 01 Jul 2022 14:23:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/28492 )
Change subject: coverity/local_test.sh: new file
......................................................................
coverity/local_test.sh: new file
Add the script I've used to locally reproduce the build failure and fix
it.
Change-Id: I12241499a0669559bc40eb3e76f967a7c6a2dc70
---
M coverity/jenkins.sh
A coverity/local_test.sh
2 files changed, 15 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/coverity/jenkins.sh b/coverity/jenkins.sh
index 0ae7fd7..b02b82e 100755
--- a/coverity/jenkins.sh
+++ b/coverity/jenkins.sh
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
+# Use 'local_test.sh' during development
set -e -x
diff --git a/coverity/local_test.sh b/coverity/local_test.sh
new file mode 100755
index 0000000..4ac1307
--- /dev/null
+++ b/coverity/local_test.sh
@@ -0,0 +1,14 @@
+#!/bin/sh -ex
+# Use this script for local testing of the prepare source and build scripts
+SCRIPT_DIR="$(dirname "$(realpath "$0")")"
+
+export SRC_SKIP_FETCH=1
+export SRC_CLEAN=1
+
+mkdir -p /tmp/coverity
+cp "$SCRIPT_DIR"/* /tmp/coverity
+
+cd /tmp/coverity
+
+./prepare_source_Osmocom.sh
+./build_Osmocom.sh
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/28492
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I12241499a0669559bc40eb3e76f967a7c6a2dc70
Gerrit-Change-Number: 28492
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-cbc/+/28496 )
Change subject: Move peer to DELETED state before signalling parent FSM with DELETE_(N)ACK
......................................................................
Move peer to DELETED state before signalling parent FSM with DELETE_(N)ACK
When receiving SMSCB_E_CBSP_DELETE_(N)ACK, smscb_message_fsm will iterate
over all peers to find out if some of them has still not ended, and in
that case delay sending an HTTP result.
However, the peer was sending the signal before moving to DELETED state,
and hence smscb_message_fsm would never send the HTTP result until T3
(T_WAIT_DELETE_ACK) would time out after it:
"""
20220629104312596 DCBSP INFO SMSCB-PEER(TTCN-3-44-ttcn3)[0x560b46c1f770]{WAIT_DELETE_ACK}: Received Event DELETE_ACK (cbsp_server_fsm.c:348)
20220629104312596 DCBSP INFO SMSCB(TTCN-3-44)[0x560b46c1f090]{WAIT_DELETE_ACK}: Received Event DELETE_ACK (smscb_peer_fsm.c:423)
20220629104312596 DCBSP INFO SMSCB-PEER(TTCN-3-44-ttcn3)[0x560b46c1f770]{WAIT_DELETE_ACK}: state_chg to DELETED (smscb_peer_fsm.c:424)
20220629104327599 DCBSP INFO SMSCB(TTCN-3-44)[0x560b46c1f090]{WAIT_DELETE_ACK}: Timeout of T3 (fsm.c:317)
20220629104327599 DREST DEBUG rest_it_op_complete(op=0x7fd09c001490) complete (rest_it_op.c:129)
20220629104327599 DCBSP INFO SMSCB(TTCN-3-44)[0x560b46c1f090]{WAIT_DELETE_ACK}: state_chg to DELETED (smscb_message_fsm.c:294)
20220629104327599 DREST DEBUG rest_it_op completed with 0 (HTTP 0) (rest_it_op.c:68)
"""
Change-Id: Idb418728e1242fc5436355ccf73f20b1419e1eb8
---
M src/smscb_peer_fsm.c
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/src/smscb_peer_fsm.c b/src/smscb_peer_fsm.c
index 08b0f3f..21f17e6 100644
--- a/src/smscb_peer_fsm.c
+++ b/src/smscb_peer_fsm.c
@@ -419,9 +419,9 @@
/* append results */
msg_peer_append_cbsp_compl(mp, &dec->u.kill_compl.num_compl_list);
msg_peer_append_cbsp_cell(mp, &dec->u.kill_compl.cell_list);
+ osmo_fsm_inst_state_chg(fi, SMSCB_S_DELETED, 0, 0);
/* Signal parent fsm about completion */
osmo_fsm_inst_dispatch(fi->proc.parent, SMSCB_E_CBSP_DELETE_ACK, mp);
- osmo_fsm_inst_state_chg(fi, SMSCB_S_DELETED, 0, 0);
break;
case SMSCB_E_CBSP_DELETE_NACK:
dec = data;
@@ -429,9 +429,9 @@
msg_peer_append_cbsp_compl(mp, &dec->u.kill_fail.num_compl_list);
msg_peer_append_cbsp_cell(mp, &dec->u.kill_fail.cell_list);
msg_peer_append_cbsp_fail(mp, &dec->u.kill_fail.fail_list);
+ osmo_fsm_inst_state_chg(fi, SMSCB_S_DELETED, 0, 0);
/* Signal parent fsm about completion */
osmo_fsm_inst_dispatch(fi->proc.parent, SMSCB_E_CBSP_DELETE_NACK, mp);
- osmo_fsm_inst_state_chg(fi, SMSCB_S_DELETED, 0, 0);
break;
default:
OSMO_ASSERT(0);
--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28496
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: Idb418728e1242fc5436355ccf73f20b1419e1eb8
Gerrit-Change-Number: 28496
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-cbc/+/28493 )
Change subject: Configure libosmocore logging system as multithread
......................................................................
Configure libosmocore logging system as multithread
OsmoCBC uses libulfius, which creates its own thread(s).
Hence, we must set up osmocom logging system appropiately so that
relevant stuff is protected by locks.
Related: OS#5598
Change-Id: Ic06edc19d22b90e2b6b7de3a25d62cda5001f46e
---
M src/cbc_main.c
1 file changed, 1 insertion(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/src/cbc_main.c b/src/cbc_main.c
index 140d047..4b64c91 100644
--- a/src/cbc_main.c
+++ b/src/cbc_main.c
@@ -212,6 +212,7 @@
tall_rest_ctx = talloc_named_const(tall_cbc_ctx, 0, "REST");
msgb_talloc_ctx_init(tall_cbc_ctx, 0);
osmo_init_logging2(tall_cbc_ctx, &log_info);
+ log_enable_multithread();
osmo_stats_init(tall_cbc_ctx);
vty_init(&vty_info);
--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28493
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: Ic06edc19d22b90e2b6b7de3a25d62cda5001f46e
Gerrit-Change-Number: 28493
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: merged