php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60719 dev-lang/php-5.3.9 has problems with stream_get_line()
Submitted: 2012-01-11 18:31 UTC Modified: 2012-01-23 18:10 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: alexander dot haensch at gmail dot com Assigned: cataphract (profile)
Status: Closed Package: Streams related
PHP Version: 5.3.9 OS: gentoo
Private report: No CVE-ID: None
 [2012-01-11 18:31 UTC] alexander dot haensch at gmail dot com
Description:
------------
It looks like that the new php version has a problem with talking to beanstalkd
on a local socket.
example:
$packet = stream_get_line($this->_connection, 16384, "\r\n");

https://github.com/davidpersson/beanstalk/blob/master/src/Socket/Beanstalk.php#L190

Expected result:
----------------
operation should finish in below 1second

Actual result:
--------------
needs about 1 minute to complete

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-01-11 22:41 UTC] cataphract@php.net
There's a change in 5.3.9 in stream_get_line that may be causing your problems, but to understand if it's a bug in PHP, we'd need a short reproducible script (or a pair of scripts in this case).

Thanks.
 [2012-01-11 22:41 UTC] cataphract@php.net
-Status: Open +Status: Feedback
 [2012-01-19 00:46 UTC] seguer at gmail dot com
I can confirm this occuring with PHP 5.3.9 and beanstalkd.

I have created an issue with test code on the beanstalkd github repo: https://github.com/kr/beanstalkd/issues/88

It only seems to happen with a socket connection to a beanstalkd service, as testing it against google.com.au is fine.
 [2012-01-22 23:14 UTC] seguer at gmail dot com
I have updated https://github.com/kr/beanstalkd/issues/88 with a packet trace suggested by kr, author of beanstalkd
 [2012-01-23 08:20 UTC] cataphract@php.net
Yesterday I committed some fixes to stream_get_line() (see bug #60817). Please see if it has any influence in your problem (it's likely it does).

Thank you.
 [2012-01-23 08:20 UTC] cataphract@php.net
-Status: Feedback +Status: Assigned -Assigned To: +Assigned To: cataphract
 [2012-01-23 08:21 UTC] cataphract@php.net
Snapshots can be found at http://snaps.php.net/ (note the fix is not in 5.4, only 5.3 and trunk).
 [2012-01-23 08:52 UTC] alexander dot haensch at gmail dot com
Can someone send the patch itself here? 
It impossible for me to test the whole php snapshot on my production system. If i could get the stream_get_line() patch i could test it.
 [2012-01-23 13:44 UTC] alexander dot haensch at gmail dot com
I applied a patch from the new streams.c you reported against vanilla 5.3.9. It compiles fine.
As soon as i'll have the technician ready,  i will report if this bug is fixed with the new streams.c.
 [2012-01-23 18:10 UTC] alexander dot haensch at gmail dot com
The bug is fixed with the new version of streams.c
 [2012-01-23 18:10 UTC] alexander dot haensch at gmail dot com
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 17:01:29 2024 UTC