php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32622 IMAP toolkit crash
Submitted: 2005-04-07 12:32 UTC Modified: 2005-04-20 01:00 UTC
Votes:3
Avg. Score:3.7 ± 0.9
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: lst_hoe01 at kwsoft dot de Assigned:
Status: No Feedback Package: IMAP related
PHP Version: 4.3.11 OS: Linux Kernel 2.4.21
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: lst_hoe01 at kwsoft dot de
New email:
PHP Version: OS:

 

 [2005-04-07 12:32 UTC] lst_hoe01 at kwsoft dot de
Description:
------------
With HORDE/IMP in some situations (long delay connect) the error "IMAP toolkit crash: Lock when already locked" is logged by PHP. According to the maintainer of the IMAP toolkit this is a invalid use of the toolkit (Quoting) :

> The "Lock when already locked" error message indicates a 
> software bug which is supposedly impossible in UW imapd. It
> has nothing to do with file locking; instead, it indicates a
> forbidden recursive call into the c-client library from a 
> c-client callback in the application. 

Thanxs for any help

Andreas

Reproduce code:
---------------
IMP-Application...
(Sorry, not really a PHP-Coder)

Expected result:
----------------
Sending Mail

Actual result:
--------------
Application stall

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-12 02:51 UTC] iliaa@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.


 [2005-04-20 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2009-03-26 13:34 UTC] slim at inbox dot lv
this problem appears on latest 5.2.x branch as well.
in my case the problem happens when php script exceed "Maximum execution time" on imap_fetch_overview() function running on a message. Next time trying to access the message php crashes with "IMAP toolkit crash: Lock when already locked"

script to reproduce:
==============================================
$mbox = imap_open($server, $user, $pass);
$overview = imap_fetch_overview($mbox,$msgid);
$headers = imap_fetchheader($mbox,$msgid);
print "ended";
imap_close($mbox);
==============================================

set max_execution_time = 1 and try to open message where "Reply-To:" or any other header repeats ~20000 times. 

Looks like c-client does not unlock mailbox until imap_fetch_overview() complete even php script already exited
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Oct 26 16:01:23 2020 UTC