#50737 [Bgs]: stream_set_blocking creates high cpu usage

2010-01-28 Thread jani
 ID:   50737
 Updated by:   j...@php.net
 Reported By:  jason at lentink dot net
 Status:   Bogus
 Bug Type: Streams related
 Operating System: Linux
 PHP Version:  5.2.12
 New Comment:

Stil a FAIL:

Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed:
Name or service not known 


Previous Comments:


[2010-01-15 10:48:09] jason at lentink dot net

Then we go back to the first post and there is a 2 line example of the

problem.

Reproduce code:
---
?php
$socket = fsockopen(somehost, 631313, $errno, $errstr);
stream_set_blocking($socket, 0); // non blocking

this is enough to trigger the problem.
I hope this is short enough.



[2010-01-15 08:56:36] j...@php.net

Strike 3. As long as you can not provide a short reproducing script
(like described in my first comment to this report) the bug is most
likely something you did wrong.



[2010-01-14 12:53:42] jason at lentink dot net

Whatever you want :)

http://www.grasvezel.nl/media/software/cpuload.txt

Here is a complete undressed file which only has the problem.



[2010-01-14 12:17:19] j...@php.net

I asked for small, complete script NOT for a framework.



[2010-01-14 12:13:36] jason at lentink dot net

I could provide you guys with a small script
bug i can also point you to the place where the problem exists since 
it happens in Zend Framework.

http://framework.zend.com/svn/framework/standard/trunk/library/Zend/Queu
e/Stomp/Client/Connection.php

The function is used at line 79. What i see on my servers is that when

there are simultaneous request made to the same script the problem 
increases more rapidly.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/50737

-- 
Edit this bug report at http://bugs.php.net/?id=50737edit=1



#50737 [Bgs]: stream_set_blocking creates high cpu usage

2010-01-15 Thread jason at lentink dot net
 ID:   50737
 User updated by:  jason at lentink dot net
 Reported By:  jason at lentink dot net
 Status:   Bogus
 Bug Type: Streams related
 Operating System: Linux
 PHP Version:  5.2.12
 New Comment:

Then we go back to the first post and there is a 2 line example of the

problem.

Reproduce code:
---
?php
$socket = fsockopen(somehost, 631313, $errno, $errstr);
stream_set_blocking($socket, 0); // non blocking

this is enough to trigger the problem.
I hope this is short enough.


Previous Comments:


[2010-01-15 08:56:36] j...@php.net

Strike 3. As long as you can not provide a short reproducing script
(like described in my first comment to this report) the bug is most
likely something you did wrong.



[2010-01-14 12:53:42] jason at lentink dot net

Whatever you want :)

http://www.grasvezel.nl/media/software/cpuload.txt

Here is a complete undressed file which only has the problem.



[2010-01-14 12:17:19] j...@php.net

I asked for small, complete script NOT for a framework.



[2010-01-14 12:13:36] jason at lentink dot net

I could provide you guys with a small script
bug i can also point you to the place where the problem exists since 
it happens in Zend Framework.

http://framework.zend.com/svn/framework/standard/trunk/library/Zend/Queu
e/Stomp/Client/Connection.php

The function is used at line 79. What i see on my servers is that when

there are simultaneous request made to the same script the problem 
increases more rapidly.



[2010-01-13 12:07:10] j...@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.





The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/50737

-- 
Edit this bug report at http://bugs.php.net/?id=50737edit=1