Project

General

Profile

Actions

Bug #5969

closed

BTS_Tests_LAPDm.TC_ns_seq_error fails

Added by laforge about 1 year ago. Updated 5 months ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
libosmogsm
Target version:
-
Start date:
03/26/2023
Due date:
% Done:

100%

Spec Reference:

Description

BTS_Tests_LAPDm.TC_ns_seq_error fails.

Description: 25.2.6.1 ns sequence error
error: Missing second REJ

This looks like an actual bug in our libosmocore.git LAPDm implementation


Related issues

Related to libosmocore - Bug #5968: BTS_Tests_LAPDm.TC_nr_seq_error failsResolvedjolly03/26/2023

Actions
Related to libosmocore - Bug #4074: LAPD timers completely brokenResolvedjolly06/21/2019

Actions
Actions #1

Updated by laforge about 1 year ago

  • Related to Bug #5968: BTS_Tests_LAPDm.TC_nr_seq_error fails added
Actions #2

Updated by laforge about 1 year ago

  • Subject changed from BTS_Tests_LAPDm.TC_ns_seq_error to BTS_Tests_LAPDm.TC_ns_seq_error fails
Actions #3

Updated by jolly 6 months ago

The roundtrip delay for a LAPD link must be less than T200.

Osmocom-bb runs LAPDm on the host machine via serial interface and USB interface that may cause a roundtrip delay that exceeds T200. Also osmo-bts may have that problem, due to latency between physical interface and osmo-bts software.

What may happen:

An I frame gets lost.

The sending side transmits the next I frame. The receiving side detects the send-sequence error and responds with a REJ frame.

Due to the round trip delay, the T200 expires on the sending side and causes the I frame to be retransmitted with the P bit set, it enters the timer recovery state. The receiving side detects the send-sequence error and responds with a REJ frame with the F bit set.

The sending side will then receive two REJ frames. The first REJ frame will clear the timer recovery state. The second REJ frame (with F bit set) is received when not in timer recovery state, causing an MDL-ERROR-INDICATION.

The layer 2 connection is broken.

Early tests with osmocom-bb in a real network showed exactly this problem.

The solution is to suppress every second REJ frame at the receiving side, until the sequence error condition is cleared. If the first REJ frame gets lost, the sending side would retransmit the I frame again after another expiry of T200. Then the receiving side would respond with a REJ frame again.

The solution for the TTCN3 test case is to resend the I frame twice and then expect the REJ response.

Actions #4

Updated by jolly 6 months ago

  • Status changed from New to In Progress
Actions #5

Updated by laforge 6 months ago

  • Related to Bug #4074: LAPD timers completely broken added
Actions #6

Updated by laforge 6 months ago

I agree with this analysis.

See also #4074. If we implemented that properly, we would also have solved this issue as real-time would no longer be used in time-outs.

Actions #7

Updated by jolly 5 months ago

  • % Done changed from 0 to 90

Resolved by patches in libosmocore. A flag added to suppress subsequent REJ frame when using serial link. This flag is set only by osmocom-bb. For osmo-bts the flag is not required. This test passes with the patches. Patches applied to Gerrit.

Actions #8

Updated by jolly 5 months ago

  • Status changed from In Progress to Resolved
  • % Done changed from 90 to 100

Patches are merged. Jenkins reports positive test result.

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)