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
hi,
Please open a bug report here:
with a script and an archive (if necessary) to reproduce your problem.
Cheers,
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
--
--
Pierre