Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45063 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94940 invoked from network); 23 Jul 2009 13:20:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jul 2009 13:20:59 -0000 Authentication-Results: pb1.pair.com header.from=torokalpar@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=torokalpar@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 72.14.220.157 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: torokalpar@gmail.com X-Host-Fingerprint: 72.14.220.157 fg-out-1718.google.com Received: from [72.14.220.157] ([72.14.220.157:27089] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D8/93-11537-9B3686A4 for ; Thu, 23 Jul 2009 09:20:58 -0400 Received: by fg-out-1718.google.com with SMTP id 13so1106294fge.0 for ; Thu, 23 Jul 2009 06:20:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=vqKifIXj9WMcySUrShVwhfMUxf33Olf4g2oYk/8/CMI=; b=gACMXhwLTBvmsipd6bYJnqk6P5zc8RaxVfGgpbxBGbBxILcTQb6f2oPINMlw89xFsV s70piGWABjg/ZBVy8cIEZGToYmwN/ShLM24QxWZKGcOr9e5eOAmvSS80NiH4nvZTsZzE kIZs+6j3BRQRaHv/H6tBpBfzcWv52Pz2WOy4w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=JUMy4qIDHgJwuksQsPGeIR4SGesu4xkJusjKQ5gQxNoq94qdEYro6QnzU3bsgIyAAh 2c5lrIb/sn4jVBlpGrCqPhiuEWxd9ZneH1iT0KM3vEZVRiBnWhDAx11rwPTZBkZgMAiF WKTV7sxXoPgNAoTVhuoeqPCwAjxYJ+WgOBWgQ= MIME-Version: 1.0 Received: by 10.239.133.65 with SMTP id 1mr233061hbu.150.1248355254010; Thu, 23 Jul 2009 06:20:54 -0700 (PDT) Date: Thu, 23 Jul 2009 16:20:54 +0300 Message-ID: <8d3051340907230620t27c82e8eve9e21e9ae06604e0@mail.gmail.com> To: PHP Development Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: ZipArchive problems. Possible bug (Livelock) From: torokalpar@gmail.com (=?UTF-8?B?QWxww6FyIFTDtnLDtmsg?=) Hi all, The short version is : on a corrupted zip, getStream never returns, and eats up the whole processor. CHECKCONS doesn't help. The long version: I have scripts that process data. Data arrives as zip archives. The data import process halts, eating up all server CPU. I have analyzed the incoming zips using the test option of 7zip [1] , i found that the the problem occurs with zips that contain one or more files for witch 7zip reports that CRC has failed. These zips open without an error, and once i try to get stream, for the faulty file, the call never returns, and eats up the cpu. I tried to use the CHECKCON flag at opening, in the hope that the zip won't open, and thus i can just throw it away, but it doesn't seem to help. Looking in the source i wound on line 1174 of php_zip.c [2] , that no flag parameter is passed to zip_open. I don't have a developement environment, so i can recompile / and or debug this problem. I have tested with 5.2.10 [1] http://www.7-zip.org/ - The 7zip homepage [2] the line reads : rsrc_int->za = zip_open(resolved_path, 0, &err); -- Alpar Torok