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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
3 + 6 = ?
Subscribe to this entry?

 
 [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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC