Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

What is the cause of FUTEX_WAIT_PRIVATE ETIMEDOUT (Connection timed out)? #80

Closed
iZRIdJJ53S opened this issue Jul 9, 2019 · 6 comments

Comments

@iZRIdJJ53S
Copy link

OS

# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)

php

# php -v
PHP 7.2.14 (cli) (built: Mar 12 2019 17:13:29) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.14, Copyright (c) 1999-2018, by Zend Technologies

# php -i | grep sky
/etc/php.d/skywalking.ini
skywalking
SkyWalking Agent => /tmp/sky_agent.sock
skywalking.app_code => MyProjectName => MyProjectName
skywalking.enable => On => On
skywalking.grpc => 127.0.0.1:11800 => 127.0.0.1:11800
skywalking.log_path => /tmp => /tmp
skywalking.version => 6 => 6

netstat

# netstat -tnlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      14877/httpd
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      32957/java
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      9640/sshd
tcp        0      0 0.0.0.0:11800           0.0.0.0:*               LISTEN      32940/java
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      10340/master
tcp        0      0 0.0.0.0:12800           0.0.0.0:*               LISTEN      32940/java

apache-skywalking-apm-bin-6.2.0 is used by default
https://github.com/apache/skywalking/blob/v6.2.0/docs/en/setup/backend/backend-ui-setup.md

# ./apache-skywalking-apm-bin-6.2.0/bin/startup.sh
SkyWalking OAP started successfully!
SkyWalking Web Application started successfully!

netcat

# nc -v 127.0.0.1 11800
Ncat: Version 7.50 ( https://nmap.org/ncat )
Ncat: Connected to 127.0.0.1:11800.

XHTTP/2 client preface string missing or corrupt. Hex dump for received bytes: 0a

Ncat: Broken pipe.

sky_php_agent version3.1.0

# ./sky_php_agent_linux_x64-3.1.0 127.0.0.1:11800
hello skywalking

.....
.....(Nothing is displayed)

strace

# strace -p $(pgrep sky_php_agent)
strace: Process 15391 attached
restart_syscall(<... resuming interrupted futex ...>) = -1 ETIMEDOUT (Connection timed out)
futex(0xc44950, FUTEX_WAKE_PRIVATE, 1)  = 1
futex(0xc0001044c0, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc485e0, FUTEX_WAIT_PRIVATE, 0, {39, 999999084}) = -1 ETIMEDOUT (Connection timed out)
futex(0xc44950, FUTEX_WAKE_PRIVATE, 1)  = 1
futex(0xc0001044c0, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc48660, FUTEX_WAIT_PRIVATE, 0, {39, 999998788}^Cstrace: Process 15391 detached
 <detached ...>

FUTEX_WAIT_PRIVATE ETIMEDOUT (Connection timed out) is displayed infinitely

I am in trouble because I do not know the reason
I hope you can help 🙇

@iZRIdJJ53S
Copy link
Author

Is not Apache + mod_php supported?
Should I use php_fpm?

@heyanlong
Copy link
Member

@iZRIdJJ53S No test

@iZRIdJJ53S
Copy link
Author

@heyanlong Thank you very much. I'm glad if you can tell if I fix it. 🙇

@heyanlong
Copy link
Member

Does apache and sky_agent run the same user?

@iZRIdJJ53S
Copy link
Author

@heyanlong Thank you very much

apache and sky_agent may not have been the same user
🎉 It worked when executed by the same user 👍

Operated under the following conditions

By the way, it was OK even with nginx + php-fpm

  • Nginx v1.17.0
  • php-fpm PHP 7.2.14 (fpm-fcgi)
  • skywalking v6.2.0
  • sky_php_agent v3.1.1

🎉 It worked when executed by the same user 👍
Thank you very much for your support 🙇

@heyanlong
Copy link
Member

🎉🎉🎉

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

No branches or pull requests

2 participants