|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2010-06-13 21:41 UTC] wajim at mail dot ru
Description: ------------ Under a heavy GET/WALK-ing (form localhost to localhost) php may hangs forever -> apache's threads becomes zombies with CLOSE_WAIT sates even all timeouts (php and apache) are elapsed many times. Call-stack of a one zombie-thread: ntoskrnl.exe!KiUnlockDispatcherDatabase+0x77 ntoskrnl.exe!KeSetEvent+0x74 ntoskrnl.exe!PspGetSetContextSpecialApc+0x4e ntoskrnl.exe!KiDeliverApc+0xb3 ntoskrnl.exe!KiSwapThread+0x64 ntoskrnl.exe!KeWaitForSingleObject+0x1c2 ntoskrnl.exe!NtWaitForSingleObject+0x9a ntoskrnl.exe!KiFastCallEntry+0xf8 ntdll.dll!KiFastSystemCallRet ntdll.dll!ZwWaitForSingleObject+0xc mswsock.dll!SockWaitForSingleObject+0x1a0 mswsock.dll!WSPRecvFrom+0x1f0 WS2_32.dll!recvfrom+0x89 php_snmp.dll!snmp_sess_read+0x21f php_snmp.dll!snmp_sess_read+0x10 php_snmp.dll!snmp_read+0x17 php_snmp.dll!snmp_synch_response_cb+0xe8 php_snmp.dll!snmp_synch_response+0x19 php_snmp.dll!php_snmp_internal+0x267 php_snmp.dll!php_snmp+0x6da php_snmp.dll!zif_snmp2_get+0x27 php5ts.dll!zend_do_fcall_common_helper_SPEC+0x7ab php5ts.dll!ZEND_DO_FCALL_SPEC_CONST_HANDLER+0xe5 php5ts.dll!execute+0x1c5 php5ts.dll!zend_do_fcall_common_helper_SPEC+0x8ca php5ts.dll!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+0x15 php5ts.dll!execute+0x1c5 php5ts.dll!zend_do_fcall_common_helper_SPEC+0x8ca php5ts.dll!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+0x15 php5ts.dll!execute+0x1c5 php5ts.dll!zend_execute_scripts+0x107 php5ts.dll!php_execute_script+0x21d php5apache.dll!apache_php_module_main+0x91 php5apache.dll!send_php+0x265 php5apache.dll!send_parsed_php+0x10 ApacheCore.dll!ap_invoke_handler+0x87 ApacheCore.dll!ap_process_request+0x2b4 ApacheCore.dll!ap_process_request+0x26 ApacheCore.dll!ap_start_restart+0x37f WS2_32.dll!WSASocketW+0x119 IMHO bad call "WS2_32.dll!recvfrom" in buggy ucd-snmp library may hangs. There are no socket option like "setsockopt(sd, SOL_SOCKET, SO_RCVTIMEO, ..." before recvfrom call. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 13:00:01 2025 UTC |
static int _sess_read(void *sessp, fd_set *fdset){ [cut] unsigned long unblock; //WAJIM [cut] unblock = 1; ioctlsocket(isp->sd, FIONBIO, &unblock); //WAJIM length = recvfrom(isp->sd, (char *)packet, PACKET_LENGTH, 0, (struct sockaddr *)&from, &fromlength); unblock = 0; ioctlsocket(isp->sd, FIONBIO, &unblock); //WAJIM [cut] } Those my 3 lines in snmp_api.c (ucd-snmp-4.2.7.1) fixes threads hanging. :-)