-
-
Notifications
You must be signed in to change notification settings - Fork 251
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
Crashes when run against installed nextcloud. #549
Comments
I see an exit code 0, so something cleanly terminated the server. That would be a good starting point, try to figure out why the server is exiting. |
Hey ! I suspect it may be due to user change as I see some logs mentioning cannot create directories. To add more info, when run with the worker mode, it crashes with code 139 The app seems to work fine with php-fpm - likely because of the user and group settings in fpm config. Worker mode logs
|
yes, php-fpm starts as root and then switches users after opening ports. Caddy starts as whatever user starts it and that's it. This means if you want to open a port less than 1024, you'll need to give it permission to do so, as well as give it access to whatever folders it needs access to as that user. There's a pretty good guide here: https://www.booleanworld.com/host-website-caddy-web-server-linux/ that is still relevant and covers all the details. |
Have updated the docs at #565 as I wasn't able to use the existing example. |
I have been able to create a container which runs as www-data. Now I see segmentation fault in the frankenphp.
|
Something I haven't tried, but might be worth trying, is to try putting this in your worker script: // at the beginning of the request
ob_start();
// handle request
// at the very end of the request
ob_end_flush(); That should prevent any output from being sent to Go inside a fiber 🤞 and prevent the crash. I'm not sure about headers, which we would also want to prevent. It would also prevent any streaming responses from working, so it isn't ideal. At all (and might break many things). |
@dunglas it just occurred to me (and possibly not even related to the main issue) that it might be worth asking in internals if there is a way to switch back to the main stack in C, then send the data to Go, then switch the stack back to the target stack and resume execution; instead of sending output directly to Go. Something like this:
I'm pretty sick today, so I can't do anything complicated like digging into that. |
Hello, can reproduce using FrankenPHP standalone binary on arm64 (Raspberry Pi 3) I can successfully install Nextcloud using occ command :
When, at the first connection using the Web UI, I got a segmentation fault:
I could try to reproduce it on x86_64, if it is useful? |
What would be the most useful is a stack trace. You can gather one by following these instructions: https://frankenphp.dev/docs/contributing/#debugging-segmentation-faults-with-static-builds |
What happened?
Disclaimer: I have zero prior experience in php - so if you find this bug report irrelevant, lmk.
I tried to hack together the nextcloud dockerfile to make it work with frankenphp - The original code can be found at https://github.com/nextcloud/docker/tree/master/28/apache
I have basically change the build container to frakenphp and the entry point to frankenphp run --config /etc/caddy/Caddyfile
The TLDR can be - how to run nextcloud under frankenphp ?
Dockerfile
I also made a small change to entrypoint into run nextcloud installations for
frankenphp
entrypoint
Caddy logs
Now when I try to run the docker image with the below caddyfile
The container crashes when I visit https://localhost
Build Type
Docker (Alpine)
Worker Mode
No
Operating System
GNU/Linux
CPU Architecture
x86_64
Relevant log output
No response
The text was updated successfully, but these errors were encountered: