-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unknown error calling "eio_open" #43
Comments
|
@WyriHaximus unfortunately can not make it works. Try my snippet with eio and periodic timer) |
@hotrush will do it together with #18 (comment) |
I'm experiencing a similar issue with a simple create temp file, write, rename cycle within a periodic timer. Every few iterations eio_open returns with -1. I have trier various Invokers without luck. As per the initial reporter, I can see file handles been open in lsof output and eventually the number of open files limit is hit. If I run a similar loop calling eio_* functions directly I cannot reproduce the issue. Issue occurring on AWS EC2 Linux template, running the same code on MacOSX does not show the issue. Pecl package eio version 2.0.4 and ev 1.0.4 installed on both systems. Running php 7.2.12 Failing code snippet:
EIO Code working snippet:
|
I realised my eio example wasn't the best and I re-wrote it to work the same way as react filesystem and can replicate the issue. The call to eio_open is occasionally returning FALSE instead of the resource but then successfully calling the callback when it opens the file. In the basic eio example this then can continue to write to the file. However react filesystem cannot because the open promise has been rejected due to the failed call to eio_open(). Reading the doco http://php.net/manual/en/function.eio-open.php I'm not sure the check for the return value from eio_open is correct. The documentation doesn't define what the return result should be from the function, it only specifies that a failure would be a -1 in the result code sent to the callback https://github.com/reactphp/filesystem/blob/master/src/Eio/Adapter.php#L407 |
An update on this, I've been running for the last 5 days with
replaced by
So far, no leaking open file handles, files are getting successfully created, opened, written to, and renamed with not error seen. The only downside to this is that you can't get a reference to the request if you wanted to cancel the request. Not sure if anyone actually want's to do such a thing (eg cancelling an open file request, there is a good chance the file will be opened before the request is cancelled). However if libeio sometimes returns failure on eio_open() but then successfully completes the action you have to handle it the best way. For completeness I compiled pecl eio with the current version of libeio instead of the version from 2012 currently in the codebase, no change. |
Eio is quite a diva. I've been running for a few days react/fs with eio, with a periodic timer (2mins interval) to write data to a single file (always overwriting). Every 3rd or 4th time I got an In my newish project I'm using pthreads and thus am using my pthreads adapter (with an improved react/fs (#45)). |
I have the same error: "Unknown error calling "eio_open". From documentation
In my case eio sometimes return false instead of descriptor of file. I also found an error when not the whole file is read:
I create separate topic #73 about this bug. |
I faced an issue with eio adapter. Simple snippet to reproduce:
First tick written ok, others cause an error:
Opened files number growing and when reach system limits causing other errors e.g. DNS query failed or ssl handshake failed.
Here is another strange thing -
eio_open
causes an error, butls -l /proc/23566/fd
shows opened files, e.g. (but no real files created):It works fine at my local deepin linux (based on debian 8), but can not make it work at any server with ubuntu 16.04/18.04. Any ideas how to debug it?
The text was updated successfully, but these errors were encountered: