php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64648 eio_mkdir hangs and blocks script
Submitted: 2013-04-14 02:23 UTC Modified: 2013-04-14 12:02 UTC
From: imprec at gmail dot com Assigned:
Status: Wont fix Package: eio (PECL)
PHP Version: 5.4.13 OS: OSX 10.8.3
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: imprec at gmail dot com
New email:
PHP Version: OS:

 

 [2013-04-14 02:23 UTC] imprec at gmail dot com
Description:
------------
When running eio_mkdir code example, the directory is created but the eio_mkdir 
function hangs and blocks the process.

I'm using an SSD.

Note : I'm encountering this issue when running test suite of react libeio 
implementation, see 
https://github.com/romainneutron/react/blob/filesystem/src/React/Filesystem/Libeio
Filesystem.php

Some tests on eio_open eio_read produce some "bus error" segmentation fault.



Test script:
---------------
<?php
$temp_dirname = "eio-temp-dir";

/* Is called when eio_mkdir() finishes */
function my_mkdir_callback($data, $result) {
 if ($result == 0 && is_dir($temp_dirname)
   && !is_readable($temp_dirname)
   && is_writable($temp_dirname)) {
  echo "eio_mkdir_ok";
 }

 // Remove directory
    if (file_exists($data))
        rmdir($temp_dirname);
}

// Create directory with access mode 0300
eio_mkdir($temp_dirname, 0300, EIO_PRI_DEFAULT, "my_mkdir_callback", $temp_dirname);
eio_event_loop();


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-04-14 02:25 UTC] imprec at gmail dot com
-PHP Version: Irrelevant +PHP Version: 5.4.13
 [2013-04-14 02:25 UTC] imprec at gmail dot com
Some informations about the system :

PHP 5.4.13 (cli) (built: Apr 13 2013 20:13:48) (DEBUG)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
    with Xdebug v2.2.1, Copyright (c) 2002-2012, by Derick Rethans


eio

eio support => enabled
Debug support => enabled
Version => 1.2.1
 [2013-04-14 02:42 UTC] imprec at gmail dot com
It appears that this problem occurs when php-uv is enabled 
(https://github.com/chobie/php-uv)
 [2013-04-14 12:02 UTC] osmanov@php.net
-Status: Open +Status: Wont fix
 [2013-04-14 12:02 UTC] osmanov@php.net
Can't reproduce(without "php-uv"). You should have omitted `global
$temp_dirname;' within the function.

Furthermore, php-uv extension conflicts with eio. I hadn't put such a
dependency in the eio code, since php-uv is still not an official PECL
extension.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC