ID: 35612
Updated by: [EMAIL PROTECTED]
Reported By: alacn dot uhahaa at gmail dot com
-Status: Open
+Status: Assigned
Bug Type: IIS related
Operating System: Windows Server 2003
PHP Version: 5.1.1
Assigned To: dmitry
Previous Comments:
------------------------------------------------------------------------
[2005-12-13 11:15:11] alacn dot uhahaa at gmail dot com
its not fixed in cvs (php5.1-200512130930)
udiff for php4:
--- php4.4.1_zend_execute_API.c Tue Aug 02 14:52:34 2005
+++ php4.4.1_fixed_zend_execute_API.c Tue Dec 13 08:11:36 2005
@@ -52,6 +52,7 @@
static HANDLE timeout_thread_event;
static DWORD timeout_thread_id;
static int timeout_thread_initialized=0;
+static HANDLE timeout_thread_finish_event; // alacn
#endif
@@ -813,6 +814,9 @@
}
DestroyWindow(timeout_window);
UnregisterClass(wc.lpszClassName, NULL);
+
+ SetEvent(timeout_thread_finish_event); // alacn
+
return 0;
}
@@ -820,6 +824,7 @@
void zend_init_timeout_thread()
{
timeout_thread_event = CreateEvent(NULL, FALSE, FALSE, NULL);
+ timeout_thread_finish_event = CreateEvent(0, 0, 0, 0); // alacn
_beginthreadex(NULL, 0, timeout_thread_proc, NULL, 0,
&timeout_thread_id);
WaitForSingleObject(timeout_thread_event, INFINITE);
}
@@ -831,6 +836,8 @@
return;
}
PostThreadMessage(timeout_thread_id, WM_QUIT, 0, 0);
+
+ WaitForSingleObject(timeout_thread_finish_event, 30000); // alacn
}
#endif
------------------------------------------------------------------------
[2005-12-13 09:13:43] [EMAIL PROTECTED]
Please try using this CVS snapshot:
http://snaps.php.net/php5.1-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.1-win32-latest.zip
------------------------------------------------------------------------
[2005-12-12 19:46:58] [EMAIL PROTECTED]
Reassigned to Dmitry.
------------------------------------------------------------------------
[2005-12-12 19:17:26] alacn dot uhahaa at gmail dot com
at cvs its:
timeout_thread_handle = _beginthreadex(..);
and
WaitForSingleObject(timeout_thread_handle, 5000);
but this wont work right, because the thread that created the
timeout_thread is not the same that will wait it finish, so, if you
check, WaitForSingleObject will always result WAIT_OBJECT_TIMEOUT
instead of WAIT_OBJECT_0
thats why it should wait using an event object instead of thread
handle
also, it should be at least 30 secs, because 5 secs is not enough, with
an event object (instead of thread handle), it will finish before the 30
secs as it should be
--- php5.1.1_zend_execute_API.c Thu Nov 24 09:33:12 2005
+++ php5.1.1_fixed_zend_execute_API.c Fri Dec 09 10:38:58 2005
@@ -48,6 +48,7 @@
static HANDLE timeout_thread_event;
static DWORD timeout_thread_id;
static int timeout_thread_initialized=0;
+static HANDLE timeout_thread_finish_event; // alacn
#endif
#if ZEND_DEBUG
@@ -1255,6 +1256,9 @@
}
DestroyWindow(timeout_window);
UnregisterClass(wc.lpszClassName, NULL);
+
+ SetEvent(timeout_thread_finish_event); // alacn
+
return 0;
}
@@ -1262,6 +1266,7 @@
void zend_init_timeout_thread()
{
timeout_thread_event = CreateEvent(NULL, FALSE, FALSE, NULL);
+ timeout_thread_finish_event = CreateEvent(0, 0, 0, 0); // alacn
_beginthreadex(NULL, 0, timeout_thread_proc, NULL, 0,
&timeout_thread_id);
WaitForSingleObject(timeout_thread_event, INFINITE);
}
@@ -1273,6 +1278,8 @@
return;
}
PostThreadMessage(timeout_thread_id, WM_QUIT, 0, 0);
+
+ WaitForSingleObject(timeout_thread_finish_event, 30000); // alacn
}
#endif
------------------------------------------------------------------------
[2005-12-09 19:11:13] [EMAIL PROTECTED]
Fixed in CVS HEAD, PHP_5_1 and PHP_5_0.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/35612
--
Edit this bug report at http://bugs.php.net/?id=35612&edit=1