Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Live widget generates segmentation faults & GPFs #2045

Closed
jacobshare opened this issue Jan 23, 2011 · 4 comments
Closed

Live widget generates segmentation faults & GPFs #2045

jacobshare opened this issue Jan 23, 2011 · 4 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. worksforme The issue cannot be reproduced and things work as intended.
Milestone

Comments

@jacobshare
Copy link

I'm running nginx 0.8.53 + php-fpm (php 5.3.5). No Apache at all.

I added Piwik 1.1.1 into the mix and it works great, but logwatch noticed that the number of seg faults & general protection faults skyrocketed.

Nginx's error_log pointed at the Piwik Dashboard. I tailed the error_log, removed all the widgets, and restored them one by one, noticing 2 problems:

  1. When I previewed the Live Visitors in Real Time widget, either 1 GPF and 1 seg fault are generated or 2 GPFs are generated. Once the errors are generated though, if I add the widget and keep the Dashboard open, no additional errors are generated (at least, not right away).

  2. If I then close the browser tab/window, and reopen a new one with the Piwik Dashboard including the Live Visitors in Real Time widget, a seg fault is immediately generated.

Also- if I remove the Live widget, no errors are generated at all.

Unfortunately, the live widget is one of the main reasons I installed Piwik in the first place.

Any ideas?

Jacob

@robocoder
Copy link
Contributor

If you experience a segfault/GPF, then it's a bug in the php runtime or Zend Engine, because Piwik is written in an interpreted language (php), not compiled into native code. Try recompiling php with debug, and enabling core files. You should be able to then use gdb (or comparable debugger) to get a stack backtrace.

I use php-cgi 5.3.5 on my dev box and the continuous integration server without segfaulting, so my guess would be a bug in fpm (since it was only recently introduced, 5.3.3?).

@robocoder
Copy link
Contributor

Another difference is whether your php build links against libmysql or against mysqlnd.

@jacobshare
Copy link
Author

Thanks, that makes sense.

How can I tell if my php build links against one or the other? Which is better in this case?

@robocoder
Copy link
Contributor

The phpinfo might give a clue (eg mysqlnd extension). Otherwise look at the build configuration (eg "config.nice" might show how the "configure" script was invoked).

For 5.3.x, mysqlnd is better supported by the php devs, but has some backward incompatibilities with libmysql. Since Piwik uses Zend_Db, most of the implementation differences aren't a concern.

IIRC there's at least one libmysql related segfault (double free?) fixed in the 5.3 trunk (to be released in 5.3.6).

Since fpm is still listed as experimental, you could also try the cgi (fastcgi) version of php.

@jacobshare jacobshare added this to the Piwik 1.2 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

3 participants