Bug #71438 [Opn->Fbk]: Segmentation fault encountered when building PHP 7 in QEMU MIPS chroot jail
| From: | laruence@php.net | Date: | Mon, 25 Jan 2016 04:15:03 +0000 |
| Subject: | Bug #71438 [Opn->Fbk]: Segmentation fault encountered when building PHP 7 in QEMU MIPS chroot jail | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-198871@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=71438&edit=1
ID: 71438
Updated by: laruence@php.net
Reported by: ramsey@php.net
Summary: Segmentation fault encountered when building PHP 7
in QEMU MIPS chroot jail
-Status: Open
+Status: Feedback
Type: Bug
Package: Compile Failure
Operating System: Debian Wheezy
PHP Version: 7.0.2
Block user comment: N
Private report: N
New Comment:
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php
for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php
for Win32
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2016-01-23 23:32:37] ramsey@php.net
Description:
------------
I am encountering a segmentation fault when attempting to build PHP 7.0.2 in a chroot jail that is
using QEMU to emulate a MIPS architecture.
Using the same script with identical settings and configuration, I am able to build PHP 5.4.45,
5.5.31, and 5.6.17 without any segmentation faults.
The segmentation fault occurs toward the end of the
make command, immediately after the
"Generating phar.php" line (see "Actual result" below for error output).
----------
For those wondering why I am building PHP in an emulated MIPS environment: I am creating Docker
images on which Travis CI runs tests for my ramsey/uuid library. I want to ensure consistent
generation of UUIDs on 64-bit, 32-bit, little-endian, and big-endian systems. If interested, see the
following:
* https://github.com/ramsey/uuid
* https://hub.docker.com/r/benramsey/ramsey-uuid/
* https://travis-ci.org/ramsey/uuid
Test script:
---------------
Here is a Gist that will allow you to reproduce this issue within a Vagrant VM:
https://gist.github.com/ramsey/8ba95a871c75c3aad820
See the comments at the top of the script, but in short, once you're ready to run the script in
the VM, you can run it like this to build different chroot jails with different PHP versions:
sudo ./php7-qemu-mips-build.sh 7.0.2 mips mips wheezy
sudo ./php7-qemu-mips-build.sh 5.6.17 mips mips wheezy
sudo ./php7-qemu-mips-build.sh 5.5.31 mips mips wheezy
The 7.0.2 version is the one where I am encountering the segmentation fault.
Actual result:
--------------
Generating phar.php
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
/bin/bash: line 1: 23824 Segmentation fault (core dumped) if test -x
"/php-src/php-7.0.2/sapi/cli/php"; then /php-src/php-7.0.2/build/shtool echo -n --
"/php-src/php-7.0.2/sapi/cli/php -n"; if test "x" != "x"; then
/php-src/php-7.0.2/build/shtool echo -n -- " -d extension_dir=/php-src/php-7.0.2/modules";
for i in bz2 zlib phar; do if test -f "/php-src/php-7.0.2/modules/$i.la"; then .
/php-src/php-7.0.2/modules/$i.la; /php-src/php-7.0.2/build/shtool echo -n -- " -d
extension=$dlname"; fi; done; fi; else /php-src/php-7.0.2/build/shtool echo -n --
"/php-src/php-7.0.2/sapi/cli/php"; fi; -n -d 'open_basedir=' -d
'output_buffering=0' -d 'memory_limit=-1' -d phar.readonly=0 -d
'safe_mode=0' /php-src/php-7.0.2/ext/phar/build_precommand.php > ext/phar/phar.php
make: *** [ext/phar/phar.php] Error 139
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71438&edit=1