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

Memory Leak #6

Open
byterock opened this issue Nov 25, 2016 · 5 comments
Open

Memory Leak #6

byterock opened this issue Nov 25, 2016 · 5 comments

Comments

@byterock
Copy link
Collaborator

Some place there is a slow memory leak in the code

Had replay up and running using replayd with 1 worm and 3 workers

Memory started with
Virt 561 Res 316 (worker)
Virt 561 Res 316 (worker)
Virt 561 Res 316 (worker)
Virt 561 Res 316 (worm)

now after 12 hours have
Virt 654 Res 404 (worker)
Virt 629 Res 381 (worker)
Virt 624 Res 379 (worker)
Virt 574 Res 328 (worm)

This was with a full rule suite but on the system but no little if any emits to Origin by clients.

Will try without rules to see what happens

@byterock
Copy link
Collaborator Author

Well with only two rules At and Null we start with

Virt 271 Res 83344 (worker)
Virt 270 Res 83320(worker)
Virt 270 Res 83324(worker)
Virt 270 Res 83320 (worm)

and after two hours we have

Virt 271 Res 84672 (worker)
Virt 271 Res 83848 (worker)
Virt 272 Res 83840 (worker)
Virt 271 Res 83848 (worm)

So there is a leak there someplace will see if I can track it down

@byterock
Copy link
Collaborator Author

So did a few thing trying to find this yesterday not much luck.
I did find some circular refs in

lib/Replay/DelayedEmitter.pm

but not sure that helped at all

@byterock
Copy link
Collaborator Author

Well I added weak_ref => 1,on a number of Replay.pm attributes and it died when replayd starts.

Now working by taking one at a time off will see if the latest incarnation works or leaks

@DavidIAm
Copy link
Owner

What came of this troubleshooting? Did you find a patch for DelayedEmitter without looping references?

@byterock
Copy link
Collaborator Author

Well will have to look a little deeper. Seem the cargotel code is leaking as well

I will focus on getting a flat replay (no cargotel rules) running without leaking. I will use you latest branch and go on from there.

SO far from what I have seen when you do something like this

$self->emit(
'origin',
Replay::Message::Timing->new(
epoch => time,
minute => $min,
hour => $hour,
date => $mday,
month => $mon,
year => $year + $LTYEAR,
weekday => $wday,
yearday => $yday,
isdst => $isdst,
program => FILE,
function => 'clock',
line => LINE,
)
);

it can't release the 'Replay::Message::Timing' message me thinks. Well have to start the very laborious porcess

@byterock byterock reopened this Dec 13, 2016
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

No branches or pull requests

2 participants