Bug #2476
closedosmo-msc leaks memory
100%
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
Updated by dexter almost 7 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.
Updated by dexter almost 7 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
Updated by dexter almost 7 years ago
Note: Also had a look at osmo-bsc, I could not see any leaks in the talloc-report on the short run.
Updated by dexter almost 7 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.
Updated by neels almost 7 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.
Updated by neels almost 7 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
Updated by neels almost 7 years ago
- Status changed from In Progress to Resolved
- % Done changed from 90 to 100
merged.