[mythtv-users] Backend crash with malloc(): memory corruption (fast)

Andrew Burgess aab at cichlid.com
Sun Feb 1 18:23:34 UTC 2009


> *** glibc detected *** /usr/bin/mythbackend: malloc(): memory
corruption (fast): 0xa895a507 *** 

man malloc reveals:

 Crashes  in  malloc(),  calloc(), realloc(), or free() are almost
always related to heap corruption, such as overflowing an allocated
chunk or freeing the same pointer twice.
       Recent versions of Linux libc (later than 5.4.23) and glibc (2.x)
include a malloc() implementation which is tunable via environment
variables.   When
MALLOC_CHECK_  is  set, a special (less efficient) implementation is
used which is designed to be tolerant against simple errors, such as
double calls
of free() with the same argument, or overruns of a single byte
(off-by-one bugs).  Not all such errors can be protected against,
however,  and  memory
leaks  can  result.   If  MALLOC_CHECK_ is set to 0, any detected heap
corruption is silently ignored; if set to 1, a diagnostic message is
printed on
stderr; if set to 2, abort(3) is called immediately; if set to 3, a
diagnostic message is printed on stderr and  the  program  is  aborted.
Using  a
nonzero  MALLOC_CHECK_  value  can  be useful because otherwise a crash
may happen much later, and the true cause for the problem is then very
hard to
track down.

---------------------------------

so try starting mythbackend like this:

MALLOC_CHECK_=3 /usr/local/bin/mythbackend <other args>

probably by editing the script in /etc/rc.d/init.d (or wherever yours
is)
so you keep the other arguments

HTH




More information about the mythtv-users mailing list