gdb httpd /tmp/core
(gdb) bt #0 0xec835356 in ?? () #1 0xfec311ea in iconv () from /usr/lib/libc.so.1 #2 0xfd1de6ac in php_iconv_string (in_p=0x87aec8c "", in_len=0, out=0x80468c4, out_len=0x80468c0, out_charset=0x8710858 "//IGNORE", in_charset=0x8775e70 "") at /opt/src/php-5.3.3/ext/iconv/iconv.c:521 #3 0xfd1e24bb in php_if_iconv (ht=3, return_value=0x87ada3c, return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at /opt/src/php-5.3.3/ext/iconv/iconv.c:2300 #4 0xfd464e6e in zend_do_fcall_common_helper_SPEC (execute_data=0x83dfa74) at /opt/src/php-5.3.3/Zend/zend_vm_execute.h:316 #5 0xfd469898 in ZEND_DO_FCALL_SPEC_CONST_HANDLER (execute_data=0x83dfa74) at /opt/src/php-5.3.3/Zend/zend_vm_execute.h:1606 #6 0xfd464195 in execute (op_array=0x849f0c0) at /opt/src/php-5.3.3/Zend/zend_vm_execute.h:107 #7 0xfd4393b6 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /opt/src/php-5.3.3/Zend/zend.c:1194 #8 0xfd3d1160 in php_execute_script (primary_file=0x8047320) at /opt/src/php-5.3.3/main/main.c:2260 #9 0xfd4ed7e1 in php_handler (r=0x83c0828) at /opt/src/php-5.3.3/sapi/apache2handler/sapi_apache2.c:669 #10 0x0807c038 in ap_run_handler () #11 0x0807c438 in ap_invoke_handler () #12 0x08087a55 in ap_process_request () #13 0x08085603 in ?? () #14 0x083c0828 in ?? () #15 0x00000004 in ?? () #16 0x083c0828 in ?? () #17 0x000008e0 in ?? () #18 0x083be7e0 in ?? () #19 0x083b4a90 in ?? () #20 0x08047678 in ?? () #21 0x083b4a90 in ?? () #22 0x081ca388 in ?? () #23 0x00000000 in ?? () (gdb) frame 6 #6 0xfd464195 in execute (op_array=0x849f0c0) at /opt/src/php-5.3.3/Zend/zend_vm_execute.h:107 107 if ((ret = EX(opline)->handler(execute_data TSRMLS_CC))
- {
From: El Reggae Dancer reggaedancer@ymail.com To: users@lists.roundcube.net Sent: Mon, October 11, 2010 7:02:26 PM Subject: Roundcube/Apache crashing
Hello, I've successfully installed Roundcube 0.4.2 on Solaris 10. I'm running : Apache 2.2.11 PHP 5.2.14 Mysql Ver 14.14 Distrib 5.1.30 On the same server I'm running Squirremail. But when I tried to login from the Roundcube start page, Apache crashed:
Apache log file: ========== [Mon Oct 11 18:34:18 2010] [notice] child pid 18250 exit signal Segmentation fault (11),possible coredump in /tmp
Then I tried to debug the Apache, what I've before the crash is : ============================================ 18250: lxstat(2, "/var/opt/roundcubemail-0.4.2", 0x08043F80) = 0
18250: lxstat(2, "/var/opt", 0x08043E60) = 0 18250: lxstat(2, "/var", 0x08043D50) = 0 18250: open("/var/opt/roundcubemail-0.4.2/program/include/rcube_plugin.php", O_RDONLY) = 17
18250: fstat64(17, 0x08045B60) = 0 [...] 18250: close(17) = 0 18250: pollsys(0x08046778, 1, 0x08046750, 0x00000000) = 0 18250: open("/usr/local/lib/charset.alias", O_RDONLY) = 17 18250: fstat64(17, 0x08046470) = 0 18250: fstat64(17, 0x080465C0) = 0 18250: fstat64(17, 0x08046500) = 0 18250: ioctl(17, TCGETA, 0x08046594) Err#25 ENOTTY 18250: read(17, " # T h i s f i l e ".., 1024) = 625 18250: read(17, 0x086B8A1C, 1024) = 0 18250: llseek(17, 0, SEEK_CUR) = 625 18250: close(17) = 0 18250: Incurred fault #6, FLTBOUNDS %pc = 0xEC835356
18250: siginfo: SIGSEGV SEGV_MAPERR addr=0xEC835356 18250: Received signal #11, SIGSEGV [caught] 18250: siginfo: SIGSEGV SEGV_MAPERR addr=0xEC835356 18250: lwp_sigmask(SIG_SETMASK, 0x00000400, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
18250: chdir("/tmp") = 0 ================================================ There is no error in the Roundcube logfile : /var/opt/roundcubemail-0.4.2/logs I tried to debug the core file created by Apache: ================================ % gdb httpd /tmp/core Core was generated by `/opt/webstack/apache2/2.2/bin/httpd -D 32bit -f /etc/opt/webstack/apache2/2.2/h'. Program terminated with signal 11, Segmentation fault. [New process 83786 ] #0 0xec835356 in ?? () (gdb) bt full #9 0xfd4ed7e1 in php_handler (r=0x83c0828) at /opt/src/php-5.3.3/sapi/apache2handler/sapi_apache2.c:669 zfd = {type = ZEND_HANDLE_MAPPED, filename = 0x83dab08 "/var/opt/roundcubemail-0.4.2/index.php",
opened_path = 0x0, handle = { fd = 136273344, fp = 0x81f5dc0, stream = {handle = 0x81f5dc0, isatty = 0, mmap = {len = 9822, pos = 0, map = 0x0, buf = 0xfe220000 <Address 0xfe220000 out of bounds>, old_handle = 0x0, old_closer = 0}, reader = 0xfd3e85c4
<_php_stream_read>, fsizer = 0xfd3cf115 <php_zend_stream_fsizer>, closer = 0xfd3cf0e1 <php_zend_stream_mmap_closer>}},
free_filename = 0 '\0'} __orig_bailout = (sigjmp_buf *) 0x0 ==================================== The Apache is working correctly with other virtual host, it's crashing only for the host using Roundcube. I've tried Roundcube version 4.0, and PHP 5.3.3, I've got the same result (Apache child process crashing).
Any help would be appreciated. Benarson
List info: http://lists.roundcube.net/users/ BT/9b404e9e
On 11.10.2010 21:38, El Reggae Dancer wrote:
(gdb) bt #0 0xec835356 in ?? () #1 0xfec311ea in iconv () from /usr/lib/libc.so.1 #2 0xfd1de6ac in php_iconv_string (in_p=0x87aec8c "", in_len=0, out=0x80468c4, out_len=0x80468c0, out_charset=0x8710858 "//IGNORE", in_charset=0x8775e70 "") at /opt/src/php-5.3.3/ext/iconv/iconv.c:521
It looks like it crashes on iconv (in include/main.inc: "iconv('', $iconv_options, '')"). So, try to reinstall iconv/php. Finally you can disable iconv extension in php.ini, in this case Roundcube will use mbstring extension or other build-in methods.
Hello Alec,
thank you for your answer. You are right the iconv is not working correctly and crashed my Apache
I tried to run the simple following PHP code which create a core dump.
www-n2:root>vi iconv.php
<?php $text = "abcde"; echo iconv('UTF-8', 'ISO-8859-1', $text), PHP_EOL; ?>
I'll reinstall the iconv/PHP as you recommended.
thanks again.
From: A.L.E.C alec@alec.pl To: users@lists.roundcube.net Sent: Tue, October 12, 2010 9:06:38 AM Subject: Re: [RCU] Roundcube/Apache crashing
On 11.10.2010 21:38, El Reggae Dancer wrote:
(gdb) bt #0 0xec835356 in ?? () #1 0xfec311ea in iconv () from /usr/lib/libc.so.1 #2 0xfd1de6ac in php_iconv_string (in_p=0x87aec8c "", in_len=0, out=0x80468c4,
out_len=0x80468c0, out_charset=0x8710858 "//IGNORE", in_charset=0x8775e70 "") at /opt/src/php-5.3.3/ext/iconv/iconv.c:521
It looks like it crashes on iconv (in include/main.inc: "iconv('', $iconv_options, '')"). So, try to reinstall iconv/php. Finally you can disable iconv extension in php.ini, in this case Roundcube will use mbstring extension or other build-in methods.
Hello Alec,
I've reinstalled the iconv , I've compiled iconv from GNU. but the PHP still crashed and create a core dump. after simple PHP script.
In my php.ini I have no extension=iconv.so I just have [iconv]
;xxx ;xxx
so all iconv commented
so, how to disable the iconv support in PHP ? AFAIK, iconv is compiled by default in PHP.
May be I should send my question to PHP users, it seems, this is not a Roundcube issue but PHP issue. Anyway, thank you for your help.
Dancer.
From: A.L.E.C alec@alec.pl To: users@lists.roundcube.net Sent: Tue, October 12, 2010 9:06:38 AM Subject: Re: [RCU] Roundcube/Apache crashing
On 11.10.2010 21:38, El Reggae Dancer wrote:
(gdb) bt #0 0xec835356 in ?? () #1 0xfec311ea in iconv () from /usr/lib/libc.so.1 #2 0xfd1de6ac in php_iconv_string (in_p=0x87aec8c "", in_len=0, out=0x80468c4,
out_len=0x80468c0, out_charset=0x8710858 "//IGNORE", in_charset=0x8775e70 "") at /opt/src/php-5.3.3/ext/iconv/iconv.c:521
It looks like it crashes on iconv (in include/main.inc: "iconv('', $iconv_options, '')"). So, try to reinstall iconv/php. Finally you can disable iconv extension in php.ini, in this case Roundcube will use mbstring extension or other build-in methods.
[iconv] comment this line as well.
Eden Caldas Consultor de TI eden@linuxfacil.srv.br (81) 9653 7220 LINUX FÁCIL – Consultoria e Serviços em TI
2010/10/12 El Reggae Dancer reggaedancer@ymail.com
Hello Alec,
I've reinstalled the iconv , I've compiled iconv from GNU. but the PHP still crashed and create a core dump. after simple PHP script.
In my php.ini I have no extension=iconv.so I just have [iconv] ;xxx ;xxx
so all iconv commented
so, how to disable the iconv support in PHP ? AFAIK, iconv is compiled by default in PHP.
May be I should send my question to PHP users, it seems, this is not a Roundcube issue but PHP issue. Anyway, thank you for your help.
Dancer.
*From:* A.L.E.C alec@alec.pl *To:* users@lists.roundcube.net *Sent:* Tue, October 12, 2010 9:06:38 AM *Subject:* Re: [RCU] Roundcube/Apache crashing
On 11.10.2010 21:38, El Reggae Dancer wrote:
(gdb) bt #0 0xec835356 in ?? () #1 0xfec311ea in iconv () from /usr/lib/libc.so.1 #2 0xfd1de6ac in php_iconv_string (in_p=0x87aec8c "", in_len=0,
out=0x80468c4,
out_len=0x80468c0, out_charset=0x8710858 "//IGNORE", in_charset=0x8775e70 "") at /opt/src/php-5.3.3/ext/iconv/iconv.c:521
It looks like it crashes on iconv (in include/main.inc: "iconv('', $iconv_options, '')"). So, try to reinstall iconv/php. Finally you can disable iconv extension in php.ini, in this case Roundcube will use mbstring extension or other build-in methods.
-- Aleksander 'A.L.E.C' Machniak http://alec.pl gg:2275252 LAN Management System Developer http://lms.org.pl Roundcube Webmail Developer http://roundcube.net _______________________________________________ List info: http://lists.roundcube.net/users/ BT/e6efd315
List info: http://lists.roundcube.net/users/ BT/ce0fe0c1
List info: http://lists.roundcube.net/users/ BT/9b404e9e
What exactly did you recompile? This is a function in PHP (php_iconv_string) calling the iconv function in your C library, where the thread is actually dying. This looks like it's between between PHP and your C library.
If we google "php_iconv_string", the very first hit is this:
http://bugs.php.net/bug.php?id=53005 ("iconv() fails in ext/iconv/iconv.c php_iconv_string").
Hey look, it's a PHP bug in the CLOSED state, about the same crash that you are having.
And, oh look, it's logged agains the Solaris 10 platform.
What are the odds that it's the same?
The guy who submitted the bug (php at jrdtech dot com) seems to have also found the solution. See his follow-up comment at the bottom:
"needed to do preload, runs great"
On Tue, 12 Oct 2010 15:55:40 -0700 (PDT), El Reggae Dancer wrote:
Hello Alec,
I've reinstalled the iconv , I've compiled iconv from GNU. but the PHP still crashed and create a core dump. after simple PHP script.
In my php.ini I have no extension=iconv.so I just have [iconv] ;xxx ;xxx
so all iconv commented
so, how to disable the iconv support in PHP ? AFAIK, iconv is compiled by default in PHP.
May be I should send my question to PHP users, it seems, this is not a Roundcube issue but PHP issue. Anyway, thank you for your help.
Dancer.
FROM: A.L.E.C TO: users@lists.roundcube.net SENT: Tue, October 12, 2010 9:06:38 AM SUBJECT: Re: [RCU] Roundcube/Apache crashing
On 11.10.2010 21:38, El Reggae Dancer wrote:
(gdb) bt #0 0xec835356 in ?? () #1
0xfec311ea in iconv () from /usr/lib/libc.so.1
#2 0xfd1de6ac in
php_iconv_string (in_p=0x87aec8c "", in_len=0, out=0x80468c4,
out_len=0x80468c0, out_charset=0x8710858 "//IGNORE",
in_charset=0x8775e70 "") at /opt/src/php-5.3.3/ext/iconv/iconv.c:521
It looks like it crashes on iconv (in include/main.inc: "iconv('', $iconv_options, '')"). So, try to reinstall iconv/php. Finally you can disable iconv extension in php.ini, in this case Roundcube will use mbstring extension or other build-in methods.
--
Aleksander 'A.L.E.C' Machniak http://alec.pl [1] gg:2275252 LAN Management System Developer http://lms.org.pl [2] Roundcube Webmail Developer http://roundcube.net [3] _______________________________________________ List info: http://lists.roundcube.net/users/ [4] BT/e6efd315
[1] http://alec.pl [2] http://lms.org.pl [3] http://roundcube.net [4] http://lists.roundcube.net/users/
List info: http://lists.roundcube.net/users/ BT/9b404e9e
Hello,
What exactly did you recompile?
I've recompiled the libiconv in my Solaris, i.e I've replaced the libiconv from Sunfreeware by the one from GNU. I've read the PHP bug submitted by (php at jrdtech dot com) and will try to get the solution he has found("needed to do preload") thanks.
From: Kaz Kylheku kaz@kylheku.com To: El Reggae Dancer reggaedancer@ymail.com Cc: A.L.E.C alec@alec.pl; users@lists.roundcube.net Sent: Wed, October 13, 2010 7:19:36 AM Subject: Re: [RCU] Roundcube/Apache crashing
What exactly did you recompile? This is a function in PHP (php_iconv_string) calling the iconv function in your C library, where the thread is actually dying. This looks like it's between between PHP and your C library. If we google "php_iconv_string", the very first hit is this: http://bugs.php.net/bug.php?id=53005 ("iconv() fails in ext/iconv/iconv.c php_iconv_string"). Hey look, it's a PHP bug in the CLOSED state, about the same crash that you are having. And, oh look, it's logged agains the Solaris 10 platform. What are the odds that it's the same? The guy who submitted the bug (php at jrdtech dot com) seems to have also found the solution. See his follow-up comment at the bottom: "needed to do preload, runs great"
On Tue, 12 Oct 2010 15:55:40 -0700 (PDT), El Reggae Dancer reggaedancer@ymail.com wrote: Hello Alec,
I've reinstalled the iconv , I've compiled iconv from GNU. but the PHP still crashed and create a core dump. after simple PHP script.
In my php.ini I have no extension=iconv.so I just have [iconv] ;xxx ;xxx
so all iconv commented
so, how to disable the iconv support in PHP ? AFAIK, iconv is compiled by default in PHP.
May be I should send my question to PHP users, it seems, this is not a Roundcube issue but PHP issue. Anyway, thank you for your help.
Dancer.
From: A.L.E.C
To: users@lists.roundcube.net Sent: Tue, October 12, 2010 9:06:38 AM Subject: Re: [RCU] Roundcube/Apache crashing
On 11.10.2010 21:38, El Reggae Dancer wrote:
(gdb) bt #0 0xec835356 in ?? () #1 0xfec311ea in iconv () from /usr/lib/libc.so.1 #2 0xfd1de6ac in php_iconv_string (in_p=0x87aec8c "", in_len=0, out=0x80468c4,
out_len=0x80468c0, out_charset=0x8710858 "//IGNORE", in_charset=0x8775e70 "") at /opt/src/php-5.3.3/ext/iconv/iconv.c:521
It looks like it crashes on iconv (in include/main.inc: "iconv('', $iconv_options, '')"). So, try to reinstall iconv/php. Finally you can disable iconv extension in php.ini, in this case Roundcube will use mbstring extension or other build-in methods.
-- Aleksander 'A.L.E.C' Machniak http://alec.pl gg:2275252 LAN Management System Developer http://lms.org.pl Roundcube Webmail Developer http://roundcube.net _______________________________________________ List info: http://lists.roundcube.net/users/ BT/e6efd315
List info: http://lists.roundcube.net/users/ BT/9b404e9e
On 13.10.2010 00:55, El Reggae Dancer wrote:
so, how to disable the iconv support in PHP ?
You could try to disable just 'iconv' function using disable_functions option in php.ini.
Hello Alec, I have disabled the iconv using disable_functions in php.ini as you recommended, Roundcube is now working!! Thank you very much for your help.
My next step is to fix this iconv issue in my PHP, since the other site I'm running may use the iconv function. It seems this is a bug (iconv/PHP), described in PHP.net.
regards,
D.
From: A.L.E.C alec@alec.pl To: users@lists.roundcube.net Sent: Wed, October 13, 2010 10:12:07 AM Subject: Re: [RCU] Roundcube/Apache crashing
On 13.10.2010 00:55, El Reggae Dancer wrote:
so, how to disable the iconv support in PHP ?
You could try to disable just 'iconv' function using disable_functions option in php.ini.