Your message dated Sat, 25 Apr 2009 12:32:49 -0500
with message-id <[email protected]>
and subject line Bug fixed in php5/5.2.9.dfsg.1-2
has caused the Debian Bug report #514832,
regarding php5: performance: php_curl_stream_read() unnecessarily sleeps 15
secs under heavy load.
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
514832: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=514832
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: php5
Version: 5.2.0-8+etch13
Severity: normal
Tags: patch, upstream
php_curl_stream_read() in ext/curl/streams.c always calls select() after
firing up a connection. however, when the php client is under heavy
load, the server might have already responded, and the last call to
curl_multi_perform() before entering the loop might have received all
the data and closed the connection. at this point, curl_multi_fdset()
in the loop returns maxfs == -1, and the following select turns into a
pointless 15 sec sleep.
I believe this problem is related to http://bugs.php.net/bug.php?id=23258
please see the attached patch.
regards
g.b.
-- System Information:
Debian Release: 4.0
APT prefers stable
APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/dash
Kernel: Linux 2.6.18-6-686
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages php5 depends on:
ii libapache2-mod-php5 5.2.0-8+etch13 server-side, HTML-embedded scripti
ii php5-common 5.2.0-8+etch13 Common files for packages built fr
php5 recommends no packages.
-- no debconf information
diff -Nur php-5.1.6.old/ext/curl/streams.c php-5.1.6/ext/curl/streams.c
--- php-5.1.6.old/ext/curl/streams.c 2006-08-10 19:16:35.000000000 +0200
+++ php-5.1.6/ext/curl/streams.c 2009-02-04 17:16:39.000000000 +0100
@@ -160,7 +160,8 @@
tv.tv_sec = 15; /* TODO: allow this to be configured from the script */
/* wait for data */
- switch (select(curlstream->maxfd + 1, &curlstream->readfds, &curlstream->writefds, &curlstream->excfds, &tv)) {
+ switch ((curlstream->maxfd < 0) ? 1 :
+ select(curlstream->maxfd + 1, &curlstream->readfds, &curlstream->writefds, &curlstream->excfds, &tv)) {
case -1:
/* error */
return 0;
@@ -173,7 +174,8 @@
curlstream->mcode = curl_multi_perform(curlstream->multi, &curlstream->pending);
} while (curlstream->mcode == CURLM_CALL_MULTI_PERFORM);
}
- } while (curlstream->readbuffer.readpos >= curlstream->readbuffer.writepos && curlstream->pending > 0);
+ } while (curlstream->maxfd >= 0 &&
+ curlstream->readbuffer.readpos >= curlstream->readbuffer.writepos && curlstream->pending > 0);
}
--- End Message ---
--- Begin Message ---
Version: 5.2.9.dfsg.1-2
Hi,
Due to a slip while generating the changelog the bug closers were not present
in the latest upload. Changelog follows:
php5 (5.2.9.dfsg.1-2) unstable; urgency=low
[ Mark A. Hershberger ]
* fix up clean target
[ Thijs Kinkhorst ]
* Update package sections to match override.
[ Raphael Geissert ]
* Detect the path to ltmain.sh at build time and set conflicts
appropriately
* Add libdb4.7-dev as an ORed build dependency to fix FTBFS
* Update the Vcs-* fields to reflect the move from svn to git
* Turn the phpapi dependencies into php5 | phpapi to fix
installability issues
* Bump Standards-Version to 3.8.1, no change needed
* Fix a typo in the code: s/adress/address
* Add a set of lintian overrides for some FP spelling-error-in-binary
* Avoid a useless 15 seconds sleep on php_curl_stream_read under heavy
load
[ Sean Finney ]
* update our libtool patching to be a little cleaner and smarter
* cleanup some of the phpize "cleanup" code in debian/rules
* slightly refined way for supporting old/new libtool dirs
-- Sean Finney <[email protected]> Thu, 23 Apr 2009 21:13:03 +0200
Cheers,
--
Raphael Geissert - Debian Maintainer
www.debian.org - get.debian.net
--- End Message ---