3 ms·
This is interestingly analogous to nelhage's memory sampling approach https://blog.nelhage.com/2013/03/tracking-an-eventmachine-leak/#searching-for-c-object-lea
by eichin 10mo ago
This is interestingly analogous to nelhage's memory sampling approach https://blog.nelhage.com/2013/03/tracking-an-eventmachine-leak/#searching-for-c-object-leaks https://blog.nelhage.com/2013/03/tracking-an-eventmachine-le... where if something is leaking "at scale", let it - then gcore it, and pick a random page of the core and see what's there. (An even cheaper variant I've used a few times with python is to just run "strings | sort | uniq -c | sort -n" on the core, so you get the most common strings which are usually part of object metadata and give you a solid hint without needing to go in with a debugger...) The ^C approach basically samples time instead of memory.
- tialaramex 10mo agoSubstantially pre-dated by e.g. Raymond Chen's explanation https://devblogs.microsoft.com/oldnewthing/20050815-11/?p=34583 https://devblogs.microsoft.com/oldnewthing/20050815-11/?p=34... and by my implementation (for Linux) https://github.com/tialaramex/leakdice-rust https://github.com/tialaramex/leakdice-rust or https://github.com/tialaramex/leakdice https://github.com/tialaramex/leakdice if you can't use Rust)