Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix gtp_gtp monitors #432

Merged
merged 2 commits into from
Sep 15, 2021
Merged

Fix gtp_gtp monitors #432

merged 2 commits into from
Sep 15, 2021

Conversation

mgumz
Copy link
Contributor

@mgumz mgumz commented Sep 14, 2021

The branch fix/gtp_path_monitors contains experimental changes to address memory consumption.

This PR is mainly to have a discussion about the proposed changes

Javier M. Torres added 2 commits September 9, 2021 12:14
Currently, a PID is not monitored if it is present in both the contexts
and monitors maps. However, there are cases where a monitor is created
in the monitors list in a register call and then moved to the contexts
list in a bind call, so a new monitor on the same process is created but
not tracked. After a time these monitors fill up the memory and crash the
node.

This commit will not add a new monitor if the PID is present either in
the contexts or the monitors maps. It seems this behaviour causes traffic
problems, so it is not a final fix.
…r_monitor

Module pgw_s5s8_proxy has debug messages for all related traffic functions.
The gtp_path:register_monitor function now handles cases where a Pid is
present in the contexts or monitors sections separately, although
the current implementation is currently the same.
@mgumz mgumz requested a review from a team as a code owner September 14, 2021 08:58
Copy link
Member

@RoadRunnr RoadRunnr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the actual fix looks ok, but there is far too much noise with all the ?LOG stuff in here.

I would like to have the changes reduced to the fix only.

@javiermtorres
Copy link

I'm afraid it is the logging that enabled us to see the issue. I really miss a lot of debug logs, specially in the handle_* functions for each gen_server instance. We can work out the current format, which I agree is really hasty and not too pretty, but the logs must remain if we want to solve issues like these in the future. We can hold a meeting during the week to work out the details.

So far we haven't seen any degradation in memory or speed due to the logs, so that's another reason to keep them in. But as I said, we can discuss the specific format. My plan is to add finer grained tracing later on, so specific IPs or IMSIs can be traced with minimal impact on production nodes (although this would still have to be checked by QA). Currently we're enabling specific modules for logging, but we should be able to further filter by e.g. function according to https://erlang.org/doc/apps/kernel/logger_chapter.html#filters

@RoadRunnr
Copy link
Member

RoadRunnr commented Sep 14, 2021

Logging on a full loaded PGW is useless, not only drown the relevant log entries in the noise of the not relevant messages, it also overloads the system when activated.
Logging on a test branch to catch a specific can be build on per issue case.

if you need gen_server/gen_statem event logging, you can always use 50ed2c2

@javiermtorres
Copy link

Logger can have a very fine control about what traces are produced. I don't want to add a new layer on top of something that already works. We can discuss the format, but the traces on handle_X should remain.

@mgumz mgumz changed the title WIP: Fix gtp_gtp monitors Fix gtp_gtp monitors Sep 15, 2021
@mgumz
Copy link
Contributor Author

mgumz commented Sep 15, 2021

@RoadRunnr @javiermtorres: if the only thing that hangs around in the air is log-messages / log-lines: the PR here is against the 2.8er branch and not really relevant for further maybe-it-has-impact situations. so, for now it would be fine with me to keep the log-lines on debug-level in.

whats more crucial: the fix for the memory-situation caused by the monitors. so, either way: please merge against 2.8er branch so i can have a 2.8.15 and thus continue in some of our other products.

@javiermtorres javiermtorres merged commit b3475bf into stable/2.8 Sep 15, 2021
@javiermtorres javiermtorres deleted the fix/gtp_path_monitors branch September 15, 2021 16:26
@vkatsuba vkatsuba restored the fix/gtp_path_monitors branch September 15, 2021 17:00
@RoadRunnr RoadRunnr mentioned this pull request Sep 15, 2021
@vkatsuba vkatsuba deleted the fix/gtp_path_monitors branch December 20, 2021 16:32
@vkatsuba vkatsuba restored the fix/gtp_path_monitors branch December 21, 2021 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants