After 1.3 upgrade: exit signal Segmentation fault

Just an update on this issue.

I’m aware that this is a php error, but since this error only started to appear after 1.3, I’m tempted to say that something was changed in the Piwik code that doesn’t play with php too nicely.

I hadn’t seen any ALERT - canary mismatch on efree() messages for the last 10 days so I thought the problem had solved itself. But last night I started getting heaps of them again. What’s weird is the order of the messages

May 19 01:05:01 boxfish /USR/SBIN/CRON[19600]: (root) CMD (/var/www/www_v2/app/webroot/piwik/misc/cron/ > /dev/null)
May 19 01:09:01 boxfish /USR/SBIN/CRON[19624]: (root) CMD ( [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) -delete)
May 19 01:09:21 boxfish suhosin[19562]: ALERT - canary mismatch on efree() - heap overflow detected (attacker ‘’, file ‘/var/www/www_v2/app/views/layouts/fullscreen_v2.ctp’, line 49)

(no lines omitted, either the archive or the session rake script COULD have something to do with it)

The bad thing for me is that apache croaks after the fifth message. It only delivers empty pages which brings down the entire site. After restarting it, everything is back to normal.

So does anyone have any suggestion on how to fix this? Any help would be highly appreciated.


In the case of cron jobs, cron uses the standalone php binary to process the request. When the script is done, the php binary exits and releases all the memory it used. So ignore the CRON messages as those are red herrings.

In the case of mod_php/php-fcgi/php-fpm, the php runtime is loaded into memory and kept resident for subsequent requests. (That’s part of the performance increase because the system doesn’t have to reload the php binary each time.)

At this point, I would suggest disabling xcache and/or suhosin, since these aren’t supported by the PHP dev team (and unfortunately, it seems bug reports involving those extensions are generally ignored).

Hi Anthon

thanks for your suggestions. I switched over to APC now … perhaps that solves the problem. I first tried running the site without an opcode cache, but the response time tripled. CakePHP weighs in quite heavy on the server, which is no surprise given the number of files that are read for every request.

I’ll keep you updated if this fixes the issue.



lastest update. After switching to APC I get

May 26 04:05:05 boxfish suhosin[18924]: ALERT - possible memory corruption detected - unknown Hashtable destructor (attacker 'REMOTE_ADDR not set', file 'unknown')

when the script is run.

But at least apache doesn’t crash…so the problem is solved for :slight_smile:



Piwik segmentation fault FAQ with solution list now published. Check it out: Troubleshooting - Analytics Platform - Matomo