|  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: slim at inbox dot lv
New email:
PHP Version: OS:


 [2011-02-07 13:07 UTC] slim at inbox dot lv
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/
(gdb) bt
#0  0x0000029c2d6b11a5 in raise () from /lib/
#1  0x0000029c2d6b25c0 in abort () from /lib/
#2  0x0000029c2fd9e619 in fatal () from /usr/lib/
#3  0x0000029c2fdab425 in mail_lock () from /usr/lib/
#4  0x0000029c2fdd715b in imap_send () from /usr/lib/
#5  0x0000029c2fdd8e18 in imap_close () from /usr/lib/
#6  0x0000029c2fdaa18f in mail_close_full () from /usr/lib/
#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("{}", "xxtest", "password");
ini_set('max_execution_time', 3);
while (true) {
  print '.'; flush();
  imap_append($mbox, "{}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));

Expected result:
clear exit

Actual result:
Aborted (core dumped)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-02-07 13:23 UTC]
-Status: Open +Status: Bogus
 [2011-02-07 13:23 UTC]
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-2022 The PHP Group
All rights reserved.
Last updated: Sun Sep 25 04:05:52 2022 UTC