Project

General

Profile

Bug #2757

rate_ctr_group_alloc with identical index doesn't return error

Added by laforge over 3 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
libosmocore
Target version:
-
Start date:
12/14/2017
Due date:
% Done:

100%

Spec Reference:

Description

As seen by the bug fixed in Change-Id I1b56f8d7b47597ed263e6808074483edca0895de of osmo-bts.git, (https://gerrit.osmocom.org/#/c/5344) the rate_ctr_group_alloc() function appears to accept allocation of the same counter group for identical index, which is of course an error.

Let's make sure we return an error, and also make sure that all known callers actually deal with the error somehow (e.g. if the BTS counters couldn't be allocated, the entire BTS allocation should fail).

Associated revisions

Revision 3ef14a24 (diff)
Added by max over 3 years ago

Do not allocate already existing counter group

Check that no group with the given name and index already exist before
allocating it. Add corresponding test case.

Change-Id: I563764af1d28043e909234ebb048239125ce6ecd
Related: OS#2757

Revision 4ab7268a (diff)
Added by max over 3 years ago

Fix tests after rate_ctr change

Recent change lin libosmocore disallow registering rate_ctr with the
same name and indexing multiple times. To accommodate to this:

  • allocate network struct once and use it for all tests
  • deregister rate_ctr group after each test
  • free bts struct after each test

Related: OS#2757
Change-Id: Ie1537a1ee9ee812eaaf9f58dc4bc86d4add8c31f

Revision d367aab6
Added by max over 3 years ago

Use connection id when allocating rate counters

Due to recent libosmocore's change we can't allocate rate counters with
the same name and index which are already allocated. This causes
sgsn_mm_ctx_alloc_iu() failure for multiple subscribers.

Fix this by using conn_id parameter from ranap_ue_conn_ctx.

Change-Id: I1062ffdcac96c82269cab6f4e7ae50e28dc3aa44
Related: OS#2757

Revision 8bd4bbae
Added by max over 3 years ago

gtphub: make rate_ctr unique

  • compute unique rate counter index when allocating new gtphub tunnel
  • propagate rate counter allocation error to upper layers
  • log and gracefully handle tunnel allocation error

Change-Id: I0e07f95c36de369bcd0691b8d0fd47c844abe5da
Related: OS#2757

History

#1 Updated by msuraev over 3 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 50

Fix for the library is available in gerrit 5418. We should also make sure that all the callers properly check and handle allocation error (which they should because there're other error paths in allocation function as well).

#2 Updated by msuraev over 3 years ago

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

Checked that callers in osmo-msc, osmo-bsc, osmo-bts, osmo-sgsn, osmo-hlr, osmo-ggsn, osmo-pcu handle it properly.

#3 Updated by msuraev over 3 years ago

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

OsmoBSC tests are failing after libosmocore upgrade which seems to be related.

#4 Updated by msuraev over 3 years ago

Fix for osmo-bsc available in gerrit 5486. Test failure in osmo-pcu are next.

#5 Updated by msuraev over 3 years ago

  • % Done changed from 80 to 90

Gerrit 5486 has been merged, fix for osmo-pcu is available in gerrit 5487. The rest doesn't seem to be affected.

#6 Updated by msuraev over 3 years ago

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

#7 Updated by msuraev over 3 years ago

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

OsmoBSC fix got to be backported to OpenBSC.

#8 Updated by msuraev over 3 years ago

Fix for OpenBSc is available in gerrit 5491.

#9 Updated by msuraev over 3 years ago

  • Status changed from In Progress to Stalled

#10 Updated by msuraev about 3 years ago

  • Status changed from Stalled to Resolved
  • % Done changed from 90 to 100

Gerrit 5491 is merged.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)