PHP 5.5.9 Default socket timeout being not honoured by application

Bug #1481289 reported by Phil
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
php
Unknown
Unknown
php5 (Ubuntu)
Fix Released
Medium
Unassigned
Trusty
Triaged
Low
Unassigned

Bug Description

Hello,

There exists in PHP 5.5.9-1ubuntu4.11, a known bug, https://bugs.php.net/bug.php?id=41631 which has been patched and applied to PHP version 5.5.17 / 5.5.18 and also upstream 5.5/5.6/master branches.

PHP allows a socket timeout to set which is not honoured in code execution. This is business critical for the system I work on.

The timeout is set with a single line of code:
ini_set('default_socket_timeout', 10);

A patch exists that can be applied to non fixed PHP versions.

Can the patch, found here: https://bugs.php.net/patch-display.php?bug_id=41631&patch=bug41631.patch&revision=latest, be applied to the version of PHP 5.5.9 in Ubuntu 14.04.2 LTS and rolled out please?

Thank you,

Tags: php5
Robie Basak (racb)
tags: added: bitesize
Robie Basak (racb)
tags: added: server-next
Robie Basak (racb)
Changed in php5 (Ubuntu):
assignee: nobody → Ryan Harper (raharper)
Robie Basak (racb)
tags: removed: server-next
Revision history for this message
Ryan Harper (raharper) wrote :

Hello,

The referenced patch:

 https://bugs.php.net/patch-display.php?bug_id=41631&patch=bug41631.patch&revision=latest

Does not apply against 5.5.9-1ubuntu4.11 source. Further, from the bug referenced it doesn't appear that patch specified was the final solution committed to source.

The most recent comment in the bug suggests that 3 commits were needed and applied to 5.5

This has been addressed (we believe once and for all) in upstream 5.5/5.6/master branches. Thanks to bbroerman for the associated patches.

http://git.php.net/?p=php-src.git;a=commitdiff;h=fd4641696cc67fedf494717b5e4d452019f04d6f
http://git.php.net/?p=php-src.git;a=commitdiff;h=1482ed2d5660c3875add40706a18fe29e2b3ff70
http://git.php.net/?p=php-src.git;a=commitdiff;h=dddbe0fc338a0f01ba336e84755694fb9bfbeb53

These are commits further along in php 5.5 series, 5.5.23ish, so these patches don't cleanly apply either.
I'm a bit wary about backporting these three safely into 5.5.9 and I don't think we can push newer 5.5.X without a Micro Release Exception (https://wiki.ubuntu.com/StableReleaseUpdates/MicroReleaseExceptions) as there isn't one in place for php.

The development release (wily) is running 5.6 which has these fixes already included from trunk.

Changed in php5 (Ubuntu):
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Ryan Harper (raharper) wrote :

If someone can pull together a working set of patches that pulls in the changes needed for the current version in trusty that can apply along with a test-case, then we can pick up reviewing those for SRU.

Changed in php5 (Ubuntu):
assignee: Ryan Harper (raharper) → nobody
status: Incomplete → Triaged
Revision history for this message
Robie Basak (racb) wrote :

This seems non-trivial now, since the SRU would need to be a minimal patch and the upstream patches include extensive refactoring which are not necessarily relevant for the bugfix and the adjusting of which will carry additional regression risk to existing users. So I am removing the bitesize tag accordingly.

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

Looks like this was fixed in 5.6.7 upstream so it is fixed in Xenial's 5.6.14+dfsg-1ubuntu1. Marking Fix Released.

Trusty is still affected I think, but as above backporting the fix is non-trivial. Volunteers welcome.

Changed in php5 (Ubuntu):
status: Triaged → Fix Released
Changed in php5 (Ubuntu Trusty):
status: New → Triaged
importance: Undecided → Low
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.