php / php-src

The PHP Interpreter
https://www.php.net
Other
38k stars 7.73k forks source link

Issues only when uploading files with php-fpm. Using Project castopod and php8.2.7 #11425

Closed sysadminpower2019 closed 1 year ago

sysadminpower2019 commented 1 year ago

Description

When trying to upload files using Apache and Firefox (Chrome, etc). The file tries to upload, takes a several minutes even for a 5mb upload and then produces the error.

I have tested this on my main server but also a freshly installed server with the exact same errors. The version of this project that uses Docker seems to work.

Resulted in this output: '''

Error 503 "Service Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later."

[11-Jun-2023 16:26:07] NOTICE: Terminating ... [11-Jun-2023 16:26:07] NOTICE: exiting, bye-bye! [11-Jun-2023 16:26:07] NOTICE: fpm is running, pid 237231 [11-Jun-2023 16:26:07] NOTICE: ready to handle connections [11-Jun-2023 16:26:07] NOTICE: systemd monitor interval set to 10000ms [11-Jun-2023 16:26:13] NOTICE: Terminating ... [11-Jun-2023 16:26:13] NOTICE: exiting, bye-bye! [11-Jun-2023 16:26:13] NOTICE: fpm is running, pid 238956 [11-Jun-2023 16:26:13] NOTICE: ready to handle connections [11-Jun-2023 16:26:13] NOTICE: systemd monitor interval set to 10000ms [11-Jun-2023 16:26:46] NOTICE: Terminating ... [11-Jun-2023 16:26:46] NOTICE: exiting, bye-bye! [11-Jun-2023 16:26:46] NOTICE: fpm is running, pid 239143 [11-Jun-2023 16:26:46] NOTICE: ready to handle connections [11-Jun-2023 16:26:46] NOTICE: systemd monitor interval set to 10000ms [11-Jun-2023 16:27:48] WARNING: [pool www] child 239145 exited on signal 11 (SIGSEGV) after 62.266743 seconds from start [11-Jun-2023 16:27:48] NOTICE: [pool www] child 239166 started

Core Dump as follows:

(gdb) bt

0 0x000055e6815331b1 in _emalloc ()

1 0x000055e68148f073 in ?? ()

2 0x000055e6815cc6dc in execute_ex ()

3 0x000055e6815cd4c2 in zend_execute ()

4 0x000055e68155c625 in zend_execute_scripts ()

5 0x000055e6814f72cc in php_execute_script ()

6 0x000055e68138cebc in ?? ()

7 0x00007f58e4a4618a in __libc_start_call_main (main=main@entry=0x55e68138c190, argc=argc@entry=4, argv=argv@entry=0x7ffd74212bc8) at ../sysdeps/nptl/libc_start_call_main.h:58

8 0x00007f58e4a46245 in __libc_start_main_impl (main=0x55e68138c190, argc=4, argv=0x7ffd74212bc8, init=, fini=, rtld_fini=,

stack_end=0x7ffd74212bb8) at ../csu/libc-start.c:381

9 0x000055e68138e36a in _start ()

But I expected this output instead: File should upload

I am not a programmer but a system administrator, so please let me know what more information you need to help resolve this issue.

PHP Version

php 8.2.7

Operating System

Debian 11 bullseye

bukka commented 1 year ago

This needs more info like some piece of code triggers the segfault or at least install debug symbol so there is more info in core dump.

yassinedoghri commented 1 year ago

Hey, Castopod's core maintainer here 👋

Just wanted to say that Castopod was not made compatible with php8.2 yet, so errors are expected if used with v8.2. I think this should be closed.

iluuu1994 commented 1 year ago

@yassinedoghri Thank you for your input. Optimally, no PHP code should be able to cause segfaults / crash the process (with some exceptions, like stack overflows until recently, high memory consumption with a memory_limit config that's too generous, FFI, etc).

@sysadminpower2019 Thank you for adding the backtrace! Unfortunately it's still not very helpful, the backtrace is probably in an unrelated place. Is there anything special in your configuration? E.g. do you have JIT enabled? That's a common cause for crashes. Do you have opcache enabled?

If you can, compiling PHP yourself and enabling the ./configure --enable-address-sanitizer flag could be helpful. In that case, you should also run PHP with the USE_ZEND_ALLOC=0 environment variable set.

github-actions[bot] commented 1 year ago

No feedback was provided. The issue is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so. Thank you.