Bug #18104 Updated: imap_open() results in apache child pid exit segfaul sig (11)

From: Date: Tue, 02 Jul 2002 12:42:34 +0000
Subject: Bug #18104 Updated: imap_open() results in apache child pid exit segfaul sig (11)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-12789@lists.php.net to get a copy of this message
ID: 18104 Updated by: sniper@php.net Reported By: lnxgeek@us.ibm.com -Status: Open +Status: Feedback Bug Type: IMAP related Operating System: Red Hat Linux 7.3 PHP Version: 4.2.1 New Comment: Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. There you can find out how to get backtrace without a core file.. Previous Comments: ------------------------------------------------------------------------ [2002-07-02 04:12:15] lnxgeek@us.ibm.com Another fun thing I did to see if this would work is I checked out the current php4/ext/imap/* files from CVS tonight and added them to the php 4.2.1 src replacing the files that were there. Built again with --enable-debug and attempted all the tests documented above. Received the same results. *sigh* Now it's time for sleep. Still cannot get a backtrace. Any hints on doing so would be great. ------------------------------------------------------------------------ [2002-07-02 02:39:53] lnxgeek@us.ibm.com provided gdb feedback. ------------------------------------------------------------------------ [2002-07-02 02:39:13] lnxgeek@us.ibm.com Oops, apparently my second post was lost. Tried to get a bt but could not: 1) in bash ulimit -c unlimited 2) run ulimit -c to verify setting 3) built and installed php 4.2.1 with --enable-debug 4) start httpd with /usr/sbin/httpd -X -DHAVE_PHP4 5) run test script, get 'page contains no data' 6) run find / -fstype ext3 -name core* but none found. Also, with --enable-debug in php 4.2.1 I no longer see the segfault error in error_log BUT I do still see the page contains no data errors coming from the browser which indecates that process is still segfaulting. Also tried the gdb httpd method where I enter 'run -X -DHAVE_PHP4 at the gdb prompt. Again, no back trace. Hints as to what I'm doing wrong are welcome. I did forget to say that I'm running the apache-1.3.23-14 provided with Red Hat 7.3. ------------------------------------------------------------------------ [2002-07-02 02:21:49] derick@php.net Thanks for this very detailed report, setting it to feedback to await the backtrace. Derick ------------------------------------------------------------------------ [2002-07-02 00:46:12] lnxgeek@us.ibm.com Description: ------------ With php 4.2.1 or 4.1.2 and c-client 2001a or current c-client devel snap shot I cannot use any imap_open() calls to cyrus 2.1.5. Attempted imap_open() calls result in an error being logged by apache in error_log: [notice] child pid 27897 exit signal Segmentation fault (11) [notice] child pid 27902 exit signal Segmentation fault (11) [notice] child pid 27901 exit signal Segmentation fault (11) followed by a 'Page contains no data' error in the browser. Environment: ------------ Red Hat 7.3 php-4.2.1 compiled from src imap-2002.DEV.SNAP-0206241612 (c-client) compiled from src cyrus-sasl-2.1.5 compiled from src cyrus-imapd-2.1.5 compiled from src Also Tried: ----------- php-4.1.2-7 RPMS from Red Hat 7.3 imap-devel 2001a (c-client) from Red Hat 7.3 Config: ------- I have RH 7.3 with Cyrus IMAP and Cyrus-SASL compiled from source and installed fine. IMAP clients, Mozilla, Evo, fetchmail, etc, have no problems connecting to my imapd via imap or imaps. I am using a self signed cert but have tested with imaps and cyrus tls_cert_* options disabled. (ie: I've tested without cyrus imapd loading any type of SSL/TLS support). Test Case and Results ---------------------- I have the following test.php script running with php 4.2.1 and c-client 2002 DEV SNAP on the same Red Hat 7.3 server with Cyrus IMAPd 2.1.5: <pre> <?php $ref = imap_open("{localhost:143}", "lnxgeek", "passwd", "OP_HALFOPEN") or die ("Failed imap_open with: ".imap_last_error()); print "imap connection opened!"; imap_close($ref); ?> </pre> I have also tried the following $server parms for imap_open(). The results of each test are listed in []. {localhost:143} [self cert err] {localhost:143/imap} [self cert err] {localhost:143/imap/notls} [segfalt sig 11] {localhost:143/imap/novalidate-cert} [segfault sig 11] {localhost:143/imap/notls/novalidate-cert} [segfault sig 11] {localhost:993} [no connect] {localhost:993/imap} [no connect] {localhost:993/imap/ssl} [self cert error] {localhost:993/imap/ssl/novalidate-cert} [segfault sig 11] {localhost:993/imap/tls/novalidate-cert} [no connect] The imtest client provided with cyrus has no problems connecting via imap or imaps using DIGEST, CRAM, or PLAIN passwords. Additional Trouble Shooting ---------------------------- With the cyrus imapd running imap and imaps on the host 'ogg.raleigh.ibm.com', I attempted the same test script from a stock Red Hat 7.3 install. By default Red Hat 7.3 uses imap-devel 2001a (c-client) and php-4.1.2-7. Repeating the same tests as above resulted in the same errors shown. Checking the logs of my cyrus server I can see that all connections were always accepted. For example I will typically see: Jul 2 00:33:11 ogg imapd[28137]: mydelete: starting txn 2147483718 Jul 2 00:33:11 ogg imapd[28137]: mydelete: committing txn 2147483718 Jul 2 00:33:11 ogg imapd[28137]: mystore: starting txn 2147483719 Jul 2 00:33:11 ogg imapd[28137]: mystore: committing txn 2147483719 Jul 2 00:33:11 ogg imapd[28137]: starttls: TLSv1 with cipher DES-CBC3-SHA (168/168 bits new) no authentication This shows a good connection has been made but at this point the apache child segfaults. Eventually the cyrus imapd session times out and closes. GDB BackTrace ------------- Next step: build php 4.2.1 with debug enabled and provide a gdb backtrace. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=18104&edit=1

« previous php.bugs (#12789) next »