-
Notifications
You must be signed in to change notification settings - Fork 314
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
Not working after upgrading to PHP 7.3 #540
Comments
Does it work after uninstalling xdebug? |
xdebug 2.7.0beta1 is not actually compatible fully with php 7.3 yet. No release or even master of xdebug fully works yet. |
@GrahamCampbell It doesn't work with xdebug disabled either |
xdebug works very well with php 7.3 from what I have tested, had no issue with it. |
Does it work after full uninstallation of the plugin, not just disabling? |
There are various known issues documented on xdebug's github, including a failing test suite. |
@GrahamCampbell not disabled by xdebug.enable, but removed from php.ini I meant |
Apparently Xdebug added support for PHP 7.3 recently As @GrahamCampbell mentions there are still a couple of issues in their tracker. Not sure how to generate a report of this problem for them. |
Update: as discussed below, this is a bug in Homebrew/macOS/PHP/pcntl. It should really be worked around by disabling It has something to do with forking / pcntl. I'm trying to sort it out.
// really, don't do this. disable it in php.ini :)
return [
'usePcntl' => false,
]; |
Ok, got it! Homebrew-installed PHP 7.3.0 on Mojave segfaults when calling Repro: <?php
if (preg_match('/./', 'a')) echo "pre-fork works\n";
$pid = pcntl_fork();
if ($pid == -1) {
die('fail');
} elseif ($pid) {
if (preg_match('/./', 'a')) echo "parent works\n";
pcntl_wait($status);
if (pcntl_wifsignaled($status) && pcntl_wtermsig($status) == SIGSEGV) {
die('child process segfaulted');
}
} else {
if (preg_match('/./', 'a')) echo "child works\n";
} In PHP < 7.3, this results in:
But in PHP 7.3, we get:
I'm not sure what the extent of this issue is. 3v4l.org doesn't have PCNTL so we can't test there. All versions of PHP that Travis tests worked. That said, Travis is testing RC3, so it might be a bug introduced between that and the stable release? Are y'all on Homebrew + Mojave? Can anyone repro this with other PHP 7.3 versions or sources or operating systems? |
Yeah. |
Same here, Homebrew and Mojave without xdebug installed. |
Just to let you know: same problem with |
Also installed via Homebrew? |
Yes! |
Ubuntu 16.04 + PHP 7.3 (ppa:ondre/php) + psysh 0.9.9 works fine. No segfault when running #540 (comment) |
It fails for both bottled and built-from-source PHP 7.3 via Homebrew. |
As a workaround: In php.ini set Note comment below. |
@hulkur Please don't recommend people to disable JIT, report a bug to bugs.php.net instead and only suggest it as a temporary workaround. JIT is an important performance feature. |
@bobthecow, Thanks for the workaround. However, I was not able to find the config file that you referenced.
May I know how do you open this file and drop in the code you mentioned? Thanks. Running Mac Mojave |
@johnchendev Try creating a file at <?php
return [
'usePcntl' => false,
]; That's it. |
See also that whole page under the "your config file" link in my comment 😉 |
@bobthecow Thanks for posting the issue here. I'm using a completely different package (Resque) that also forks and crashes on preg_match. Also on Homebrew Mojave. Is there an issue on the Homebrew repository already that tracks this? |
Not that I know of. Wanna take it over there? :) |
Added issue @ Homebrew Homebrew/homebrew-core#35491 |
Unfortunately, it's not working with PHP |
Just wanted to say I appreciate @bobthecow keeping this open, even tho at this point it seems clear to be a platform issue. The config based solution works as a 'fix', but the issue is pervasive beyond psysh so not a real/full solution. Until the underlying issue is fixed then other applications and use cases will still be affected. Perhaps more important, it means that a development environment is even less similar to production environments. |
this solve the problem for now |
Brew's PHP 7.3.6 - still crashes. This fixes it. |
For the record, I had this problem with PHP 7.2.19 on MacOS Mojave – the suggested fix of disabling the pcntl extension in psysh config fixed it for me. And I don't use Homebrew at all. |
@miken32 And you're on a Mac, PC, or Linux? |
That worked for me. Thank you |
It looks like this is fix with PHP 7.3.7 Homebrew. At least for me, I don't need the line in |
I just tried upgrading from 7.3.5 -> 7.3.7 and it did not resolve the issue for me :( |
Same issue as @welenofsky, not working after upgrading. I wonder if @ngocphamm has something setup differently on their machine? |
I'm not too sure. This is my
|
@ngocphamm I wonder if it has something to do with other system configurations though. Like the Mac OS X version you're using, PCRE version, things like that maybe? I'm also forgetting and wonder if this is isolated to Mac's or if it would also affect other Unix based systems? |
I'm using latest macOS 10.14.5, with both
|
I am using the same macOS version (10.14.5) and same PCRE/PCRE2 versions as you listed. Wondering what the difference could be. |
It has been reported on Linux systems as well. |
It worked for me. Thanks for the workaround! |
Just upgraded to PHP 7.3.11 and psysh is working again |
I can confirm the same. I do not need to set |
Same for me. Seems to be finally fixed 👍 |
Confirmed ! 🥇 |
All good here (PHP 7.3.11) |
Confirmed here as well! |
Working for me as well. I'm going to close this, but leave it pinned, so people can find it if they need to. |
From @dciancu:
laravel/tinker#63
I can confirm it's happening to me as well. Any input closes the REPL, no errors or messages at all.
Any ideas about how to proceed? Thanks.
The text was updated successfully, but these errors were encountered: