Debugging a memory leak that doesn’t show on heap profiling

While I am not familiar with Haskell daemon itself, answering your question “how it’d be possible to more effectively pinpoint such a leak”, it might be possible to use valgrind –leak-check=yes haskelldaemon (better if you compile it with debug info), OR, if the leak happens in shared library, try LD_PRELOAD=”yourlibrary.so” valgrind your-executable.

Why is clock_gettime so erratic?

Well as CLOCK_THREAD_CPUTIME_ID is implemented using rdtsc it will likely suffer from the same problems as it. The manual page for clock_gettime says: The CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID clocks are realized on many platforms using timers from the CPUs (TSC on i386, AR.ITC on Itanium). These registers may differ between CPUs and as a consequence these … Read more

How to profile cython functions line-by-line

Robert Bradshaw helped me to get Robert Kern’s line_profiler tool working for cdef functions and I thought I’d share the results on stackoverflow. In short, set up a regular .pyx file and build script and add the following before your call to cythonize. # Thanks to @tryptofame for proposing an updated snippet from Cython.Compiler.Options import … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)