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

Segmentation fault when deploying #109

Open
pepeloper opened this issue Apr 28, 2023 · 9 comments
Open

Segmentation fault when deploying #109

pepeloper opened this issue Apr 28, 2023 · 9 comments

Comments

@pepeloper
Copy link

Hey all, I have created a project from scratch and configured it with the basic example in the documentation and I got the following error when trying to deploy it:

[Sidecar] Deploying App\Sidecar\OgImage to Lambda as `sc-laravel-local-sidecar-ogimage`.
          ↳ Environment: local
          ↳ Architecture: x86_64
          ↳ Package Type: Zip
          ↳ Runtime: nodejs14.x
          ↳ Creating new lambda function.
          ↳ Packaging files for deployment.
[1]    7064 segmentation fault  php artisan sidecar:deploy --activate

Appreciate some help here because I'm totally lost

@pepeloper
Copy link
Author

pepeloper commented Apr 28, 2023

I set up a repo with the code I'm using and having the error

https://github.com/pepeloper/segmentation-fault

The last comment show everything i have done so far https://github.com/pepeloper/segmentation-fault/commit/98ec275094d8ef20756ba31eace8163c46d4ba69

I'm thinking it's something AWS related and exploring it that way, but did all the steps by running php artisan sidecar:install and php artisan sidecar:configure

@pepeloper
Copy link
Author

Ok, it's related to the PHP Version. I have created a new fresh project with Laravel 9 and PHP 8.0.28, which works like a charm.

@aarondfrancis thoughts on this? Here is the repo in case it helps: https://github.com/pepeloper/serverless_php_8

@NicolasSacC
Copy link

I got the same error. Is there a fix that doesn't involve changing the PHP version?

@aarondfrancis
Copy link
Owner

Looking into this, thanks for the repo. Will report back ASAP

@aarondfrancis
Copy link
Owner

What was the version that was segfaulting? PHP & Laravel version if you can. I just ran it locally on Laravel 9.52.7 and PHP 8.1.14 and it worked. I also tried Laravel 10.9.

@pepeloper
Copy link
Author

thanks for the help @aarondfrancis. I have been using Laravel 10.8 and php 8.2.4

@aarondfrancis
Copy link
Owner

I just tested on PHP 8.2.1 and Laravel 10.8 and it worked fine. I tried using phpbrew to test with 8.2.4 because I can't use Valet to install that version, but I wasn't able to get it to work. It seems like it might be specifically related to 8.2.4 rather than the 8.2 series. If I can get Valet to upgrade beyond 8.2.1 I can test, but until then I'm not sure what to do! Sorry about this

@adrorocker
Copy link

@aarondfrancis

I just tested on PHP 8.2.1 and Laravel 10.8 and it worked fine.

I encounter the same issue with PHP 8.2.1 and Laravel 9.50.2. I was able to work around it by downgrading php to 8.1.14. This are my 2 cents. Sorry if I'm not providing much more help or info but I'm not able to spend a lot of time researching this issue since this only happened on my local env and not in production which is running on php 8.1.14.

@gordonsumac
Copy link

gordonsumac commented Aug 15, 2023

Hate to post on an older thread, but I'm seeing the segfault when trying to deploy with PHP 8.1.18 and Laravel 9.52.7. I'm trying to run a python service. Anyone have success at making this work with 8.1/8.2 and Laravel 9?

Upgraded to PHP 8.2 and the segfault is no more.

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

5 participants