stream_get_line() incorrectly blocks

Bug #1162999 reported by Joel Bradshaw
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
php
Unknown
Unknown
php5 (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

PHP 5.3.10 (Ubuntu package version 5.3.10-1ubuntu3.6) has a regression that breaks the stream_get_line() function, as documented at https://bugs.php.net/bug.php?id=60817 - specifically, this SVN commit: http://svn.php.net/viewvc/?view=revision&revision=322582

This is critical in some applications - in my case, it breaks the PHP beanstalkd client I use. As mentioned in the PHP bug above, it was fixed in the next version, PHP 5.3.11. I'm not sure of the package update policies, but if this could be upgraded (or cherry-picked) in one of the precise repos, it would save many people pain who upgrade from an older LTS to the current one and find their PHP apps broken.

description: updated
description: updated
Revision history for this message
Ondřej Surý (ondrej) wrote :

The update policy doesn't allow that. However either you can upgrade to newest PHP using PPA (ppa:ondrej/php5) or that individual fix for this bug can be backported if severity is high enough. Usually it needs to be security bug or the impact has to be quite big.

Revision history for this message
Robie Basak (racb) wrote :

Thank you for reporting this bug and helping to make Ubuntu better.

The update policy is documented at https://wiki.ubuntu.com/StableReleaseUpdates. PHP doens't have a microrelease exception, so we can only backport a fix. Thanks for pointing us to it!

summary: - PHP should be updated in 12.04.1 LTS, as 5.3.10 has a regression
+ stream_get_line() incorrectly blocks
Robie Basak (racb)
tags: removed: upgrade-software-version
Revision history for this message
Robie Basak (racb) wrote :

Before this bug can be considered for 12.04, it must first be fixed in the development version.

Using the test case provided in the upstream bug, with the development release (5.4.9-4ubuntu2), I'm getting:

server got line: test #1
server got line: test2
server got line: test3
server got line: test4
server got line:
client done
server got line:
server done

This seems to be consistent, but there is a long hang after the first four lines before the rest of the result appears and the program exits.

On precise-security (5.3.10-1ubuntu3.6), I get:

server got line: test #1
client done
server got line: test2
server got line: test3
server got line: test4
server done

This is also consistent. This time I get a long hang before any output, and then the entire result appears and the program exits.

These results do not appear to be consistent with the actual and expected test case results in the upstream bug. Could you help with this, please? Am I interpreting this wrong? Is the bug fixed in the development version? Can you provide an updated test case, expected results and actual results that work with the released Ubuntu packages?

Changed in php5 (Ubuntu):
status: New → Incomplete
Revision history for this message
Nigel Smith (gb10hkzo-spa) wrote :

Surely you guys can make an exception to your policy under the "Bugs which do not fit under above categories, but (1) have an obviously safe patch and (2) affect an application rather than critical infrastructure packages (like X.org or the kernel). " rule ??

Its a very frustrating bug and asking people to go PPA just to get around this one bug seems completely non-sensical.

Revision history for this message
Robie Basak (racb) wrote :

I don't think SRU policy is a problem here. Find us the obviously safe patch, and I believe it'll meet SRU policy. I don't recall this specific bug and will need to review this again, but I did say:

"These results do not appear to be consistent with the actual and expected test case results in the upstream bug. Could you help with this, please? Am I interpreting this wrong? Is the bug fixed in the development version? Can you provide an updated test case, expected results and actual results that work with the released Ubuntu packages?"

This is the reason for the hold up, not SRU policy.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.