|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-01-15 19:27 UTC] tom at sl dot cm
[2016-12-13 07:06 UTC] remi@php.net
-Status: Open
+Status: Feedback
[2016-12-13 07:06 UTC] remi@php.net
[2016-12-25 04:22 UTC] pecl-dev at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 13 09:00:01 2025 UTC |
Description: ------------ I run three very active machines which all use dio to lock files on an NFS export. Several times a day, one of the php instances randomly locks up and spins with 100% CPU, and this will complete. I've traced the issue down to dio_open - which, for some reason, sometimes causes the CPU to spin away and it never returns. Test script: --------------- Here's the code block that the issue occurs in. PLEASE NOTE: This code works 99.9999% of the time - the issue, unfortunately, cannot be reliably reproduced. $flags = O_RDONLY; $locktype = F_RDLCK; $locked = false; while($locked === false) { $this->handle = @dio_open($filename, $flags, 0777); if ($this->handle===false) break; $res = @dio_fcntl($this->handle, F_SETLK, Array("type"=>$locktype)); if ($res!=-1) { $locked = true; } else { @dio_close($this->handle); $this->handle=false; usleep(250000); } }