Skip to content

Event loop hangs after calling exists #75

@razshare

Description

@razshare

Hey, I'm trying to prepare migrating a large codebase from amp v2 to v3 and so far everything has been really smooth, which is impressive, also the documentation and the short descriptions on the github releases page saying what replaced what from v2 to v3 helped a lot.

However I'm having an issue with \Amp\File\exists, it seems to be causing revolt's event loop to hang.

I prepared a repository that reproduces the error as I'm seeing it
https://github.com/tncrazvan/amp-v3-event-loop-hangs-after-exists

I'm running the script and then my event loop seems to hang forever.
image

However if I run some other async operation other than exists, everything works fine, the event loop stops as expected.

These are my php version and modules

PHP 8.2.7 (cli) (built: Jun  8 2023 15:27:40) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.7, Copyright (c) Zend Technologies
    with Zend OPcache v8.2.7, Copyright (c), by Zend Technologies
    with Xdebug v3.2.1, Copyright (c) 2002-2023, by Derick Rethans
[PHP Modules]
calendar
Core
ctype
curl
date
dom
exif
FFI
fileinfo
filter
ftp
gettext
hash
iconv
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
random
readline
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
uuid
xdebug
xml
xmlreader
xmlwriter
xsl
yaml
Zend OPcache
zlib

[Zend Modules]
Xdebug
Zend OPcache

And this is my os release

Distributor ID:	Pop
Description:	Pop!_OS 22.04 LTS
Release:	22.04
Codename:	jammy

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions