Skip to content
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

stream_select(): unable to select [4]: Interrupted system call (max_fd=5) #670

Closed
bigdaddymax opened this issue Mar 30, 2019 · 3 comments
Closed

Comments

@bigdaddymax
Copy link

After upgrading to 2.8.1 we get the ocasional following exceptions:

Fatal error: Uncaught ErrorException: stream_select(): unable to select [4]: Interrupted system call (max_fd=5) in /opt/www/sbwell.com/library/PhpAmqpLib/Wire/IO/StreamIO.php on line 474

It looks like the reason for this exception is the recent change in error_handler() function, in particular the way how specific warning is detected: #615

In previouse versions it was simple search for "Interrupted system call" substring.

Now it is looking for "errno=4":

        self::$ERRNO_EQUALS_EINTR = 'errno=' . SOCKET_EINTR;      
        
        // stream_select warning that it has been interrupted by a signal - EINTR
        if (strpos($errstr, self::$ERRNO_EQUALS_EINTR) !== false) {

The trick is that the real error string (in our case) does not contain "errno=XXX" substring at all:

stream_select(): unable to select [4]: Interrupted system call (max_fd=5)

I am not sure if the format of the error string depends on the OS or PHP version, we use PHP 7.1 and CentOS 6.10

@ramunasd
Copy link
Member

Hi @bigdaddymax , this was fixed in version v2.9.0, please check.

@lukebakken
Copy link
Collaborator

Assuming fixed in the latest version. If evidence to the contrary is provided, we will re-open.

@liuyong888
Copy link

liuyong888 commented Oct 31, 2021

Assuming fixed in the latest version. If evidence to the contrary is provided, we will re-open.

Hi, I ran into this problem with 2.9.1 #955

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants