Project

General

Profile

Actions

Bug #2476

closed

osmo-msc leaks memory

Added by daniel over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
08/31/2017
Due date:
% Done:

100%

Resolution:
Spec Reference:

Description

After running thousands of Location updates followed by an imsi detach talloc reports lots and lots of allocated memory.
xua_asp-xlm msgb was only seen once, but the others appeared multiple times.

        GSM 04.08 ID REQ               contains   2184 bytes in   1 blocks (ref 0) 0x55c1e20d0440
        GSM 04.08 LOC UPD ACC          contains   2184 bytes in   1 blocks (ref 0) 0x55c1e20c76c0
        Abis/IP                        contains   1339 bytes in   1 blocks (ref 0) 0x55c1e20c7110
        SCCP User Primitive            contains   1160 bytes in   1 blocks (ref 0) 0x55c1e20c8d70
        xua_asp-xlm msgb               contains   2312 bytes in   1 blocks (ref 0) 0x55c1e20b9e10
Actions #1

Updated by dexter over 6 years ago

  • Status changed from New to In Progress
Actions #2

Updated by dexter over 6 years ago

I can reliably reproduce the leaking on my setup, fixed one possible memory leak, but it turned out that it did not cause the leaks.

Actions #3

Updated by dexter over 6 years ago

  • % Done changed from 0 to 90

I managed to fix (hopefully) all the memory leaks in the A/BSSAP code. (https://gerrit.osmocom.org/3889)

However, I do not get smart out of the "Abis/IP" leak:

    auth_ciph_oper                 contains      0 bytes in   1 blocks (ref 0) 0x55555579f230
    loc_updating_oper              contains      0 bytes in   1 blocks (ref 0) 0x55555579f1c0
    bs11_file_list_entry           contains      0 bytes in   1 blocks (ref 0) 0x55555579f150
    msgb                           contains  29092 bytes in  22 blocks (ref 0) 0x55555579f0e0
        Abis/IP                        contains   1339 bytes in   1 blocks (ref 0) 0x5555558ce530
        Abis/IP                        contains   1339 bytes in   1 blocks (ref 0) 0x5555558cdf80
        Abis/IP                        contains   1339 bytes in   1 blocks (ref 0) 0x5555558cd9d0
        Abis/IP                        contains   1339 bytes in   1 blocks (ref 0) 0x5555558c2640
        Abis/IP                        contains   1339 bytes in   1 blocks (ref 0) 0x5555558c0d60
        Abis/IP                        contains   1339 bytes in   1 blocks (ref 0) 0x5555558cceb0
        Abis/IP                        contains   1339 bytes in   1 blocks (ref 0) 0x5555558c80d0
        Abis/IP                        contains   1339 bytes in   1 blocks (ref 0) 0x5555558c6110
        Abis/IP                        contains   1339 bytes in   1 blocks (ref 0) 0x5555558ae4c0
        Abis/IP                        contains   1339 bytes in   1 blocks (ref 0) 0x5555558adf10
        Abis/IP                        contains   1339 bytes in   1 blocks (ref 0) 0x5555558ad960
        Abis/IP                        contains   1339 bytes in   1 blocks (ref 0) 0x5555558ad3b0
        Abis/IP                        contains   1339 bytes in   1 blocks (ref 0) 0x55555589cf50
        Abis/IP                        contains   1339 bytes in   1 blocks (ref 0) 0x55555589e9f0
        Abis/IP                        contains   1339 bytes in   1 blocks (ref 0) 0x55555589c9a0
        Abis/IP                        contains   1339 bytes in   1 blocks (ref 0) 0x55555589c3f0
        Abis/IP                        contains   1339 bytes in   1 blocks (ref 0) 0x55555589b1e0
        Abis/IP                        contains   1339 bytes in   1 blocks (ref 0) 0x555555896390
        Abis/IP                        contains   1339 bytes in   1 blocks (ref 0) 0x55555589ac30
        Abis/IP                        contains   1339 bytes in   1 blocks (ref 0) 0x555555895de0
        xua_asp-xlm msgb               contains   2312 bytes in   1 blocks (ref 0) 0x555555895470
Actions #4

Updated by dexter over 6 years ago

Note: Also had a look at osmo-bsc, I could not see any leaks in the talloc-report on the short run.

Actions #5

Updated by dexter over 6 years ago

  • Assignee changed from dexter to neels

I could not pinpoint the "Abis/IP" leak. Neels told me that it might be something with the VLR/GSUB. I assign this ticket to him now, maybe he can fix it or give me some hints where to have a closer look.

Actions #6

Updated by neels over 6 years ago

dexter wrote:

VLR/GSUB.

for the record, GSUP

Actions #7

Updated by neels over 6 years ago

took a look at the GSUP code, and there seems to be no msgb leak there. Need to look for other code paths using the IPA Multiplex msg allocation.

Actions #8

Updated by neels over 6 years ago

found out that the last IPA Multiplex msgb leak comes from ipa_msg_recv_buffered() (using https://gerrit.osmocom.org/4076)

Final leak fixed in https://gerrit.osmocom.org/4077

Actions #9

Updated by neels over 6 years ago

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

merged.

Actions #10

Updated by laforge over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)