PHP-5.5.x with Zend OPCache enabled causing segfault error 14 in libc-2.17.so
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
PHP-5.5.x with Zend OPCache enabled causing segfault error 14 in libc-2.17.so
Hi guys !!!
I need to optimize a PHP application using Zend OPCache in a Slackware64-14.1 server fresh installed.
I was compiling PHP-5.5.6 with a lot of default options that we use regularly, but when I noticed the error I tried with only "--disable-all --enable-opcache" options and the error persists when the "zend_extension=opcache.so" is enableb at php.ini.
Error with "php -i":
Code:
PHP Warning: Zend OPcache: module registration failed! in Unknown on line 0
And the segfault:
Code:
Nov 22 19:02:12 slack-test kernel: [ 7731.937367] php[32051]: segfault at 7f73b6b53c40 ip
00007f73b6b53c40 sp 00007fff06cdd6a8 error 14 in libc-2.17.so[7f73b6d6f000+1bf000]
I tried but I got no clues about what is the "error 14" of libc...
I'd like to know if someone has managed to compile a PHP-5.5.x with opcache enableb and working.
By the way, the same compile options in a Debian Wheezy works ok.
Thanks in advance for any help or hint to solve this problem.
opcache build is enabled by default in php-5.5.6: to build it I just used the official slackware build script for slackware-14.1 that has recently been modified to support also php-5.5.x (if you want to use that you need that folder and the alpine one).
I just tried enabling it on my test machine (running a full installation of slackware64-14.1) with a testing joomla: these are the modifications I have done to my /etc/httpd/php.ini
- add a line
Code:
zend_extension=opcache.so
just before the block with the listing of extensions
I installed a new fresh server and still getting the same error. This time at least I figured out that the segmentation fault is ocurring during the configure stage yet using only "configure --disable-all". The config.log shows the segfault on the extended DES and Blowfish crypt test:
Code:
configure:86292: checking for extended DES crypt
configure:86322: cc -o conftest -g -O2 -fvisibility=hidden conftest.c -lcrypt -lrt -lm -ldl -lnsl -lcrypt >&5
conftest.c: In function 'main':
conftest.c:241:3: warning: incompatible implicit declaration of built-in function 'exit' [enabled by default]
exit (strcmp((char *)crypt("rasmuslerdorf","_J9..rasm"),"_J9..rasmBYk8r9AiWNc"));
^
configure:86322: $? = 0
configure:86322: ./conftest
./configure: line 2347: 19629 Segmentation fault ./conftest$ac_exeext
configure:86322: $? = 139
configure: program exited with status 139
.
.
.
configure:86395: checking for Blowfish crypt
configure:86431: cc -o conftest -g -O2 -fvisibility=hidden conftest.c -lcrypt -lrt -lm -ldl -lnsl -lcrypt >&5
conftest.c: In function 'main':
conftest.c:244:5: warning: incompatible implicit declaration of built-in function 'strcat' [enabled by default]
strcat(salt,"rasmuslerd............");
^
conftest.c:245:5: warning: incompatible implicit declaration of built-in function 'strcpy' [enabled by default]
strcpy(answer,salt);
^
conftest.c:247:5: warning: incompatible implicit declaration of built-in function 'exit' [enabled by default]
exit (strcmp((char *)crypt("rasmuslerdorf",salt),answer));
^
configure:86431: $? = 0
configure:86431: ./conftest
./configure: line 2347: 19652 Segmentation fault ./conftest$ac_exeext
configure:86431: $? = 139
configure: program exited with status 139
I tested in an old 13.37 server (GCC 4.7.0) and the config.log shows only the warnings without the segfaults and so opcode works fine.
Could you please check if your config.log shows any segfault and the gcc version you have ?
those happens also here during its tests (gcc 4.8.2, but I built version 5.5.4 on slackware 14.0 that got gcc-4.7.1, haven't checked on 13.37), but the configure phase finishes correctly and I can build it fine.
why aren't you using the official SlackBuild (FYI, I linked it above)? is this for any reason?
it makes more sense that you use that launching it like
Code:
NUMJOBS="-j1" ./php.SlackBuild
and then post the error it gives when it breaks.
remember that only full installations of Slackware are supported.
as I'm curious, I tried also building php-5.5.6 with the build script for 14.1 on 13.37: besides that I had to use the alpine build script fom 13.37 (because the one of 14.1 requires a newer openssl), it built and at a first glance seems to run fine (also with opcache enabled as I wrote above) with just these modifications to the SlackBuild
Sorry, I forgot to say I did a full 14.1 64 bits installation without any customization. After the boot I tried, first, the "configure --disable-all" to see if it causes any segfault (it did), then I tried the official build script with your patch and during the configure stage the segfault occurred again (what indicates that the opcode won't work).
The build script's patches don't modify any font. Anyway, a simple "configure --disable-all" shouldn't be causing segfault...
As I said,s in an old 13.37 the PHP 5.5.6 configures, compiles and works fine with opcode.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.