Archive.sh results in segmentation fault


(timwood) #1

[size=x-large]Piwik segmentation fault FAQ with solution list now published. Check it out: Troubleshooting - Analytics Platform - Matomo

Just got Piwik setup yesterday afternoon and all was working pretty well (thanks for an awesome product). I decided I would run the archive script nightly (as suggested) so I disable browser archiving and set “time_before_archive_considered_outdated” to 5 minutes. I tested the archive.sh script yesterday and it seemed to work fine (with almost no data). This morning I had an email from cron which I’ve included below. As you can see it resulted in a segmentation fault. I went ahead and tested running archive.sh on the command line as root and as the apache user, but I still get Segmentation fault immediately. Any idea what might be causing this?

/path/to/piwik/misc/cron/archive.sh: line 18: 31613 Segmentation fault $CMD

Thanks,
Tim Wood


(timwood) #2

Just an update to my post. I restarted the server running Piwik just to see if that might help. After restarting, the first time I ran archive.sh I got one extra line of information:

*** glibc detected *** double free or corruption (!prev): 0x0000000001296420 ***

Followed by:

/var/www/dew.itd.doc.gov/misc/cron/archive.sh: line 18:  4328 Aborted                 $CMD

Any ideas?

Thanks,
-Tim Wood


(timwood) #3

Found a post in Piwik Hackers mailing list that talked about running a different command instead of archive.sh. At first when I tested this I got a seg fault, but an hour or so later it worked. WTF is going on. :frowning:

/usr/bin/php /path/to/piwik/index.php -- "module=API&method=VisitsSummary.getVisits&idSite=all&period=day&date=yesterday&format=xml&token_auth=KEY_HERE"

-Tim


(Matthieu Aubry) #4

This is not a Piwik bug. Please use latest Piwik release, update your apache, php, mysql to the latest stable release.


(tsl) #5

Hi,
we have the same issue.

php-5.1.6-20.el5_2.1
php-eaccelerator-5.1.6_0.9.5.2-4.el5.rf
httpd-2.2.3-11.el5_2
Piwik 0.2.28

The stats for the sites are not updating but the data is collected in the db.

We try to run:

/usr/bin/php http://stats.domain.tld/index.php?module=API&method=VisitsSummary.getVisits&idSite=all&period=day&date=last52&format=xml&token_auth=<our token>

Results in:

*** glibc detected *** php: double free or corruption (!prev): 0x000000001c5cf110 ***
======= Backtrace: =========
/lib64/libc.so.6[0x36be871834]
/lib64/libc.so.6(cfree+0x8c)[0x36be874e7c]
...

If we try to run the cgi version we get a slightly different error:

/usr/bin/php-cgi http://stats.domain.tld/index.php?module=API&method=VisitsSummary.getVisits&idSite=all&period=day&date=last52&format=xml&token_auth=<our token>
[14366] EACCELERATOR: PHP crashed on opline 2 of deleteTable() at /srv/www/stats.domain.tld/core/DataTable/Manager.php:91

We have tried to disable eAccelerator to see if it helps but it does not.

If we run the commant through curl we get an ok output I think, but it does not seem to update the graphs.

curl "http://stats.domain.tld/index.php?module=API&method=VisitsSummary.getVisits&idSite=all&period=day&date=last52&format=xml&token_auth=<our token>"

What can we have done wrong or missed?

Thanks
-tsl-


(Matthieu Aubry) #6

what is the error message when disabling eAccelerator and running archiving through the php cgi?


(vipsoft) #7

See workaround in http://dev.piwik.org/trac/ticket/518


(Matthieu Aubry) #8

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