Issue Type: Bug Created: 2011-10-28T08:51:38.000+0000 Last Updated: 2012-05-29T14:55:11.000+0000 Status: Closed Fix version(s): Reporter: Tomasz Ulanowski (email@example.com) Assignee: Christian Wenz (wenz) Tags: - Zend_Captcha
Related issues: Attachments: - ZF-11858.patch
Zend_Captcha_Image garbage collector sometimes results in a fatal error: SplFileInfo::getMTime(): stat failed for XXX.png in in Zend/Captcha/Image.php, at line 583.
I belive that this error occurs only under some load, when two (or more) garbage collectors fire at the same time. One GC tries to run SplFileInfo::getMTime() on file wich was already deleted by other parallel GC.
Solution for this could be some kind of semaphore or at least an additional file_exists() check.
Posted by Christian Wenz (wenz) on 2012-03-04T17:39:06.000+0000
Patch that adds a file_exists() check before getMTime() call
Posted by Christian Wenz (wenz) on 2012-03-04T17:40:14.000+0000
added a patch using a file_exists() check. Did not supply a unit test since the issue is hard to reproduce and would probably require mocking the file access completely.
Posted by Adam Lundrigan (adamlundrigan) on 2012-05-29T14:55:11.000+0000
Fixed in trunk r24821
Have you found an issue?
See the Overview section for more details.