#39726 [Opn->Fbk]: segmentation fault in imap_open
| From: | tony2001@php.net | Date: | Mon, 04 Dec 2006 14:23:06 +0000 |
| Subject: | #39726 [Opn->Fbk]: segmentation fault in imap_open | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-105874@lists.php.net to get a copy of this message | ||
ID: 39726
Updated by: tony2001@php.net
Reported By: rommer at active dot by
-Status: Open
+Status: Feedback
Bug Type: IMAP related
Operating System: Centos-3 x86
PHP Version: 4.4.4
New Comment:
>I have increased __FD_SETSIZE in <..skip..>to 262144 before compiling
php
You should have done this before compiling c-client, as imap_open() is
just a wrapper for c-client functions.
Please make sure you've configured PHP with --enabled-debug and
regenerate the backtrace.
Previous Comments:
------------------------------------------------------------------------
[2006-12-04 14:17:37] rommer at active dot by
This is backtrace (php with --enable-debug, non-stripped)
(gdb) run -X
Starting program: /usr/local/apache-clean/bin/httpd -X
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 3248)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 3248)]
0x404e8e64 in ?? () from /usr/local/apache-clean/modules/libphp4.so
(gdb) bt
#0 0x404e8e64 in ?? () from
/usr/local/apache-clean/modules/libphp4.so
#1 0x00001011 in ?? ()
#2 0x00000000 in ?? ()
------------------------------------------------------------------------
[2006-12-04 10:50:09] tony2001@php.net
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
for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php
for Win32
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.
------------------------------------------------------------------------
[2006-12-04 10:41:59] rommer at active dot by
Description:
------------
Segmentation fault in function imap_open if script opens
~ 4000 files before.
I have increased __FD_SETSIZE in
/usr/include/bits/typesizes.h
/usr/include/linux/posix_types.h
to 262144 before compiling php (4.4.4, 5.1.6, 4.4.5-dev)
Reproduce code:
---------------
<?
$basedir = "/tmp/php_testcase";
if (! file_exists ($basedir)) {
mkdir ($basedir, 0700);
}
$fds = array();
for ($i = 0; $i < 4096; $i++) {
$fds[] = fopen ($basedir . '/file_' . $i, 'w');
}
imap_open ('{127.0.0.1:143/imap/notls}INBOX',
'test@test.com', 'test', 64);
?>
Expected result:
----------------
no segfault
Actual result:
--------------
Segmentation fault.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39726&edit=1