peachpiecompiler / peachpie

PeachPie - the PHP compiler and runtime for .NET and .NET Core
https://www.peachpie.io
Apache License 2.0
2.31k stars 202 forks source link

High CPU consumption when use fread<--PhpStream.GetValid(handle) #1013

Closed avriltank closed 2 years ago

avriltank commented 2 years ago

highcpu the function 'fread' for socket stream make High CPU consumption when i use some Performance pressure test

jakubmisek commented 2 years ago

thank you for the issue;

This seems weird. This function basically does not do anything

https://github.com/peachpiecompiler/peachpie/blob/81e4cbe568dd7cc9d1df35e2e4a05fde654c1e48/src/Peachpie.Library/Streams/PhpStream.cs#L2017

avriltank commented 2 years ago

It happens only on windows.Any way peachpie can run my old project perfectly now,thanks!

avriltank commented 2 years ago

This error is because the function feof($socket) always return false!This behavior is diffrent from php,the code.