-
-
Notifications
You must be signed in to change notification settings - Fork 730
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
Memory leak on raw vrrp socket ? #1973
Comments
I checked the code and found the cause of the issue. I fixed it and the pull request is as below |
@xqjcool1 Many thanks for providing the patch. The socket(7) man page states of SO_RCVBUF I have done some more investigating, and I have discovered that Before looking into this issue, I hadn't been aware of the Are you in a position to try modifying your patch to use |
@pqarmitage OK. I‘ll try it and see if it works. |
@pqarmitage Unfortunately, garp sockets do not support shutdown operations. error log:
linux kernel source code:
|
@xqjcool1 Many thanks for trying the shutdown() option; it would have been good if it had worked. I would prefer to be consistent in the way we stop received packets being queued on a socket, so could you please try the following patch to see if it stops your receive queue building up. I have tried it on my development system and it doesn't report an error and the sending of gratuitous ARP messages still works.
Do you think the same should be done for the IPv6 NDISC socket in vrrp_ndisc.c? |
@pqarmitage Your patch works well. |
@xqjcool1 I have just noticed that in |
@xqjcool1 I am quite happy to produce a patch, or would you prefer to do so since you identified the issue? |
@pqarmitage It's an honor to let me do it. :-) Thanks very much. I'll do it ASAP. |
@pqarmitage Please see the pull request: #1982 |
@xqjcool1 Many thanks for the patch. I have written a small program to send RARP requests, so I was able to see for myself the socket receive queue building up. I have therefore been able to confirm for myself that your patch resolves the issue. Now that there are no longer any packets queued on the socket, I have also merged commit 1c0d791 which now opens the garp socket using ETH_P_ARP rather than ETH_P_RARP. It will be less confusing for anyone looking at the code in the future. Many thanks for your help with this. |
I can't reproduce this problem by sending rarp request. below is my command of sending rarp request. |
Attached is the source of the test program to generate RARP messages I referred to at #1973 (comment). |
cool, I used this program to reproduce this problem. |
Describe the bug
Hello, I'm encountering an issue which seems similar to #839
In our infrastructure we have two node with keepalived installed
The configuration is simple with just one virutal ip address share between these two nodes
there is memory leak on vrrp socket.
To Reproduce
send broadcast rarp packet to the vrrp master equipment.
Expected behavior
no memory leak.
Keepalived version
Distro (please complete the following information):
Details of any containerisation or hosted service (e.g. AWS)
If keepalived is being run in a container or on a hosted service, provide full details
Configuration file:
The text was updated successfully, but these errors were encountered: