With the latest two PHP updates, some users reported problems with FPM, with APC, etc… It was about segfaults, problematic init scripts, and so on… But all those comments couldn’t really help me to diagnose the problems in an efficient manner.
Here are the pieces of information that you have to provide to help me fixing your problem :
- What is your distribution? (disclaimer : only Debian stable is supported)
- What is your architecture? amd64 or i386?
- Which exact PHP version are you using? 5.4.x or 5.3.x?
- Which SAPI are you using? mod_php? CGI? FPM? Embed?
- What’s the full content of your /etc/apt/sources.list and /etc/apt/sources.list.d files?
- What is the result of dpkg -l 'php*' | grep '^.i' ?
- Please provide a textual description of the bug (don’t hesitate to provide some code, the expected result…).
- Please provide any modified configuration directive.
- Please provide a backtrace, after installing php5-dbg.
Now, some tips to have a stable PHP stack :
- Only use PHP packages from Dotdeb when possible.
- Be sure to upgrade them to the latest version.
- Uninstall php5-suhosin if you don’t use it explicitly. The development of this extension has kinda been “stalled”.
- If you have problems with extensions, deactivate and reactivate them one by one to find the guilty one.
Because blog comments are not the best place to report issues, Dotdeb uses the Github bugtracker for now. Be sure to follow the above instructions, to read the official PHP bug tracker and also the existing Dotdeb bug reports before submitting any new issue.
Improving the overall stability of the Dotdeb packages requires efforts from us all. Thanks in advance for your help.
Richard
Thanks for the heads up, definitely helpful for the future when reporting issues. I was the first person to report the APC segfault issues. You’ve mentioned problems with Suhosin, I’m using Suhosin! So before I submit a correct bug report I’ll try without Suhosin.
moog
I get errors with APC too. Here is my actual apc.ini :
extension=apc.so
apc.enabled=1
apc.enable_cli = 1
apc.num_files_hint = 1024
apc.shm_segments=1
apc.shm_size=512M
apc.ttl=3600
apc.user_ttl=3600
apc.filters=apc\.php
When I disable APC or if I remove apc.filters=apc\.php I don’t get any error.
Hope it could help.
Guillaume Plessis
@moog : did you run this command and restart FPM / Apache / … ?
moog
Yes I did it but without any change.
I juste saw that if I remove apc.filters=apc\.php everything seems to be good
joey
I had a lot of problems related to APC since the last update, a lot of SegFaults with the APC cache method for the db queries of PHPBB for instance.
I disabled that, and still had SegFaults with a simple upload progress that uses APC. But I didn’t reinstall PHP-APC the way you indicate here. Now that i did, hopefully, the bugs will be gone.
Anyway, even with that latest bugs (that pissed me off, of course), I want to thank you for your very, very, very useful work. I mean it.
I love debian and its stability but I almost always need the latest version of PHP and without you, i’d be almost completely lost.
I wanted to thank you for a long time, now’s the occasion
Toni Lähdekorpi
I’m having the same problem with php-apc.
Tried reinstalling, purging and even reinstalling everything related to PHP.
It keeps segfaulting if apc is installed but if not, everything works just fine.
Where should I start?
kernel: [ 2156.227080] php5-fpm[4580]: segfault at e98 ip 00007f38e38e6c89 sp 00007fff1fb6b780 error 4 in apc.so[7f38e38c9000+24000]
Guillaume Plessis
@Toni Lähdekorpi : first read the above blog and follow the different steps, including providing a backtrace and report useful bug reports (or contribute to existing ones).
Also make sure that the following line is present in /etc/init.d/php5-fpm :
FYI APC 3.1.12 from Dotdeb is the same as the official APC 3.1.13
Guillaume Plessis
Waiting for a better APC, you can also try to use Xcache instead of APC.
Toni Lähdekorpi
I need APC for my Magento setup.
Also:
16:35:54 root@autopalvelu:/var/www/magento$ dpkg -l php5-dbg; gdb php
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============================================================-==============================================================-============================================================================================================================================
ii php5-dbg 5.4.6-1~dotdeb.0 Debug symbols for PHP5
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type “show copying”
and “show warranty” for details.
This GDB was configured as “x86_64-linux-gnu”.
For bug reporting instructions, please see:
…
Reading symbols from /usr/bin/php…Reading symbols from /usr/lib/debug/usr/bin/php5…done.
(no debugging symbols found)…done.
(gdb)
Guillaume Plessis
Please use gdb on the binary that leads to a coredump : /usr/bin/php5-fpm instead of /usr/bin/php (that is just a symlink)
Toni Lähdekorpi
Reading symbols from /usr/sbin/php5-fpm…Reading symbols from /usr/lib/debug/usr/sbin/php5-fpm…done.
(no debugging symbols found)…done.
Guillaume Plessis
ok, strange. What is the gdb command you’re using (with options)?
Toni Lähdekorpi
Just tried running `gdb php5-fpm`
It’s just a default Debian Squeeze installation on top of QEMU.
Guillaume Plessis
You have to allow php5-fpm to generate coredumps and them pass them to gdb
Matty
How do you remove php5-suhosin. Is it just simply doing apt-get remove php5-suhosin
Guillaume Plessis
@Matty : yes, just apt-get remove --purge php5-suhosin and make sure that there-s no /etc/php5/conf.d/suhosin.ini file anymore.
Zsolt Ero
Just a quick note, if suhosin isn’t such a required package that even the uninstall is mentioned, could you remove the dependency for it from php5-fpm? I don’t see why is suhosin required for a simple php5-fpm.
Guillaume Plessis
@Zsolt Ero : php5-suhosin is a suggestion, not a requirement, you can avoid it with a decent APT frontend (dselect, aptitude, synaptic…). I’ll remove it in future releases, thanks for the suggestion.