ID: 35140 User updated by: jfbustarret at tf1 dot fr Reported By: jfbustarret at tf1 dot fr -Status: Feedback +Status: Open Bug Type: Scripting Engine problem Operating System: Linux PHP Version: 5CVS-2005-11-10 (snap) New Comment:
With : './configure' '--with-apxs2=/usr/sbin/apxs2' '--with-config-file-path=/etc' '--with-oci8=/soft/ora920' '--prefix=/soft/php-5-200511100730-20051110-debug' '--exec-prefix=/soft/php-5-200511100730-20051110-debug' '--without-pear' '--with-mysql=/usr' '--with-mysql-sock=/tmp/mysql.sock' 'CFLAGS=-O2 -g' I get this crash : #0 0x4070f068 in zend_clear_exception () at /soft/sources/php/php5-200511100730/Zend/zend_exceptions.c:68 68 if (!EG(exception)) { (gdb) bt #0 0x4070f068 in zend_clear_exception () at /soft/sources/php/php5-200511100730/Zend/zend_exceptions.c:68 #1 0x4071050d in zif_exception_getLine () at /soft/sources/php/php5-200511100730/Zend/zend_exceptions.c:220 #2 0x4083acf8 in ?? () [snip] #16 0xbf9233e8 in ?? () #17 0x40710537 in zif_exception_getFile (ht=137277364, return_value=0x2, return_value_ptr=0x3a97, this_ptr=0x0, return_value_used=137147524) at /soft/sources/php/php5-200511100730/Zend/zend_exceptions.c:209 #18 0x40710537 in zif_exception_getFile (ht=0, return_value=0x82eafb4, return_value_ptr=0x2, this_ptr=0x0, return_value_used=860730000) at /soft/sources/php/php5-200511100730/Zend/zend_exceptions.c:209 #19 0x406e2639 in zendparse () at zend_language_parser.c:4333 [snip] (gdb) print executor_globals.exception $1 = (zval *) 0x44238317 (gdb) print *executor_globals.exception Cannot access memory at address 0x44238317 With more extensions, I have various crashes, like this one : #0 0x406ed5fd in yy_push_state (new_state=1) at zend_language_scanner.c:6029 #1 0x406edfe7 in lex_scan (zendlval=0xbf8163d4) at zend_language_scanner.c:4418 I'll try the same with PHP-5.0.5. Previous Comments: ------------------------------------------------------------------------ [2005-11-10 10:52:37] [EMAIL PROTECTED] Do you load those shared extensions in your php.ini? Can you try without them? And what is the shortest possible configure line you can reproduce this with? ------------------------------------------------------------------------ [2005-11-10 10:31:56] jfbustarret at tf1 dot fr With/without --enable-debug, php5-latests crashes in : #0 0x4075c447 in _zend_hash_index_update_or_next_insert (ht=0x4089cd40, h=0, pData=0xbfee8100, nDataSize=12, pDest=0x0, flag=Variable "flag" is not available. ) at /soft/sources/php/php5-200511100730/Zend/zend_hash.c:354 #1 0x4075dc42 in zend_list_insert (ptr=0x0, type=0) at /soft/sources/php/php5-200511100730/Zend/zend_list.c:47 #2 0x4075dc67 in zend_register_resource (rsrc_result=0x0, rsrc_pointer=0x830b10c, rsrc_type=2) at /soft/sources/php/php5-200511100730/Zend/zend_list.c:99 #3 0x4072b228 in _php_stream_alloc (ops=0x0, abstract=0x0, persistent_id=0x0, mode=0x407cafb7 "rb", __php_stream_call_depth=5, __zend_filename=0x40806e28 "/soft/sources/php/php5-200511100730/main/streams/plain_wrapper.c", __zend_lineno=205, __zend_orig_filename=0x408048d4 "/soft/sources/php/php5-200511100730/main/main.c", __zend_orig_lineno=855) at /soft/sources/php/php5-200511100730/main/streams/streams.c:263 #4 0x4072e9c3 in _php_stream_fopen_from_fd (fd=27, mode=0x407cafb7 "rb", persistent_id=0x0, __php_stream_call_depth=4, __zend_filename=0x40806e28 "/soft/sources/php/php5-200511100730/main/streams/plain_wrapper.c", __zend_lineno=882, __zend_orig_filename=0x408048d4 "/soft/sources/php/php5-200511100730/main/main.c", __zend_orig_lineno=855) at /soft/sources/php/php5-200511100730/main/streams/plain_wrapper.c:205 #5 0x4072eb40 in _php_stream_fopen ( filename=0x83170a8 "/data/www/www/htdocs/src/affichePage.php", mode=0x407cafb7 "rb", opened_path=0xbfee95f8, options=133, __php_stream_call_depth=3, __zend_filename=0x40806e28 "/soft/sources/php/php5-200511100730/main/streams/plain_wrapper.c", __zend_lineno=1233, __zend_orig_filename=0x408048d4 "/soft/sources/php/php5-200511100730/main/ma---Type <return> to continue, or q <return> to quit--- in.c", __zend_orig_lineno=855) at /soft/sources/php/php5-200511100730/main/streams/plain_wrapper.c:882 #6 0x4072ed65 in _php_stream_fopen_with_path ( filename=0x83170a8 "/data/www/www/htdocs/src/affichePage.php", mode=0x407cafb7 "rb", path=0x82ec2e4 "/data/www/commons/commons:/data/www/www/htdocs/src:/data/www/commons/PEAR:/data/www/commons/conf:/data/www/www/conf:.", opened_path=0xbfee95f8, options=133, __php_stream_call_depth=2, __zend_filename=0x40806e28 "/soft/sources/php/php5-200511100730/main/streams/plain_wrapper.c", __zend_lineno=931, __zend_orig_filename=0x408048d4 "/soft/sources/php/php5-200511100730/main/main.c", __zend_orig_lineno=855) at /soft/sources/php/php5-200511100730/main/streams/plain_wrapper.c:1276 #7 0x4072b525 in _php_stream_open_wrapper_ex ( path=0x83170a8 "/data/www/www/htdocs/src/affichePage.php", mode=0x407cafb7 "rb", options=141, opened_path=0xbfee95f8, context=0x0, __php_stream_call_depth=0, __zend_filename=0x408048d4 "/soft/sources/php/php5-200511100730/main/main.c", __zend_lineno=855, __zend_orig_filename=0x0, __zend_orig_lineno=0) at /soft/sources/php/php5-200511100730/main/streams/streams.c:1771 #8 0x407186d3 in php_stream_open_for_zend ( filename=0x83170a8 "/data/www/www/htdocs/src/affichePage.php", handle=0xbfee95f0) at /soft/sources/php/php5-200511100730/main/main.c:855 #9 0x40763a6a in zend_stream_open ( filename=0x83170a8 "/data/www/www/htdocs/src/affichePage.php", handle=0xbfee95f0) at /soft/sources/php/php5-200511100730/Zend/zend_stream.c:47 #10 0x40763bc0 in zend_stream_fixup (file_handle=0xbfee95f0) at /soft/sources/php/php5-200511100730/Zend/zend_stream.c:62 ---Type <return> to continue, or q <return> to quit--- #11 0x4073c010 in open_file_for_scanning (file_handle=0xbfee95f0) at zend_language_scanner.c:3070 #12 0x4073c6e9 in compile_file (file_handle=0xbfee95f0, type=2) at zend_language_scanner.c:3156 #13 0x4075256c in zend_execute_scripts (type=2, retval=0x0, file_count=1) at /soft/sources/php/php5-200511100730/Zend/zend.c:1079 (gdb) print ht $1 = (HashTable *) 0x4089cd40 (gdb) print *ht $2 = {nTableSize = 0, nTableMask = 0, nNumOfElements = 0, nNextFreeElement = 0, pInternalPointer = 0x0, pListHead = 0x0, pListTail = 0x0, arBuckets = 0x0, pDestructor = 0, persistent = 0 '\0', nApplyCount = 0 '\0', bApplyProtection = 0 '\0', inconsistent = 0} ------------------------------------------------------------------------ [2005-11-07 18:02:40] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip ------------------------------------------------------------------------ [2005-11-07 16:34:24] jfbustarret at tf1 dot fr Description: ------------ Sometimes, some apache process segfault in shutdown_memory_manager. Configuration : PHP 5.0.5/Linux/apache2 Reproduce code: --------------- Unable to find the code that generates the segfault (the app is quite large) Actual result: -------------- Backtrace : #0 0x40662c45 in shutdown_memory_manager (silent=1, full_shutdown=0) at /soft/sources/php/php-5.0.5/Zend/zend_alloc.c:485 485 for (j=0; j<AG(cache_count)[i]; j++) { (gdb) bt #0 0x40662c45 in shutdown_memory_manager (silent=1, full_shutdown=0) at /soft/sources/php/php-5.0.5/Zend/zend_alloc.c:485 #1 0x40641b79 in php_request_shutdown (dummy=0x0) at /soft/sources/php/php-5.0.5/main/main.c:1236 #2 0x406a5114 in php_handler (r=0x82e06e0) at /soft/sources/php/php-5.0.5/sapi/apache2handler/sapi_apache2.c:436 (gdb) p alloc_globals.cache[i] $2 = {0xb7179c38, 0xb7179c38, 0xb7179c38, 0xb7179c38, 0xb7179c38, 0xb7179c38, 0xb7179c38, 0xb7179c38, 0xb7179c38, 0x0 <repeats 247 times>} [ same pointer, multiple times !!! ] (gdb) p alloc_globals.cache[i][j] $3 = (void *) 0xb7179c38 (gdb) p *(zend_mem_header*) alloc_globals.cache[i][j] $5 = {pNext = 0x0, pLast = 0x65646f6d, size = 0, cached = 0} I tried recompiling with enable-debug, and I get "Only variables can be passed by reference" fatal errors in a function call that does not use references : httpRedirect($referer.$urlReconstruite); The function prototype is : function httpRedirect($url) { I am unable to reproduce the crash with enable-debug activated. configure is : './configure' '--with-apxs2=/usr/sbin/apxs2' '--with-config-file-path=/etc' '--with-oci8' '--with-curl=/usr/lib' '--with-gd=shared' '--with-jpeg-dir=/usr/lib' '--with-png-dir=/usr/lib' '--with-freetype-dir=/usr/lib' '--enable-gd-native-ttf' '--with-zlib' '--with-mcrypt=/usr/lib' '--with-dom' '--enable-sockets' '--with-gmp=shared' '--without-pear' '--with-mysql=/usr' '--with-mysql-sock=/tmp/mysql.sock' '--with-imagick-gm' '--with-imagick=shared' 'CFLAGS=-O2 -g' '--with-snmp=shared' '--enable-ftp=shared' '--enable-soap=shared' '--enable-debug' I tried the latest snapshot, but it crashes while trying to load the main php file. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=35140&edit=1