Re: [PHP-DEV] Segfault with current CVS.
After some further investigation I found out that it was bcmath causing this. Here's my config.nice: #! /bin/sh # # Created by configure './configure' \ '--disable-all' \ '--prefix=/usr/local/www/php4' \ '--with-apxs2=/usr/local/www/httpd2test/bin/apxs' \ '--enable-debug' \ '--enable-experimental-zts' \ '--enable-session' \ '--enable-bcmath' \ $@ Reproduce script: ?php session_start(); ? This was with current head of both PHP and Apache2 (worker). On Wed, 13 Nov 2002 18:58:08 +0100 Magnus Määttä [EMAIL PROTECTED] wrote: Hi! With only one connection to the page i get no segfault, but with 2 or more i get it. Made a benchmark on the page with ab and not a single segfault on 10,000 requests. Got it twice with 2 connections and 37 times with 50 connections. After that all apache child processes had died. Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 524321 (LWP 29953)] 0x4055a816 in shutdown_memory_manager (silent=0, clean_cache=0, tsrm_ls=0x41b01b50) at /mnt/data1/Apps/CVS/PHP/php4/Zend/zend_alloc.c:461 461 REMOVE_POINTER_FROM_LIST(ptr); (gdb) bt #0 0x4055a816 in shutdown_memory_manager (silent=0, clean_cache=0, tsrm_ls=0x41b01b50) at /mnt/data1/Apps/CVS/PHP/php4/Zend/zend_alloc.c:461 #1 0x4053aa8e in php_request_shutdown (dummy=0x0) at /mnt/data1/Apps/CVS/PHP/php4/main/main.c:933 #2 0x4058a2be in php_apache_request_dtor (f=0x410e58d0, tsrm_ls=0x41b01b50) at /mnt/data1/Apps/CVS/PHP/php4/sapi/apache2filter/sapi_apache2.c:380 #3 0x4058a531 in php_output_filter (f=0x410e58d0, bb=0x42114e78) at /mnt/data1/Apps/CVS/PHP/php4/sapi/apache2filter/sapi_apache2.c:469 #4 0x080ba569 in ap_pass_brigade (next=0x410e58d0, bb=0x410e5a10) at util_filter.c:540 #5 0x080c0a99 in default_handler (r=0x410e4000) at core.c:3383 #6 0x080af9b9 in ap_run_handler (r=0x410e4000) at config.c:194 #7 0x080aff03 in ap_invoke_handler (r=0x410e4000) at config.c:401 #8 0x08086026 in ap_process_request (r=0x410e4000) at http_request.c:288 #9 0x080820fa in ap_process_http_connection (c=0x410e20d8) at http_core.c:293 #10 0x080b88f8 in ap_run_process_connection (c=0x410e20d8) at connection.c:85 #11 0x080b8b8f in ap_process_connection (c=0x410e20d8, csd=0x410e1ff8) at connection.c:207 #12 0x080acc4b in process_socket (p=0x410e1fc0, sock=0x410e1ff8, my_child_num=0, my_thread_num=30, bucket_alloc=0x831d688) at worker.c:632 #13 0x080ad257 in worker_thread (thd=0x8167a28, dummy=0x82d22c8) at worker.c:947 #14 0x401f89fe in dummy_worker (opaque=0x8167a28) at thread.c:127 #15 0x4026d048 in pthread_start_thread () from /lib/libpthread.so.0 #16 0x4026d08e in pthread_start_thread_event () from /lib/libpthread.so.0 (gdb) frame 0 #0 0x4055a816 in shutdown_memory_manager (silent=0, clean_cache=0, tsrm_ls=0x41b01b50) at /mnt/data1/Apps/CVS/PHP/php4/Zend/zend_alloc.c:461 461 REMOVE_POINTER_FROM_LIST(ptr); (gdb) p ptr $4 = (zend_mem_header *) 0x412838e0 (gdb) bt full #0 0x4055a816 in shutdown_memory_manager (silent=0, clean_cache=0, tsrm_ls=0x41b01b50) at /mnt/data1/Apps/CVS/PHP/php4/Zend/zend_alloc.c:461 i = 1 j = 27 ptr = (zend_mem_header *) 0x412838e0 p = (zend_mem_header *) 0x1b t = (zend_mem_header *) 0x40618de8 #1 0x4053aa8e in php_request_shutdown (dummy=0x0) at /mnt/data1/Apps/CVS/PHP/php4/main/main.c:933 orig_bailout = {{__jmpbuf = {0, 0, 0, 0, 0, 0}, __mask_was_saved = 0, __saved_mask = {__val = {0 repeats 32 times orig_bailout_set = 0 '\0' tsrm_ls = (void ***) 0x41b01b50 #2 0x4058a2be in php_apache_request_dtor (f=0x410e58d0, tsrm_ls=0x41b01b50) at /mnt/data1/Apps/CVS/PHP/php4/sapi/apache2filter/sapi_apache2.c:380 tsrm_ls = (void ***) 0x41b01b50 #3 0x4058a531 in php_output_filter (f=0x410e58d0, bb=0x42114e78) at /mnt/data1/Apps/CVS/PHP/php4/sapi/apache2filter/sapi_apache2.c:469 path = 0x410e5980 /usr/local/www/httpd2/htdocs/home/top.php prebb = (apr_bucket_brigade *) 0x815c830 zfd = {type = 2 '\002', filename = 0x410e5980 /usr/local/www/httpd2/htdocs/home/top.php, opened_path = 0x4222d788 'Z' repeats 44 times, \204Ì\217*, handle = {fd = 1109579712, fp = 0x4222d7c0}, free_filename = 0 '\0'} ctx = (php_struct *) 0x410e5378 b = (apr_bucket *) 0x831d6a8 conf = (void *) 0x814f300 p = 0x815c830 \030È\025\b tsrm_ls = (void ***) 0x41b01b50 #4 0x080ba569 in ap_pass_brigade (next=0x410e58d0, bb=0x410e5a10) at util_filter.c:540 e = (apr_bucket *) 0x41283890 next = (ap_filter_t *) 0x0 bb = (apr_bucket_brigade *) 0x412838e0 #5 0x080c0a99 in default_handler (r=0x410e4000) at core.c:3383 c = (conn_rec *) 0x410e20d8 bb = (apr_bucket_brigade *) 0x410e5a10 e = (apr_bucket *) 0x831d838 d = (core_dir_config *) 0x410e5778 errstatus = 1091459604 fd =
Re: [PHP-DEV] Segfault with current cvs
Umm..backtrace? --Jani On Mon, 9 Apr 2001, Jon Parise wrote: Today's build is giving me this when I try to start Apache with PHP compiled as a DSO: Program received signal SIGSEGV, Segmentation fault. 0x281cc7b1 in _efree (ptr=0x282c8650) at zend_alloc.c:227 227 REMOVE_POINTER_FROM_LIST(p); ./configure \ --with-apxs=/usr/local/apache/bin/apxs \ --with-config-file-path=/usr/local/apache/conf \ --enable-ftp \ --with-gettext \ --with-imap=/usr/local \ --without-mysql \ --with-pgsql=/usr/local/pgsql \ --enable-sockets \ --enable-sysvsem \ --enable-sysvshm \ --enable-xml Any thoughts? -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Segfault with current cvs
On Mon, Apr 09, 2001 at 09:11:42PM +0200, Jani Taskinen wrote: Today's build is giving me this when I try to start Apache with PHP compiled as a DSO: Program received signal SIGSEGV, Segmentation fault. 0x281cc7b1 in _efree (ptr=0x282c8650) at zend_alloc.c:227 227 REMOVE_POINTER_FROM_LIST(p); ./configure \ --with-apxs=/usr/local/apache/bin/apxs \ --with-config-file-path=/usr/local/apache/conf \ --enable-ftp \ --with-gettext \ --with-imap=/usr/local \ --without-mysql \ --with-pgsql=/usr/local/pgsql \ --enable-sockets \ --enable-sysvsem \ --enable-sysvshm \ --enable-xml Any thoughts? Umm..backtrace? --Jani Woops. Sorry about that. I was rushing before. Program received signal SIGSEGV, Segmentation fault. 0x281cc7b1 in _efree (ptr=0x282c8650) at zend_alloc.c:227 227 REMOVE_POINTER_FROM_LIST(p); (gdb) bt #0 0x281cc7b1 in _efree (ptr=0x282c8650) at zend_alloc.c:227 #1 0x281e41c5 in _zval_dtor (zvalue=0x80d9140) at zend_variables.c:62 #2 0x281d1e6e in free_zend_constant (c=0x80d9140) at zend_constants.c:31 #3 0x281e8c97 in zend_hash_destroy (ht=0x80b9380) at zend_hash.c:564 #4 0x281d221c in zend_shutdown_constants () at zend_constants.c:153 #5 0x281e4ccf in zend_shutdown () at zend.c:444 #6 0x281f63f4 in php_module_shutdown () at main.c:925 #7 0x281f63bc in php_module_shutdown_wrapper (sapi_globals=0x282ae800) at main.c:900 #8 0x281f44ec in apache_php_module_shutdown_wrapper () at mod_php4.c:694 #9 0x8050b75 in run_cleanups () #10 0x804f22b in ap_clear_pool () #11 0x805fee4 in standalone_main () #12 0x806083c in main () #13 0x804eaa1 in _start () -- Jon Parise ([EMAIL PROTECTED]) . Rochester Inst. of Technology http://www.csh.rit.edu/~jon/ : Computer Science House Member -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Segfault with current cvs
Hi, this patch seems to fix this. RCS file: /repository/php4/ext/standard/dir.c,v retrieving revision 1.59 diff -u -r1.59 dir.c --- dir.c 2001/04/08 21:57:13 1.59 +++ dir.c 2001/04/09 19:28:43 @@ -141,7 +141,7 @@ #endif tmpstr[0] = DEFAULT_SLASH; tmpstr[1] = '\0'; -REGISTER_STRING_CONSTANT("DIRECTORY_SEPARATOR", tmpstr, 0); +REGISTER_STRING_CONSTANT("DIRECTORY_SEPARATOR", tmpstr, CONST_PERSISTENT); return SUCCESS; } Cheers, Adam On Mon, Apr 09, 2001 at 03:15:36PM -0400, Jon Parise wrote: On Mon, Apr 09, 2001 at 09:11:42PM +0200, Jani Taskinen wrote: Today's build is giving me this when I try to start Apache with PHP compiled as a DSO: Program received signal SIGSEGV, Segmentation fault. 0x281cc7b1 in _efree (ptr=0x282c8650) at zend_alloc.c:227 227 REMOVE_POINTER_FROM_LIST(p); ./configure \ --with-apxs=/usr/local/apache/bin/apxs \ --with-config-file-path=/usr/local/apache/conf \ --enable-ftp \ --with-gettext \ --with-imap=/usr/local \ --without-mysql \ --with-pgsql=/usr/local/pgsql \ --enable-sockets \ --enable-sysvsem \ --enable-sysvshm \ --enable-xml Any thoughts? Umm..backtrace? --Jani Woops. Sorry about that. I was rushing before. Program received signal SIGSEGV, Segmentation fault. 0x281cc7b1 in _efree (ptr=0x282c8650) at zend_alloc.c:227 227 REMOVE_POINTER_FROM_LIST(p); (gdb) bt #0 0x281cc7b1 in _efree (ptr=0x282c8650) at zend_alloc.c:227 #1 0x281e41c5 in _zval_dtor (zvalue=0x80d9140) at zend_variables.c:62 #2 0x281d1e6e in free_zend_constant (c=0x80d9140) at zend_constants.c:31 #3 0x281e8c97 in zend_hash_destroy (ht=0x80b9380) at zend_hash.c:564 #4 0x281d221c in zend_shutdown_constants () at zend_constants.c:153 #5 0x281e4ccf in zend_shutdown () at zend.c:444 #6 0x281f63f4 in php_module_shutdown () at main.c:925 #7 0x281f63bc in php_module_shutdown_wrapper (sapi_globals=0x282ae800) at main.c:900 #8 0x281f44ec in apache_php_module_shutdown_wrapper () at mod_php4.c:694 #9 0x8050b75 in run_cleanups () #10 0x804f22b in ap_clear_pool () #11 0x805fee4 in standalone_main () #12 0x806083c in main () #13 0x804eaa1 in _start () -- Jon Parise ([EMAIL PROTECTED]) . Rochester Inst. of Technology http://www.csh.rit.edu/~jon/ : Computer Science House Member -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Adam Dickmeiss mailto:[EMAIL PROTECTED] http://www.indexdata.dk Index Data T: +45 33410100 Mob.: 212 212 66 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DEV] Segfault with current cvs
Thanks. Applied, tested and committed. Sean -Original Message- From: Adam Dickmeiss [mailto:[EMAIL PROTECTED]] Sent: Monday, April 09, 2001 3:33 PM To: Jani Taskinen; [EMAIL PROTECTED] Subject: Re: [PHP-DEV] Segfault with current cvs Hi, this patch seems to fix this. RCS file: /repository/php4/ext/standard/dir.c,v retrieving revision 1.59 diff -u -r1.59 dir.c --- dir.c 2001/04/08 21:57:13 1.59 +++ dir.c 2001/04/09 19:28:43 @@ -141,7 +141,7 @@ #endif tmpstr[0] = DEFAULT_SLASH; tmpstr[1] = '\0'; -REGISTER_STRING_CONSTANT("DIRECTORY_SEPARATOR", tmpstr, 0); +REGISTER_STRING_CONSTANT("DIRECTORY_SEPARATOR", tmpstr, CONST_PERSISTENT); return SUCCESS; } Cheers, Adam On Mon, Apr 09, 2001 at 03:15:36PM -0400, Jon Parise wrote: On Mon, Apr 09, 2001 at 09:11:42PM +0200, Jani Taskinen wrote: Today's build is giving me this when I try to start Apache with PHP compiled as a DSO: Program received signal SIGSEGV, Segmentation fault. 0x281cc7b1 in _efree (ptr=0x282c8650) at zend_alloc.c:227 227 REMOVE_POINTER_FROM_LIST(p); ./configure \ --with-apxs=/usr/local/apache/bin/apxs \ --with-config-file-path=/usr/local/apache/conf \ --enable-ftp \ --with-gettext \ --with-imap=/usr/local \ --without-mysql \ --with-pgsql=/usr/local/pgsql \ --enable-sockets \ --enable-sysvsem \ --enable-sysvshm \ --enable-xml Any thoughts? Umm..backtrace? --Jani Woops. Sorry about that. I was rushing before. Program received signal SIGSEGV, Segmentation fault. 0x281cc7b1 in _efree (ptr=0x282c8650) at zend_alloc.c:227 227 REMOVE_POINTER_FROM_LIST(p); (gdb) bt #0 0x281cc7b1 in _efree (ptr=0x282c8650) at zend_alloc.c:227 #1 0x281e41c5 in _zval_dtor (zvalue=0x80d9140) at zend_variables.c:62 #2 0x281d1e6e in free_zend_constant (c=0x80d9140) at zend_constants.c:31 #3 0x281e8c97 in zend_hash_destroy (ht=0x80b9380) at zend_hash.c:564 #4 0x281d221c in zend_shutdown_constants () at zend_constants.c:153 #5 0x281e4ccf in zend_shutdown () at zend.c:444 #6 0x281f63f4 in php_module_shutdown () at main.c:925 #7 0x281f63bc in php_module_shutdown_wrapper (sapi_globals=0x282ae800) at main.c:900 #8 0x281f44ec in apache_php_module_shutdown_wrapper () at mod_php4.c:694 #9 0x8050b75 in run_cleanups () #10 0x804f22b in ap_clear_pool () #11 0x805fee4 in standalone_main () #12 0x806083c in main () #13 0x804eaa1 in _start () -- Jon Parise ([EMAIL PROTECTED]) . Rochester Inst. of Technology http://www.csh.rit.edu/~jon/ : Computer Science House Member -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Adam Dickmeiss mailto:[EMAIL PROTECTED] http://www.indexdata.dk Index Data T: +45 33410100 Mob.: 212 212 66 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Segfault with current cvs
On Mon, Apr 09, 2001 at 09:33:19PM +0200, Adam Dickmeiss wrote: this patch seems to fix this. RCS file: /repository/php4/ext/standard/dir.c,v retrieving revision 1.59 diff -u -r1.59 dir.c --- dir.c 2001/04/08 21:57:13 1.59 +++ dir.c 2001/04/09 19:28:43 @@ -141,7 +141,7 @@ #endif tmpstr[0] = DEFAULT_SLASH; tmpstr[1] = '\0'; -REGISTER_STRING_CONSTANT("DIRECTORY_SEPARATOR", tmpstr, 0); +REGISTER_STRING_CONSTANT("DIRECTORY_SEPARATOR", tmpstr, CONST_PERSISTENT); return SUCCESS; } Indeed it has. It looks like it's already been committed, too. Thanks! -- Jon Parise ([EMAIL PROTECTED]) . Rochester Inst. of Technology http://www.csh.rit.edu/~jon/ : Computer Science House Member -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]