Project

General

Profile

Actions

Bug #5282

closed

ttcn3-sip-test is broken since build #1342

Added by fixeria about 1 year ago. Updated 2 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Start date:
10/27/2021
Due date:
% Done:

100%

Spec Reference:

Description

Basically all test cases started to fail a few days ago:

https://jenkins.osmocom.org/jenkins/view/TTCN3/job/ttcn3-sip-test/1342/

 /osmo-ttcn3-hacks/sip/SIP_Tests: Segmentation fault occurred
/usr/lib/titan/libttcn3-parallel-dynamic.so(_Z14signal_handleri+0xa3)[0x7f076b36a363]
/lib/x86_64-linux-gnu/libc.so.6(+0x33060)[0x7f07697bd060]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x14)[0x7f0769805524]
/usr/lib/titan/libttcn3-parallel-dynamic.so(Free+0xe)[0x7f076b359e8e]
/osmo-ttcn3-hacks/sip/UD_PT.so(_ZN12UD__PortType15UD__PT_PROVIDER24Handle_Fd_Event_ReadableEi+0x1de)[0x7f076b7db66e]
/usr/lib/titan/libttcn3-parallel-dynamic.so(_ZN19Fd_And_Timeout_User13call_handlersEi+0x56d)[0x7f076b32e3bd]
/usr/lib/titan/libttcn3-parallel-dynamic.so(_ZN13TTCN_Snapshot8take_newEb+0x387)[0x7f076b32eaf7]
/osmo-ttcn3-hacks/sip/MNCC_Emulation.so(_ZN15MNCC__Emulation5main_ERKNS_7MnccOpsERK10CHARSTRINGS5_RK7BOOLEAN+0x140a)[0x7f07829570d0]
/osmo-ttcn3-hacks/sip/MNCC_Emulation.so(_ZN15MNCC__Emulation18start_ptc_functionEPKcR8Text_Buf+0x911)[0x7f0782959c18]
/usr/lib/titan/libttcn3-parallel-dynamic.so(_ZN11Module_List14start_functionEPKcS1_R8Text_Buf+0x2b)[0x7f076b314c0b]
/usr/lib/titan/libttcn3-parallel-dynamic.so(_ZN12TTCN_Runtime14start_functionEPKcS1_R8Text_Buf+0x25)[0x7f076b326dd5]
/usr/lib/titan/libttcn3-parallel-dynamic.so(_ZN18TTCN_Communication13process_startEv+0x42)[0x7f076b2eac22]
/usr/lib/titan/libttcn3-parallel-dynamic.so(_ZN18TTCN_Communication23process_all_messages_tcEv+0x2f5)[0x7f076b2eb475]
/usr/lib/titan/libttcn3-parallel-dynamic.so(_ZN12TTCN_Runtime8ptc_mainEv+0xdf)[0x7f076b32a9ef]
/usr/lib/titan/libttcn3-parallel-dynamic.so(main+0x365)[0x7f076b022345]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1)[0x7f07697aa2e1]
/osmo-ttcn3-hacks/sip/SIP_Tests(+0x178a)[0x564418a0178a]

This change is most likely the culprit:

https://git.osmocom.org/osmo-sip-connector/commit/?id=364f237b42d34b14de283d6cb0db2d8c246645d6

commit 364f237b42d34b14de283d6cb0db2d8c246645d6 (origin/master, origin/HEAD)
Author: Keith <keith@rhizomatica.org>
Date:   Sun Jan 31 05:24:29 2021 +0100

    MNCC v8: Implement Basic Support for Global Call Reference.

MNCCv8 should have been implemented in ttcn3-sip-test before merging this patch.

Actions #1

Updated by fixeria about 1 year ago

  • Status changed from New to In Progress
Actions #2

Updated by fixeria about 1 year ago

  • % Done changed from 0 to 20

https://gerrit.osmocom.org/c/osmo-sip-connector/+/25980 mncc: rework passing GCR over the MNCC interface

https://gerrit.osmocom.org/c/osmo-msc/+/25982 mncc: rework passing GCR over the MNCC interface

(NOTE: fixeria, sorry I edited this comment when I meant to quote it. I blame redmine UX)

Actions #3

Updated by fixeria about 1 year ago

  • % Done changed from 20 to 80

Here is a patch implementing the MNCCv8 support in addition to MNCCv7:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26008 library/MNCC: implement MNCCv8 encoding/decoding support

together with a bunch of additional improvements and fixes:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/25990 library/MNCC_EncDec: rip out MNCC version 6 support
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26005 library/MNCC_EncDec.cc: fix encoding of optional 'sdp' field
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26007 library/MNCC_Types: set 'sdp' field to omit by default

What's still missing is a patch for docker-playground setting 'mp_mncc_version := 7' for the '-latest'.

Actions #4

Updated by fixeria about 1 year ago

  • Status changed from In Progress to Feedback
  • % Done changed from 80 to 100

Here we go:

https://gerrit.osmocom.org/c/docker-playground/+/26009 ttcn3-sip-test: use MNCCv7 for the '-latest' SUT

Having all patches applied, I can execute ttcn3-sip-test against both '-latest' and '-master' SUT versions.

Actions #6

Updated by keith 2 months ago

hi fixeria Is there any test that the GCR the MSC gets back in the B-leg is the same as in the A-Leg?

That is after it has gone MNCC->osmo-sip-connector->osmo_dec_gcr->X-Global-Call-Ref:->PBX->and back again through osmo_enc_gcr.

It was working, but now I have no correlation:

OsmoBSC# show conns 
Active subscriber connections: 
conn ID=227, MSC=0, hodec2_fail=0, mgw_ep=rtpbridge/2@mgw
 LCLS GCR: 0333f4700200b9058000000065
 LCLS Config: Connect both-way, LCLS Control: Connect, LCLS BSS Status: NOT_POSSIBLE_LS
[,...]
conn ID=228, MSC=0, hodec2_fail=0, mgw_ep=rtpbridge/4@mgw
 LCLS GCR: 0333f4700200b9050000130065
 LCLS Config: Connect both-way, LCLS Control: Connect, LCLS BSS Status: NOT_POSSIBLE_LS

The SIP Header in both legs is indeed:
X-Global-Call-Ref: 03 33 f4 70 02 00 b9 05 80 00 00 00 65

It was a while ago, memory is not 100%, but I think I had some problems with this, which may be the reason why I didn't do the encoding.

Actions #7

Updated by keith 2 months ago

that should read, didn't do the encoding... with the functions in libosmocore. But I have to look at it again. Anyway, the GCR is not matching anymore for some reason.

Actions #8

Updated by keith 2 months ago

I see where it broke now:

https://gerrit.osmocom.org/c/osmo-sip-connector/+/25980 mncc: rework passing GCR over the MNCC interface

https://gerrit.osmocom.org/c/osmo-msc/+/25982 mncc: rework passing GCR over the MNCC interface

Here you added a check for the MNCC_F_GCR flag, but in the above patch to osmo-sip-connector, you do not set it.

Actions #10

Updated by fixeria 2 months ago

Hi keith,

keith wrote in #note-6:

Is there any test that the GCR the MSC gets back in the B-leg is the same as in the A-Leg?

I don't think so. In osmo-ttcn3-hacks.git I see only BSC_Tests testing some LCLS/GCR related signalling.

That is after it has gone MNCC->osmo-sip-connector->osmo_dec_gcr->X-Global-Call-Ref:->PBX->and back again through osmo_enc_gcr.

It was working, but now I have no correlation:

[...]

The SIP Header in both legs is indeed:
X-Global-Call-Ref: 03 33 f4 70 02 00 b9 05 80 00 00 00 65

So you're saying it used to work before, and now suddenly there is a mismatch?

It was a while ago, memory is not 100%, but I think I had some problems with this, which may be the reason why I didn't do the encoding.

Unfortunately, I also don't remember all the details of this work...

Actions #11

Updated by fixeria 2 months ago

keith wrote in #note-8:

I see where it broke now:

https://gerrit.osmocom.org/c/osmo-sip-connector/+/25980 mncc: rework passing GCR over the MNCC interface

https://gerrit.osmocom.org/c/osmo-msc/+/25982 mncc: rework passing GCR over the MNCC interface

Here you added a check for the MNCC_F_GCR flag, but in the above patch to osmo-sip-connector, you do not set it.

Good catch! Thanks for finding it!

https://gerrit.osmocom.org/c/osmo-sip-connector/+/29561 mncc: fix MNCC_SETUP_REQ: set MNCC_F_GCR if GCR is present [NEW]

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)