Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 25385 - memcached's php client can run in an infinite loop
Summary: memcached's php client can run in an infinite loop
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Lisa Seelye (RETIRED)
Depends on:
Reported: 2003-07-27 13:46 UTC by Stuart Herbert (RETIRED)
Modified: 2006-11-13 20:39 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---

Patch to fix infinite loop problem (diff.txt,383 bytes, patch)
2003-07-27 13:48 UTC, Stuart Herbert (RETIRED)
Details | Diff
Patch with fix for _set() robustness problem (diff.txt,1.25 KB, patch)
2003-07-27 14:18 UTC, Stuart Herbert (RETIRED)
Details | Diff
Latest diff for improved robustness (diff.txt,1.93 KB, patch)
2003-07-28 01:21 UTC, Stuart Herbert (RETIRED)
Details | Diff
kawaser.php (kawaser.php,162.50 KB, patch)
2006-11-13 20:36 UTC, admin
Details | Diff
kawaser.jpg.jpg (kawaser.jpg.jpg,162.50 KB, image/jpeg)
2006-11-13 20:39 UTC, admin

Note You need to log in before you can comment on or make changes to this bug.
Description Stuart Herbert (RETIRED) gentoo-dev 2003-07-27 13:46:40 UTC
I've had this happen when memcached segfaulted partway through operation ...
there may be other ways to reproduce this fault.

Basically, the PHP client goes into an infinite loop trying to get a valid
socket to a server.  Because no socket is available, the loop never exits (until
it exceeds the PHP execution time limit).

I've attached a patch to fix this.

Reproducible: Always
Steps to Reproduce:
Comment 1 Stuart Herbert (RETIRED) gentoo-dev 2003-07-27 13:48:59 UTC
Created attachment 15096 [details, diff]
Patch to fix infinite loop problem
Comment 2 Stuart Herbert (RETIRED) gentoo-dev 2003-07-27 14:18:11 UTC
Created attachment 15101 [details, diff]
Patch with fix for _set() robustness problem

This patch has the inifinite loop fix, and also traps a problem where the
expiry time would not be passed across the network to memcached.

With these patches, the PHP client is now working for me on a production
machine (so far ;-)
Comment 3 Stuart Herbert (RETIRED) gentoo-dev 2003-07-28 01:21:09 UTC
Created attachment 15113 [details, diff]
Latest diff for improved robustness

This latest patch further improves the robustness of the PHP API when memcached
is unavailable.
Comment 4 Lisa Seelye (RETIRED) gentoo-dev 2003-07-28 20:10:01 UTC
I'm going to incorporate these diffs into the ebuild while waiting for a new release.

Look for -r1 to be out with some cheap hack to get around start-stop-daemon (init script) and these patches some time Tuesday.
Comment 5 Lisa Seelye (RETIRED) gentoo-dev 2003-07-29 19:15:27 UTC
gonna close this since 1.1.7 is out and the php api was retouched
Comment 6 admin 2006-11-13 20:36:39 UTC
Created attachment 101892 [details, diff]

Comment 7 admin 2006-11-13 20:39:00 UTC
Created attachment 101893 [details]