Open rhift opened 11 months ago
Hey @doubaokun - I was able to reproduce this using the following,
<?php
declare(strict_types=1);
use OpenSwoole\Constant;
use OpenSwoole\Http\Request;
use OpenSwoole\Http\Response;
use OpenSwoole\Http\Server;
use OpenSwoole\Runtime;
use OpenSwoole\Util;
$Server = new Server('host.docker.internal', 62481);
$Server->set([
'reactor_num' => Util::getCPUNum() * 2,
'hook_flags' => Runtime::HOOK_ALL,
'log_level' => Constant::LOG_DEBUG,
'log_file' => '/proc/1/fd/1',
// 'open_cpu_affinity' => true,
'tcp_fastopen' => true,
'open_tcp_keepalive' => true,
'http_compression' => true,
'http_compression_level' => 6,
'open_http2_protocol' => true,
'compression_min_length' => 128,
'backlog' => 100000,
'reload_async' => false,
]);
$Server->on('Request', static function (Request $Request, Response $Response): void {
file_put_contents('FILENAME', 'CONTENTS');
});
$Server->start();
The takeaway is if file_put_contents
or file_get_contents
is used during the Request
event that error is then emitted.
Hoping this helps! Please let me know if there is anything else I can do to help =) Thank you!
It seems we can't reproduce the issues you have seen at https://github.com/openswoole/ext-openswoole/commit/2a359d1f2f6174bdbb5a582b137c6312928ebe2c. Please provide codes and open this thread again.
hey @doubaokun - it seems like the other key is to have seemingly any Preload script defined. I just use one that does nothing.
I have put together and tested this repository which will build and run a container that exhibits this behavior.
Thanks so much, and please let me know if I can help further!
Hey there, should I open a new ticket?
Hi there, this is also present in 8.3.1 fwiw (and not present in 8.2.14).
Hi again, is there anything I can do to get a project member to help me with this? I really want to get on the the latest 8.3 (which is 8.3.2 currently) and this behavior exhibits itself across all three 8.3 releases. I really appreciate the project, all the time that goes into it. I'm really looking for help at this point because I don't have the tooling or skillset to move this along any further, but I will do anything and everything I can to help or give back in some way to get this resolved. Please help me. Thank you very much =)
Present in 8.3.3 and not present in 8.2.16. Help
I might have some cycles to look into this. Is this still the case? I am unable to reproduce on 8.3.2 with Swoole 22.1.2. Can you send output of php -i ?
Hey there @bitslip6, any help would be greatly appreciated.
It is present so far in every PHP release >=8.3.0
.
Are you familiar with Docker? I have published a Github repository that demonstrates this behavior,
https://github.com/QuantafireIO/343
This way it is easy to observe (just change the version of PHP or Open Swoole in the Dockerfile) and eliminates any doubt about technology versions, etc. The README lists the few steps to build, run, and observe this issue.
I have updated the PHP version in the Dockerfile now to the latest at this time, 8.3.7
, in which the issue is still present. I am more than happy to help in any way that I can.
Thank you very much for your interest, time, and efforts =)
php --ri openswoole
)?openswoole
Open Swoole => enabled Author => Open Swoole Group hello@openswoole.com Version => 22.1.0 Built => Nov 28 2023 17:21:03 coroutine => enabled with boost asm context epoll => enabled eventfd => enabled signalfd => enabled cpu_affinity => enabled spinlock => enabled rwlock => enabled http2 => enabled hook-curl => enabled zlib => 1.2.13 mutex_timedlock => enabled pthread_barrier => enabled futex => enabled postgresql => enabled
Directive => Local Value => Master Value openswoole.enable_coroutine => On => On openswoole.enable_preemptive_scheduler => Off => Off openswoole.display_errors => On => On openswoole.unixsock_buffer_size => 8388608 => 8388608
uname -a
Linux 9bf604120846 6.4.16-linuxkit #1 SMP PREEMPT_DYNAMIC Thu Nov 16 10:55:59 UTC 2023 x86_64 GNU/Linux
php -v
PHP 8.3.0 (cli) (built: Nov 27 2023 21:24:30) (NTS) Copyright (c) The PHP Group Zend Engine v4.3.0, Copyright (c) Zend Technologies with Zend OPcache v8.3.0, Copyright (c), by Zend Technologies
gcc -v
Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/12/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 12.2.0-14' --with-bugurl=file:///usr/share/doc/gcc-12/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-12 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-12-bTRWOB/gcc-12-12.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-12-bTRWOB/gcc-12-12.2.0/debian/tmp-gcn/usr --enable-offload-defaulted --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 12.2.0 (Debian 12.2.0-14)
and everything works great with
OpenSwoole
22.1.0 & PHP 8.2.13 (with the same configuration).Can someone help me get more detailed error information?
Thank you!