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 (core dumped) #1129

Open
kharbat opened this issue Nov 1, 2024 · 2 comments
Open

Segmentation fault (core dumped) #1129

kharbat opened this issue Nov 1, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@kharbat
Copy link

kharbat commented Nov 1, 2024

What happened?

Not necessarily a bug - I'm testing Frankenphp for the first time on my Yii2 project.

Running frankenphp php-server -a -v in my web directory. It works for seconds, it handles a few requests and then randomly crashes with no meaningful message, just Segmentation fault (core dumped).

Am I missing something?

Build Type

Standalone binary

Worker Mode

No

Operating System

GNU/Linux

CPU Architecture

x86_64

PHP configuration

default php8.3 php.ini

Relevant log output

No response

@kharbat kharbat added the bug Something isn't working label Nov 1, 2024
@kharbat
Copy link
Author

kharbat commented Nov 1, 2024

Trying the worker mode using frankenphp php-server -a -v --worker /var/www/api/web/index.php

Results with the following errors. Knowing that I have no function called apache_request_headers() in the entire code.

- 2024/11/01 22:40:43.256 ERROR   unexpected termination, restarting      {"worker": "/var/www/api/web/index.php", "exit_status": 1}

- 2024/11/01 22:40:43.256 DEBUG   apache_request_headers() called in non-HTTP context     {"worker": "/var/www/api/web/index.php"}

- 2024/11/01 22:40:43.254 DEBUG   apache_request_headers() called in non-HTTP context     {"worker": "/var/www/api/web/index.php"}

- 2024/11/01 22:40:43.257 ERROR   unexpected termination, restarting      {"worker": "/var/www/api/web/index.php", "exit_status": 1}

- 2024/11/01 22:40:43.255 ERROR   unexpected termination, restarting      {"worker": "/var/www/api/web/index.php", "exit_status": 1}

- 2024/11/01 22:40:43.257 DEBUG   starting        {"worker": "/var/www/api/web/index.php", "num": 40}

- 2024/11/01 22:40:43.255 DEBUG   apache_request_headers() called in non-HTTP context     {"worker": "/var/www/api/web/index.php"}

- 2024/11/01 22:40:43.253 ERROR   unexpected termination, restarting      {"worker": "/var/www/api/web/index.php", "exit_status": 1}

@dunglas
Copy link
Owner

dunglas commented Nov 2, 2024

It's probably one of your library that calls apache2_resuests_headers().

For the crash, please check that your or code or the libraries you use aren't using an extension known to crash (the usual suspect is OpenSSL): https://frankenphp.dev/docs/known-issues/#buggy-php-extensions

If you're using OpenSSl, please switch to the Docker image we provide or compile FrankenPHP locally. This will fix the issue.

If it's another thing, could you follow these steps to get a stack trace please? https://frankenphp.dev/docs/contributing/#debugging-segmentation-faults-with-static-builds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants