Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected segmentation fault after homebrew installation #26

Open
tscheepers opened this issue Aug 31, 2017 · 3 comments
Open

Unexpected segmentation fault after homebrew installation #26

tscheepers opened this issue Aug 31, 2017 · 3 comments

Comments

@tscheepers
Copy link
Contributor

When I brew install php71 on macOS Sierra with PHP 7.1.8 my Laravel 5.4 project runs smoothly. However when in brew install php71 php71-timecop my Laravel application can't run php artisan serve consistently, which is used as a webserver. Sometimes it does start, but when navigating a couple of pages the server shuts down with again a segfault. This does not happen when timecop is not installed.

schermafbeelding 2017-08-31 om 14 48 05

I saw in homebrew that the current version is 1.2.4 (stable) but the readme here states it is a beta version?

schermafbeelding 2017-08-31 om 14 47 07

@hnw
Copy link
Owner

hnw commented Aug 31, 2017

Thank you for reporting!

I reproduced the issue with smaller test cases.

<?php
use Carbon\Carbon;
var_dump(Carbon::now());

PHP 7.1.8 built-in webserver + php-timecop will crash with this code. However, PHP 7.2.0beta3 built-in webserver + php-timecop never seem to crash.

It's unknown problem for me, so I'd like to investigate this problem further.

By the way, I'm not a maintainer for php-timecop brew package. As you say, "beta" is correct status.

hnw added a commit that referenced this issue Dec 7, 2017
@xgitxhubx
Copy link

xgitxhubx commented Jan 9, 2018

Hi,

It also occurs on php:7.1-fpm-alpine and php:7.0-fpm-alpine (installed with phpize).
PHP version:

PHP 7.0.26 (cli) (built: Dec  1 2017 19:42:59) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.26, Copyright (c) 1999-2017, by Zend Technologies

Maybe, it is a bug of PHP. https://bugs.php.net/bug.php?id=75573

Still fault in PHP 7.1.13

PHP 7.1.13 (cli) (built: Jan  9 2018 01:09:21) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.1.13, Copyright (c) 1999-2017, by Zend Technologies

@xgitxhubx
Copy link

xgitxhubx commented Jan 9, 2018

I tried with apache2 and php v7.0.22 on my local, it works well. But with docker, nginx, php-fpm, it did not work for all versions I tried: 7.0.26, 7.1.12, 7.1.13, 7.0.22.

Error occurs with: https://github.com/briannesbitt/Carbon
php -r 'require "vendor/nesbot/carbon/src/Carbon/Carbon.php";'

Result:
Segmentation fault (core dumped)

It works with php:7.2-fpm-alpine and php:7.1-fpm-jessie. https://hub.docker.com/_/php/

Would you please to fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants