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

No such file or directory(2) #74

Open
Gasol opened this issue Feb 3, 2017 · 1 comment
Open

No such file or directory(2) #74

Gasol opened this issue Feb 3, 2017 · 1 comment
Assignees

Comments

@Gasol
Copy link
Contributor

Gasol commented Feb 3, 2017

Hi, I'm ports maintainer of pecl-trace 1, I has been updated phptrace to 1.0.0 and encounter this problem.

Run commands described in README as following show error message like ERROR: Invalid process id "54000" "No such file or directory(2)"
But it's ok with phptrace -p all

php -r 'for ($i = 0; $i < 10; $i++) usleep(10000);' &
phptrace -p $!

OS

$ uname -a
FreeBSD beastie 10.3-RELEASE-p11 FreeBSD 10.3-RELEASE-p11 #0: Mon Oct 24 18:49:24 UTC 2016     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

PHP

$ php -v
PHP 5.6.30 (cli) (built: Jan 21 2017 01:16:05)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Xdebug v2.5.0, Copyright (c) 2002-2016, by Derick Rethans

$ php -m
[PHP Modules]
Core
ctype
curl
date
dom
ereg
filter
hash
imagick
intl
jq
json
JsonNet
libxml
mbstring
mecab
mhash
mysql
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
Reflection
sockets
SPL
standard
tokenizer
trace
uuid
vld
xdebug
xml
zlib

[Zend Modules]
Xdebug
@monque monque self-assigned this Feb 4, 2017
@monque
Copy link
Collaborator

monque commented Mar 4, 2017

Try it on the lastest FreeBSD, works as expected.

Uname

$uname -a
FreeBSD freebsd.shiva.arena.mo47.com 11.0-RELEASE-p1 FreeBSD 11.0-RELEASE-p1 #0 r306420: Thu Sep 29 01:43:23 UTC 2016     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

Screenshot
screenshot

So, could you re-produce it? using these snippets below.

  1. extend whole cost time
php -r 'for ($i = 0; $i < 20; $i++) usleep(50000);' &
phptrace -p $!
  1. Specified pid
php -r 'for ($i = 0; $i < 100000; $i++) { usleep(50000); echo getmypid()."\n"; }'
# PID will be displayed by PHP, and phptrace -p $pid

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

2 participants