Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39983 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74126 invoked from network); 16 Aug 2008 02:36:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Aug 2008 02:36:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=lnealan@facebook.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=lnealan@facebook.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain facebook.com designates 204.15.23.140 as permitted sender) X-PHP-List-Original-Sender: lnealan@facebook.com X-Host-Fingerprint: 204.15.23.140 fw-sf2p.facebook.com Received: from [204.15.23.140] ([204.15.23.140:2076] helo=mailout-sf2p.facebook.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 95/7C-11888-D1D36A84 for ; Fri, 15 Aug 2008 22:36:14 -0400 Received: from SF2PMXF01.TheFacebook.com (sf2pmxf01.thefacebook.com [192.168.16.11]) by pp01.sf2p.tfbnw.net (8.14.1/8.14.1) with ESMTP id m7G2a5tH016929 for ; Fri, 15 Aug 2008 19:36:05 -0700 Received: from Sf2pmxb04.TheFacebook.com ([192.168.16.99]) by SF2PMXF01.TheFacebook.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 15 Aug 2008 19:36:05 -0700 Received: from 10.8.254.247 ([10.8.254.247]) by Sf2pmxb04.TheFacebook.com ([192.168.16.99]) via Exchange Front-End Server mail.thefacebook.com ([192.168.16.11]) with Microsoft Exchange Server HTTP-DAV ; Sat, 16 Aug 2008 02:36:05 +0000 User-Agent: Microsoft-Entourage/12.12.0.080729 Date: Fri, 15 Aug 2008 19:36:01 -0700 To: PHP Internals List Message-ID: Thread-Topic: [PATCH] Apache 1.x sapi timeout name fix Thread-Index: Acj/SNI8/oYy/uUJLkOKazeDUBzj5w== Mime-version: 1.0 Content-type: text/plain; charset="windows-1251" Content-transfer-encoding: 7bit X-OriginalArrivalTime: 16 Aug 2008 02:36:05.0475 (UTC) FILETIME=[D4E7D330:01C8FF48] X-Proofpoint-Virus-Version: vendor=fsecure engine=1.12.7160:2.4.4,1.2.40,4.0.166 definitions=2008-08-15_05:2008-08-12,2008-08-15,2008-08-15 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=5.0.0-0805090000 definitions=main-0807290170 Subject: [PATCH] Apache 1.x sapi timeout name fix From: lnealan@facebook.com (Lucas Nealan) Hello, Apache 1.x SAPI will occasionally timeout with a "Read POST information timeout" error instead of a "send timeout" error as it should. This will happen if the alarm timeout occurs in a POST request, at any point after the post is read (ie. php_execute_script). This is because the hard_timeout("send") name set within send_php() is overridden by the hard_timeout("Read POST information") in sapi_apache_read_post() and never restored. I walked through the startup calls from the point where timeout is set in send_php to where the read post timeout is set. It seems highly unlikely that a timeout should happen in this code, even if it were set to 1. The patches below will correct the timeout name by moving the hard_timeout("send") from send_php() to php_apache_sapi_activate(), which is called just after the post is read. http://sizzo.org/~screen/patches/php-5.3.0-timer_post.patch http://sizzo.org/~screen/patches/php-HEAD-timer_post.patch -lucas