php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53947 php aborted on imap
Submitted: 2011-02-07 13:07 UTC Modified: 2011-02-07 13:23 UTC
From: slim at inbox dot lv Assigned:
Status: Not a bug Package: IMAP related
PHP Version: 5.3.5 OS: linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: slim at inbox dot lv
New email:
PHP Version: OS:

 

 [2011-02-07 13:07 UTC] slim at inbox dot lv
Description:
------------
php-fpm (5.3.5) aborted with core dump from imap on max_execution_time.

Program terminated with signal 6, Aborted.
#0  0x0000029c2d6b11a5 in raise () from /lib/libc.so.6
(gdb) bt
#0  0x0000029c2d6b11a5 in raise () from /lib/libc.so.6
#1  0x0000029c2d6b25c0 in abort () from /lib/libc.so.6
#2  0x0000029c2fd9e619 in fatal () from /usr/lib/libc-client.so.1
#3  0x0000029c2fdab425 in mail_lock () from /usr/lib/libc-client.so.1
#4  0x0000029c2fdd715b in imap_send () from /usr/lib/libc-client.so.1
#5  0x0000029c2fdd8e18 in imap_close () from /usr/lib/libc-client.so.1
#6  0x0000029c2fdaa18f in mail_close_full () from /usr/lib/libc-client.so.1
#7  0x00000000005644eb in mail_close_it (rsrc=0xf69670)
    at /var/tmp/portage/dev-lang/php-5.3.5/work/sapis-build/fpm/ext/imap/php_imap.c:606
#8  0x0000000000757c18 in list_entry_destructor (ptr=0xf69670)
    at /var/tmp/portage/dev-lang/php-5.3.5/work/sapis-build/fpm/Zend/zend_list.c:184
#9  0x0000000000754ffb in zend_hash_apply_deleter (ht=0xd8e290, p=0xf695d0)
    at /var/tmp/portage/dev-lang/php-5.3.5/work/sapis-build/fpm/Zend/zend_hash.c:614
#10 0x000000000075518b in zend_hash_graceful_reverse_destroy (ht=0xd8e290)
    at /var/tmp/portage/dev-lang/php-5.3.5/work/sapis-build/fpm/Zend/zend_hash.c:649
#11 0x0000000000757dc5 in zend_destroy_rsrc_list (ht=0xd8e290)
    at /var/tmp/portage/dev-lang/php-5.3.5/work/sapis-build/fpm/Zend/zend_list.c:240
#12 0x00000000007436f8 in zend_deactivate () at /var/tmp/portage/dev-lang/php-5.3.5/work/sapis-build/fpm/Zend/zend.c:896
#13 0x00000000006c40a5 in php_request_shutdown (dummy=0x0) at /var/tmp/portage/dev-lang/php-5.3.5/work/sapis-build/fpm/main/main.c:1633
#14 0x000000000083eedb in main (argc=3, argv=0x3afd0169d38)
    at /var/tmp/portage/dev-lang/php-5.3.5/work/sapis-build/fpm/sapi/fpm/fpm/fpm_main.c:1902

Test script:
---------------
$mbox = imap_open("{127.0.0.1:143}", "xxtest", "password");
ini_set('max_execution_time', 3);
while (true) {
  print '.'; flush();
  imap_append($mbox, "{127.0.0.1}INBOX",file_get_contents('test.eml')) or die(print_r(imap_errors(),true));
  $object = imap_fetchstructure($mbox,1) or die(print_r(imap_errors(),true));
  imap_savebody($mbox,'/dev/null',1) or die(print_r(imap_errors(),true));
  imap_delete($mbox,1) or die(print_r(imap_errors(),true));
  imap_expunge($mbox) or die(print_r(imap_errors(),true));
}
imap_close($mbox);

Expected result:
----------------
clear exit

Actual result:
--------------
Aborted (core dumped)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-02-07 13:23 UTC] pajoye@php.net
-Status: Open +Status: Bogus
 [2011-02-07 13:23 UTC] pajoye@php.net
It is sadly not a PHP issue. c-client is horrible when it comes to error 
management (along other things) and it simply exit in some cases.

I would suggest to migrate your code to a PHP implementation for imap (roundcube's 
one is very good, zeta component too).
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 01:01:30 2024 UTC