Bug #18104: imap_open() results in apache child pid exit segfaul sig (11)
| From: | lnxgeek at us dot ibm dot com | Date: | Tue, 02 Jul 2002 04:46:15 +0000 |
| Subject: | Bug #18104: imap_open() results in apache child pid exit segfaul sig (11) | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-12758@lists.php.net to get a copy of this message | ||
From: lnxgeek@us.ibm.com
Operating system: Red Hat Linux 7.3
PHP version: 4.2.1
PHP Bug Type: IMAP related
Bug description: imap_open() results in apache child pid exit segfaul sig (11)
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 bug report at http://bugs.php.net/?id=18104&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=18104&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=18104&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=18104&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=18104&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=18104&r=support
Expected behavior: http://bugs.php.net/fix.php?id=18104&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=18104&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=18104&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=18104&r=globals