Piwik causing segfault on PHP


#1

Hello,

I am using Piwik 1.6 on Debian 6.0 squeeze (amd64) with PHP 5.3.8 and nginx 1.0.10 with the nginx-piwik config files from perusio (GitHub - perusio/piwik-nginx: Nginx configuration for running Piwik). Currently this Piwik hosts ~19 small websites (20-50 unique visitors per day) and 1 medium website (~4000 unique visitors a day).

The problem is that I can see PHP segfaulting around 20 times a day and I guess this is not really a good sign… For example here are the segfaults of today:

[ 6135.156591] php[1492]: segfault at 7fe0bfae8e31 ip 0000000000732162 sp 00007fff826017d0 error 4 in php[400000+8a1000]
[ 9735.861206] php[1636]: segfault at 7f49bbbb5e31 ip 0000000000732162 sp 00007fff5f1f1320 error 4 in php[400000+8a1000]
[13337.499600] php[1780]: segfault at 7fe0976e4631 ip 0000000000732162 sp 00007fff8f995dd0 error 4 in php[400000+8a1000]
[16937.568897] php[1926]: segfault at 7fd2032e3231 ip 0000000000732162 sp 00007ffff6155810 error 4 in php[400000+8a1000]
[20536.750273] php[2070]: segfault at 7f521b152a31 ip 0000000000732162 sp 00007fff65754a90 error 4 in php[400000+8a1000]
[27737.513038] php[4113]: segfault at ffffffff ip 00000000006f934f sp 00007fffb59c00d0 error 4 in php[400000+8a1000]
[31338.968122] php[5512]: segfault at 7f79035aa231 ip 0000000000732162 sp 00007fff20bd4760 error 4 in php[400000+8a1000]
[34939.025640] php[5656]: segfault at 7f8410852e31 ip 0000000000732162 sp 00007fffa65eb670 error 4 in php[400000+8a1000]
[38539.394838] php[5802]: segfault at 7f23208bf231 ip 0000000000732162 sp 00007fffb81f2d40 error 4 in php[400000+8a1000]
[42140.809448] php[5948]: segfault at 7f6ca46bfc31 ip 0000000000732162 sp 00007fff32ef91a0 error 4 in php[400000+8a1000]
[45738.683849] php[6191]: segfault at 7f945aae3831 ip 0000000000732162 sp 00007fff242f6060 error 4 in php[400000+8a1000]
[52933.361438] php[6484] general protection ip:7fb669979382 sp:7fff80cc0e48 error:0 in libc-2.11.2.so[7fb669872000+158000]
[92537.661528] php[8236]: segfault at 7f8d1ebd3631 ip 0000000000732162 sp 00007fffae503fe0 error 4 in php[400000+8a1000]
[96137.873035] php[8380]: segfault at 7f7447706431 ip 0000000000732162 sp 00007fffb10c4a50 error 4 in php[400000+8a1000]
[99739.969445] php[8530]: segfault at 7f970d776231 ip 0000000000732162 sp 00007fff300313c0 error 4 in php[400000+8a1000]
[103338.120183] php[8674]: segfault at 7f25e1391831 ip 0000000000732162 sp 00007fffbc99c9e0 error 4 in php[400000+8a1000]
[106938.572170] php[8819]: segfault at 7f347fd05631 ip 0000000000732162 sp 00007fff5bc0fc40 error 4 in php[400000+8a1000]
[110539.219920] php[9259]: segfault at 7f862bc29231 ip 0000000000732162 sp 00007fff9b4a6fc0 error 4 in php[400000+8a1000]
[117741.461281] php[9550]: segfault at 7f9fe18ad431 ip 0000000000732162 sp 00007fff0bec9000 error 4 in php[400000+8a1000]
[121341.093403] php[9696]: segfault at 7f02484eb831 ip 0000000000732162 sp 00007fffadb75550 error 4 in php[400000+8a1000]
[124942.817845] php[9840]: segfault at 7f0946bdca31 ip 0000000000732162 sp 00007fffad74b1b0 error 4 in php[400000+8a1000]
[128544.657650] php[9984]: segfault at 7f3791941831 ip 0000000000732162 sp 00007fffad839a70 error 4 in php[400000+8a1000]
[132143.860592] php[10131]: segfault at 7fc289fece31 ip 0000000000732162 sp 00007fff9ba82370 error 4 in php[400000+8a1000]
[139336.033289] php[10424] general protection ip:7f1661a28382 sp:7fff5f0ff048 error:0 in libc-2.11.2.so[7f1661921000+158000]
[182536.676950] php[12561]: segfault at 7faab1da9231 ip 0000000000732162 sp 00007fffe1a83f20 error 4 in php[400000+8a1000]
[186136.644894] php[12705]: segfault at 7f2834d15031 ip 0000000000732162 sp 00007fffb9bc4850 error 4 in php[400000+8a1000]
[189737.313711] php[12919]: segfault at 7f67a7c75231 ip 0000000000732162 sp 00007fff20df7d40 error 4 in php[400000+8a1000]
[193338.278101] php[13069]: segfault at 7f5bbbbdfe31 ip 0000000000732162 sp 00007fff003800e0 error 4 in php[400000+8a1000]

Does anyone have an idea what could be going wrong here? or how I can avoid these segfaults?

Don’t hesitate to ask if you need more infos

Many thanks in advance for your suggestions.

H.N.


#2

A small update: I have now found out that actually it is the archive.sh cronjob which is run every hour that is generating a segmentation fault…


#3

Hopefully last update:

I followed the procedure described here:

http://forum.piwik.org/read.php?2,75325,page=1#msg-83997

and succesfully now ran archive.sh… Waiting for the next ones to run to see if I am still segfault-free :wink: