LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 12-28-2021, 10:37 AM   #1
sya54M
LQ Newbie
 
Registered: Apr 2015
Location: Lentiscosa (Italy)
Distribution: Slackware64 current
Posts: 8

Rep: Reputation: Disabled
php 8.1 segmentation fault


Hi everyone, I installed the new php 8.1 from Slackware arm extra packages, but it seems buggy to me, it crashes on mysqli_query() when connected to local database.
Pat reintroduced the 8.0 on x86, but only 8.1 is left on arm.
Can anyone help me?
 
Old 12-28-2021, 02:12 PM   #2
Exaga
SARPi Maintainer
 
Registered: Nov 2012
Distribution: Slackware AArch64
Posts: 1,043

Rep: Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665
Quote:
Originally Posted by sya54M View Post
Hi everyone, I installed the new php 8.1 from Slackware arm extra packages, but it seems buggy to me, it crashes on mysqli_query() when connected to local database.
Pat reintroduced the 8.0 on x86, but only 8.1 is left on arm.
Can anyone help me?
Is this any help to you? https://github.com/r00t4bl3/php8-SlackBuild
 
Old 12-29-2021, 02:57 AM   #3
sya54M
LQ Newbie
 
Registered: Apr 2015
Location: Lentiscosa (Italy)
Distribution: Slackware64 current
Posts: 8

Original Poster
Rep: Reputation: Disabled
ok I compiled it, I would have liked an official package :-D
 
Old 12-29-2021, 05:20 AM   #4
Exaga
SARPi Maintainer
 
Registered: Nov 2012
Distribution: Slackware AArch64
Posts: 1,043

Rep: Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665
Quote:
Originally Posted by sya54M View Post
ok I compiled it, I would have liked an official package :-D
Those with no other options must be content with what is offered. Merry Christmas.
 
Old 12-29-2021, 05:47 AM   #5
sya54M
LQ Newbie
 
Registered: Apr 2015
Location: Lentiscosa (Italy)
Distribution: Slackware64 current
Posts: 8

Original Poster
Rep: Reputation: Disabled
thanks, merry Christmas to you too
 
Old 12-29-2021, 06:19 AM   #6
sya54M
LQ Newbie
 
Registered: Apr 2015
Location: Lentiscosa (Italy)
Distribution: Slackware64 current
Posts: 8

Original Poster
Rep: Reputation: Disabled
here is the crash:

Code:
php-cgi: malloc.c:2539: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.
 
Old 12-30-2021, 09:32 AM   #7
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,549

Rep: Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313
Quote:
Originally Posted by sya54M View Post
here is the crash:

Code:
php-cgi: malloc.c:2539: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.
Do you have some code to reproduce this? you're using the cgi so hopefully it's reasonably straight forward and doesn't require the set up of an httpd.

Does php 8.0 work when you compiled it? I hadn't got around to adding php 8.0 to /extra yet but I'll put it in the queue.
 
Old 12-30-2021, 09:41 AM   #8
sya54M
LQ Newbie
 
Registered: Apr 2015
Location: Lentiscosa (Italy)
Distribution: Slackware64 current
Posts: 8

Original Poster
Rep: Reputation: Disabled
Code:
$mysqli = new mysqli("localhost", "my_user", "my_password", "my_db"); //very important that the host is set to localhost
$result = $mysqli->query("SELECT * FROM my_table");
Doesn't require the set up of an httpd.

With the 8.0 version work fine.

I have reported the problem also in the php site:
https://bugs.php.net/bug.php?id=81696
 
Old 12-30-2021, 12:25 PM   #9
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,549

Rep: Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313
Quote:
Originally Posted by sya54M View Post
Code:
$mysqli = new mysqli("localhost", "my_user", "my_password", "my_db"); //very important that the host is set to localhost
$result = $mysqli->query("SELECT * FROM my_table");
Doesn't require the set up of an httpd.

Code:
mozes@mojo:~/ac/source/n/php/tests# ./php81-fail.php 
PHP Warning:  PHP Startup: Unable to load dynamic library 'xmlrpc' (tried: /usr/lib/php/extensions/xmlrpc (/usr/lib/php/extensions/xmlrpc: cannot open shared object file: No such file or directory), /usr/lib/php/extensions/xmlrpc.so (/usr/lib/php/extensions/xmlrpc.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Fatal error:  Uncaught mysqli_sql_exception: No such file or directory in /mnt/armedslack/slackwarearm-current/source/n/php/tests/php81-fail.php:3
Stack trace:
#0 /mnt/armedslack/slackwarearm-current/source/n/php/tests/php81-fail.php(3): mysqli->__construct()
#1 {main}
  thrown in /mnt/armedslack/slackwarearm-current/source/n/php/tests/php81-fail.php on line 3
Confirmed! It works with the php 7 though, and I imagine it'll also work with 8.0 since it does for you.

Quote:
I have reported the problem also in the php site:
https://bugs.php.net/bug.php?id=81696
Thanks. I have to say, this is one of the best bug reports I've ever had! I think you've solved it yourself :-)
 
Old 12-30-2021, 12:32 PM   #10
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,549

Rep: Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313
I tested on AArch64 as well, and it fails with php 8.0 and 8.1
Code:
mozes@bladswede:~/ac/source/n/php/tests# ./php81-fail.php
PHP Warning:  PHP Startup: xmlrpc: Unable to initialize module
Module compiled with module API=20190902
PHP    compiled with module API=20210902
These options need to match
 in Unknown on line 0
PHP Fatal error:  Uncaught mysqli_sql_exception: No such file or directory in /mnt/armedslack/slackwarearm-current/source/n/php/tests/php81-fail.php:3
Stack trace:
#0 /mnt/armedslack/slackwarearm-current/source/n/php/tests/php81-fail.php(3): mysqli->__construct()
#1 {main}
  thrown in /mnt/armedslack/slackwarearm-current/source/n/php/tests/php81-fail.php on line 3
php 8.0:

Code:
mozes@bladswede:~/ac/source/n/php/tests# ./php81-fail.php 
PHP Warning:  PHP Startup: xmlrpc: Unable to initialize module
Module compiled with module API=20190902
PHP    compiled with module API=20200930
These options need to match
 in Unknown on line 0
PHP Warning:  mysqli::__construct(): (HY000/2002): No such file or directory in /mnt/armedslack/slackwarearm-current/source/n/php/tests/php81-fail.php on line 3
PHP Fatal error:  Uncaught Error: mysqli object is already closed in /mnt/armedslack/slackwarearm-current/source/n/php/tests/php81-fail.php:4
Stack trace:
#0 /mnt/armedslack/slackwarearm-current/source/n/php/tests/php81-fail.php(4): mysqli->query()
#1 {main}
  thrown in /mnt/armedslack/slackwarearm-current/source/n/php/tests/php81-fail.php on line 4
I see in the report that you built it with debugging enabled. The PHP SlackBuild you were directed to previously isn't the official Slackware build script, so I don't know if it has different build options which happen to fix this. The official build script is here.
http://ftp.slackware.com/pub/slackwa...t/extra/php80/

PHP 8.0 is building on 32bit ARM now so I'll have a look at that in the next few days.
 
Old 12-30-2021, 10:46 PM   #11
Exaga
SARPi Maintainer
 
Registered: Nov 2012
Distribution: Slackware AArch64
Posts: 1,043

Rep: Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665
Quote:
Originally Posted by drmozes View Post
The PHP SlackBuild you were directed to previously isn't the official Slackware build script, so I don't know if it has different build options which happen to fix this. The official build script is here.
http://ftp.slackware.com/pub/slackwa...t/extra/php80/
That's the php8 package. For the official php80.SlackBuild script he'll want this URL: http://ftp.slackware.com/pub/slackwa.../source/php80/ ?

The official script includes '--enable-maintainer-zts --with-xmlrpc=shared --with-expat' build options where the GitHub script doesn't.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] PHP segmentation fault, .dynamic section "libcrypto.so.6" is not at the expected addr lithos Linux - Software 3 12-08-2011 01:14 PM
php https wrapper giving Segmentation fault but not http imraven Linux - Software 2 03-27-2009 02:20 AM
php core dump with segmentation fault ohcarol *BSD 9 10-14-2008 09:19 AM
PHP-ODBC on OpenBSD 4.1 causes Segmentation fault IMNOboist *BSD 0 06-04-2007 12:33 PM
yast segmentation fault, system freezing - nvidia driver at fault? BaltikaTroika SUSE / openSUSE 2 12-02-2005 09:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM

All times are GMT -5. The time now is 04:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration