Hi,
In my web application, httpd core dump from a SEGV when the code is trying to throw exception. Here is the background info,ahy help or insight is deeply appreciated.
I have a PHP module that is written in C++, and link with some underneath .so libraries that are written in C++ also.
I load this module using dl("mymodule.so") from a .php page (I also try add this to httpd.conf, they behave the same).
I have try/catch block in this module, they are also in the underneath .so libraries that it linked with. However when an exception is being thrown, it core dumps:
[1] locate_handler_frame(0xfe0647c0, 0xfe1eec48, 0xffbeb718, 0xfe205ac4, 0xfe0647dc, 0xfe022bd8), at 0xfe023e30
[2] ex_throw...
...
[19] a_common_function(...)
[20] execute(op_array = 0x3411b0), line 1519 in "zend_execute.c"
[21] zend_execute_scripts(type = 8, file_count = 3, ...), line 729 in "zend.c"
[22] php_execute_script(primary_file = 0xffbeeb60), line 1221 in "main.c"
[23] apache_php_module_main(r = 0x211620, display_source_mode = 0), line 89 in "sapi_apache.c"
[24] send_php(r = 0x211620, display_source_mode = 0, filename = 0x213120 "/opt
/opwv/esf/admin/data.php"), line 516 in "mod_php4.c"
[25] send_parsed_php(r = 0x211620), line 527 in "mod_php4.c"
[26] ap_invoke_handler(0x211620, 0x1a37ec, 0x0, 0x0, 0x9, 0x9), at 0x77e94
[27] process_request_internal(0x211620, 0xfeb40000, 0xff31ae30, 0xffbeed98, 0x4, 0x1), at 0x91da4
[28] ap_process_request(0x211620, 0x4, 0x211620, 0xffbeee20, 0xffbeee30, 0x0), at 0x91e30
[29] child_main(0x0, 0x853f8, 0x0, 0x0, 0x22604, 0x872d4), at 0x86fa8
[30] make_child(0x1dab40, 0x0, 0x3bcdf460, 0xff23b1bc, 0xff23b1bc, 0xffbeef38), at 0x8736c
[31] perform_idle_server_maintenance(0xffffffff, 0x0, 0x0, 0x1dab40, 0x1a1acc, 0x18d9e4), at 0x87820
[32] standalone_main(0x4, 0xffbef13c, 0x1c225c, 0xff238000, 0xff23b014, 0x1a1c90), at 0x87e70
[33] main(0x4, 0xffbef13c, 0xffbef150, 0x1c0400, 0x0, 0x0), at 0x88720
Apparently it is trying to find the handler for the exception, but why it can't find it and SEGV?
If I call the a_common_function (in line 19 above) directly from main function in a standalone test program, then it won't have any problem.
Please help, any hint or thoughts are welcome. Thanks a lot,
-L.