Hello steve,

Tuesday, August 30, 2005, 11:32:33 PM, you wrote:

> :)

> Can valgrind attach to a process like gdb? I somehow doubt it... In
> that case, I must admit, I've never used valgrind before. How can I
> set up valgrind to check a fast-cgi process?

> I tried changing the php5.fcgi file to php505.fcgi and created this as
> php5.fcgi:

> #/bin/bash

that's missing the '!'

> /usr/bin/valgrind --tool=memcheck --trace-children=yes
> --log-file=/usr/local/apache2/logs/valgrind
> /usr/local/apache2/fastcgi-bin/php505.fcgi

you don't pass the parameters here or aren't you passing any?

besides those comments i don't know of a way to attach to a running process.

marcus

> but that didn't work...

> On 8/30/05, Marcus Boerger <[EMAIL PROTECTED]> wrote:
>> Hello steve,
>> 
>> #15 0x081ccec4 in call_user_function_ex (function_table=0x1,
>> object_pp=0x1, function_name=0x1, retval_ptr_ptr=0x1, param_count=1,
>> params=0x1, no_separation=1, symbol_table=0x1)
>>     at
>> /root/webserver_software_tmp_fastcgi_apache2/php-5.0.5RC2/Zend/zend_execute_API.c:559
>> #16 0x081e53eb in zend_std_call_user_call (ht=2,
>> return_value=0xab5a584, this_ptr=0xa5da6a4, return_value_used=1) at
>> /root/webserver_software_tmp_fastcgi_apache2/php-5.0.5RC2/Zend/zend_object_handlers.c:609
>> 
>> in 15 you see that all parameters are bork!
>> can you try valgrind to look for memory corruption or check why 15 is not
>> able to pass the required parameters corectly. Or maybe the problem is that
>> this_ptr is already invalid.
>> 
>> marcus
>> 
>> Tuesday, August 30, 2005, 9:32:07 PM, you wrote:
>> 
>> > Thats what I was looking for, thanks. I used that and no exception was
>> > thrown in 5.0.4, but there is one in 5.0.5RC2. It is in a shutdown
>> > function, which is why I couldn't figure out where it was happening.
>> > Not to mention, it was in an AJAX call. The shutdown function is
>> > defined in JPSpan (http://sourceforge.net/projects/jpspan), which is
>> > not that uncommon.
>> 
>> > I'll try and see if I can get a PHP debugger installed correctly on
>> > Windows with 5.0.5 and see what happens there. We develop on Windows
>> > and Mac and deploy on Linux, so I'll see if there is a platform
>> > element involved as well (I doubt). Anyway, anyone that wants to check
>> > it out themselves can get the JPSpan and run the hello world sample I
>> > suppose.???
>> 
>> > Breakpoint 1, zend_throw_exception_internal (exception=0xac25a14) at
>> >
>> /root/webserver_software_tmp_fastcgi_apache2/php-5.0.5RC2/Zend/zend_exceptions.c:38
>> > 38              if (exception != NULL) {
>> > (gdb) bt
>> > #0  zend_throw_exception_internal (exception=0xac25a14) at
>> >
>> /root/webserver_software_tmp_fastcgi_apache2/php-5.0.5RC2/Zend/zend_exceptions.c:38
>> > #1  0x081f33c7 in zend_throw_handler (execute_data=0xbfff6be0,
>> > opline=0xa7fde34, op_array=0xa5007e8) at
>> >
>> /root/webserver_software_tmp_fastcgi_apache2/php-5.0.5RC2/Zend/zend_execute.c:2994
>> > #2  0x081f0366 in execute (op_array=0xa5007e8) at
>> >
>> /root/webserver_software_tmp_fastcgi_apache2/php-5.0.5RC2/Zend/zend_execute.c:1437
>> > #3  0x081f2c72 in zend_do_fcall_common_helper
>> > (execute_data=0xbfff7690, opline=0xa702e48, op_array=0xa58c5dc) at
>> >
>> /root/webserver_software_tmp_fastcgi_apache2/php-5.0.5RC2/Zend/zend_execute.c:2789
>> > #4  0x081f0366 in execute (op_array=0xa58c5dc) at
>> >
>> /root/webserver_software_tmp_fastcgi_apache2/php-5.0.5RC2/Zend/zend_execute.c:1437
>> > #5  0x081f2c72 in zend_do_fcall_common_helper
>> > (execute_data=0xbfff86f0, opline=0xa825fec, op_array=0xa58c50c) at
>> >
>> /root/webserver_software_tmp_fastcgi_apache2/php-5.0.5RC2/Zend/zend_execute.c:2789
>> > #6  0x081f0366 in execute (op_array=0xa58c50c) at
>> >
>> /root/webserver_software_tmp_fastcgi_apache2/php-5.0.5RC2/Zend/zend_execute.c:1437
>> > #7  0x081f2c72 in zend_do_fcall_common_helper
>> > (execute_data=0xbfff8b20, opline=0xa72027c, op_array=0xa58d7dc) at
>> >
>> /root/webserver_software_tmp_fastcgi_apache2/php-5.0.5RC2/Zend/zend_execute.c:2789
>> > #8  0x081f0366 in execute (op_array=0xa58d7dc) at
>> >
>> /root/webserver_software_tmp_fastcgi_apache2/php-5.0.5RC2/Zend/zend_execute.c:1437
>> > #9  0x081cd609 in zend_call_function (fci=0xbfff8c60, fci_cache=0x0)
>> > at
>> >
>> /root/webserver_software_tmp_fastcgi_apache2/php-5.0.5RC2/Zend/zend_execute_API.c:873
>> > #10 0x081ccec4 in call_user_function_ex (function_table=0x1,
>> > object_pp=0x1, function_name=0x1, retval_ptr_ptr=0x1, param_count=1,
>> > params=0x1, no_separation=1, symbol_table=0x1)
>> >     at
>> >
>> /root/webserver_software_tmp_fastcgi_apache2/php-5.0.5RC2/Zend/zend_execute_API.c:559
>> > #11 0x0815867e in zif_call_user_func_array (ht=2,
>> > return_value=0xab5a67c, this_ptr=0x0, return_value_used=1) at
>> >
>> /root/webserver_software_tmp_fastcgi_apache2/php-5.0.5RC2/ext/standard/basic_functions.c:1976
>> > #12 0x081f2e5a in zend_do_fcall_common_helper
>> > (execute_data=0xbfff9160, opline=0xa7ec7ac, op_array=0xa7e13c4) at
>> >
>> /root/webserver_software_tmp_fastcgi_apache2/php-5.0.5RC2/Zend/zend_execute.c:2760
>> > #13 0x081f0366 in execute (op_array=0xa7e13c4) at
>> >
>> /root/webserver_software_tmp_fastcgi_apache2/php-5.0.5RC2/Zend/zend_execute.c:1437
>> > #14 0x081cd609 in zend_call_function (fci=0xbfff92a0, fci_cache=0x0)
>> > at
>> >
>> /root/webserver_software_tmp_fastcgi_apache2/php-5.0.5RC2/Zend/zend_execute_API.c:873
>> > #15 0x081ccec4 in call_user_function_ex (function_table=0x1,
>> > object_pp=0x1, function_name=0x1, retval_ptr_ptr=0x1, param_count=1,
>> > params=0x1, no_separation=1, symbol_table=0x1)
>> >     at
>> >
>> /root/webserver_software_tmp_fastcgi_apache2/php-5.0.5RC2/Zend/zend_execute_API.c:559
>> > #16 0x081e53eb in zend_std_call_user_call (ht=2,
>> > return_value=0xab5a584, this_ptr=0xa5da6a4, return_value_used=1) at
>> >
>> /root/webserver_software_tmp_fastcgi_apache2/php-5.0.5RC2/Zend/zend_object_handlers.c:609
>> > #17 0x081f2e5a in zend_do_fcall_common_helper
>> > (execute_data=0xbfff96f0, opline=0xa6ee900, op_array=0xa6e65f4) at
>> >
>> /root/webserver_software_tmp_fastcgi_apache2/php-5.0.5RC2/Zend/zend_execute.c:2760
>> > #18 0x081f0366 in execute (op_array=0xa6e65f4) at
>> >
>> /root/webserver_software_tmp_fastcgi_apache2/php-5.0.5RC2/Zend/zend_execute.c:1437
>> > #19 0x081f2c72 in zend_do_fcall_common_helper
>> > (execute_data=0xbfff9970, opline=0xa6cb00c, op_array=0xa6c884c) at
>> >
>> /root/webserver_software_tmp_fastcgi_apache2/php-5.0.5RC2/Zend/zend_execute.c:2789
>> > #20 0x081f0366 in execute (op_array=0xa6c884c) at
>> >
>> /root/webserver_software_tmp_fastcgi_apache2/php-5.0.5RC2/Zend/zend_execute.c:1437
>> > #21 0x081f2c72 in zend_do_fcall_common_helper
>> > (execute_data=0xbfff9a90, opline=0xa6cefa4, op_array=0xa6cdf98) at
>> >
>> /root/webserver_software_tmp_fastcgi_apache2/php-5.0.5RC2/Zend/zend_execute.c:2789
>> > #22 0x081f0366 in execute (op_array=0xa6cdf98) at
>> >
>> /root/webserver_software_tmp_fastcgi_apache2/php-5.0.5RC2/Zend/zend_execute.c:1437
>> > #23 0x081cd609 in zend_call_function (fci=0xbfff9bd0, fci_cache=0x0)
>> > at
>> >
>> /root/webserver_software_tmp_fastcgi_apache2/php-5.0.5RC2/Zend/zend_execute_API.c:873
>> > #24 0x081ccec4 in call_user_function_ex (function_table=0x1,
>> > object_pp=0x1, function_name=0x1, retval_ptr_ptr=0x1, param_count=1,
>> > params=0x1, no_separation=1, symbol_table=0x1)
>> >     at
>> >
>> /root/webserver_software_tmp_fastcgi_apache2/php-5.0.5RC2/Zend/zend_execute_API.c:559
>> > #25 0x081ccdf7 in call_user_function (function_table=0xa432240,
>> > object_pp=0x0, function_name=0xa6be23c, retval_ptr=0xbfff9c80,
>> > param_count=0, params=0xa6f4f40)
>> >     at
>> >
>> /root/webserver_software_tmp_fastcgi_apache2/php-5.0.5RC2/Zend/zend_execute_API.c:534
>> > #26 0x08158e41 in user_shutdown_function_call
>> > (shutdown_function_entry=0xbfff9c80) at
>> >
>> /root/webserver_software_tmp_fastcgi_apache2/php-5.0.5RC2/ext/standard/basic_functions.c:2101
>> > #27 0x081dad50 in zend_hash_apply (ht=0xa619e94, apply_func=0x8158dc8
>> > <user_shutdown_function_call>) at
>> >
>> /root/webserver_software_tmp_fastcgi_apache2/php-5.0.5RC2/Zend/zend_hash.c:664
>> > #28 0x0815905c in php_call_shutdown_functions () at
>> >
>> /root/webserver_software_tmp_fastcgi_apache2/php-5.0.5RC2/ext/standard/basic_functions.c:2181
>> > #29 0x081a76bd in php_request_shutdown (dummy=0x0) at
>> >
>> /root/webserver_software_tmp_fastcgi_apache2/php-5.0.5RC2/main/main.c:1202
>> > #30 0x081fdb2c in main (argc=1, argv=0xbfffa6e4) at
>> >
>> /root/webserver_software_tmp_fastcgi_apache2/php-5.0.5RC2/sapi/cgi/cgi_main.c:1640

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to