Perl process gets stuck with «*** glibc detected *** perl: corrupted double-linked list: 0x0000000001474b40 ***» - how can I make it terminate? Perl process gets stuck with «*** glibc detected *** perl: corrupted double-linked list: 0x0000000001474b40 ***» - how can I make it terminate? unix unix

Perl process gets stuck with «*** glibc detected *** perl: corrupted double-linked list: 0x0000000001474b40 ***» - how can I make it terminate?


You can control the behaviour of glibc's memory checking with the MALLOC_CHECK_ environment variable. If you set this to '3' then it will print a message and abort() on any detected error.

See glibc's heap consistency checking documentation for for information - this actually might help you debug the error as enabling MALLOC_CHECK_ will perform consistency checks more often than it does by default (and hence catch the error sooner).

You may also want to look into Valgrind (if you haven't already) to assist in finding your corruption issue.


Your heap is getting corrupted. The corruption is almost certainly happening sometime earlier -- possibly much earlier -- because you are writing to memory you did not properly allocate (e.g., writing past the end of a malloc'd block).

You can try setting the MALLOC_CHECK_ environment variable to detect the problem sooner, but honestly your best bet is to use a tool like Purify or valgrind to catch the bad memory access at the moment it happens.