Slackware This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
11-22-2013, 05:11 PM
|
#1
|
LQ Newbie
Registered: Oct 2010
Location: Brazil
Distribution: Slackware since 1996
Posts: 16
Rep:
|
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.
Best regards,
Jero
|
|
|
11-23-2013, 01:28 AM
|
#2
|
LQ Guru
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,385
|
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
- set this two parameters
Code:
opcache.enable=1
opcache.enable_cli=1
tested both with mod_php and php-fpm.
Last edited by ponce; 11-23-2013 at 12:00 PM.
|
|
|
11-23-2013, 04:21 PM
|
#3
|
LQ Newbie
Registered: Oct 2010
Location: Brazil
Distribution: Slackware since 1996
Posts: 16
Original Poster
Rep:
|
Ponce, thanks for the reply.
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 ?
|
|
|
11-24-2013, 01:43 AM
|
#4
|
LQ Guru
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,385
|
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.
Last edited by ponce; 11-24-2013 at 02:15 AM.
|
|
|
11-24-2013, 03:02 AM
|
#5
|
LQ Guru
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,385
|
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
Code:
--- php.SlackBuild.orig 2013-10-12 03:37:27.000000000 +0200
+++ php.SlackBuild 2013-11-24 08:57:12.503175163 +0100
@@ -25,7 +25,7 @@
VERSION=${VERSION:-$(echo php-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-ALPINE=2.11
+ALPINE=2.00
BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
@@ -150,7 +150,7 @@
--datadir=/usr/share \
--infodir=/usr/info \
--mandir=/usr/man \
- --with-apxs2=/usr/bin/apxs \
+ --with-apxs2=/usr/sbin/apxs \
--enable-fpm \
--with-fpm-user=apache \
--with-fpm-group=apache \
@@ -222,7 +222,6 @@
--with-xsl=shared,/usr \
--enable-zip=shared \
--with-tsrm-pthreads \
- --enable-intl=shared \
--enable-shared=yes \
--enable-static=no \
--with-gnu-ld \
no need to say that we're going deeper on completely unsupported paths (but I'll stop now).
Last edited by ponce; 11-24-2013 at 03:07 AM.
|
|
|
11-24-2013, 05:29 AM
|
#6
|
LQ Newbie
Registered: Oct 2010
Location: Brazil
Distribution: Slackware since 1996
Posts: 16
Original Poster
Rep:
|
Ponce,
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.
I'll try now with the 14.0.
Regards,
Jero
|
|
|
11-24-2013, 08:34 AM
|
#7
|
LQ Newbie
Registered: Oct 2010
Location: Brazil
Distribution: Slackware since 1996
Posts: 16
Original Poster
Rep:
|
Ponce, with Slackware64 14.0 (GCC 4.7.1) I got no problems compiling and running PHP-5.5.6 with opcache enabled:
Code:
phpinfo()
PHP Version => 5.5.6
System => Linux lhasa 3.2.45 #2 SMP Fri May 31 20:14:55 CDT 2013 x86_64
Build Date => Nov 24 2013 09:37:34
Configure Command => './configure' '--disable-all' '--enable-opcache'
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
with Zend OPcache v7.0.3-dev, Copyright (c) 1999-2013, by Zend Technologies
Zend OPcache
Opcode Caching => Up and Running
Optimization => Enabled
Startup => OK
I'll ask now at PHP list if there is any problem with newer GCC versions.
But I still can't understand how you managed to compile PHP-5.5 on the 14.1... maybe I'm missing something...
|
|
|
11-24-2013, 09:24 AM
|
#8
|
LQ Guru
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,385
|
as I told you above, I just used the SlackBuild, without any modification.
|
|
|
All times are GMT -5. The time now is 03:33 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|