Finding Windows HANDLE leaks, in Chromium and others

# · 🔥 184 · 💬 42 · 2 years ago · randomascii.wordpress.com · ingve · 📷
Leaked process handles keep around expensive kernel structures which seem to add up to about 64 KB per handle. Because the handle leak was fairly slow - it took weeks to leak 20,000 handles - I needed a many-hour trace to be sure I could catch the leak. It starts tracing, records enough information to attribute events to the right thread and module, records information on handle operations and records call stacks on handle creation and handle duplication. The handle leak wasn't in the browser process, and it was nowhere near 1.5 million handles. System has a mixture of Event handles, File handles, IoCompletion handles, Process handles, WaitCompletionPacket handles, and others. The handle leaks were gone, as were the associated memory leaks. Process handle leaks are quite expensive, but event handle leaks are not.
Finding Windows HANDLE leaks, in Chromium and others



Send Feedback | WebAssembly Version (beta)