swoole-src: Error WARNING ReactorEpoll::add()

I encountered an issue when using a coroutine to send data to AWS SNS within my application. The error occurs at runtime with the following message:

WARNING	ReactorEpoll::add(): failed to add events[fd=26#0, type=27, events=512], Error: Bad file descriptor[9]

This happens when executing the coroutine using co(function () { ... })

Environment Details:

Image

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 7
  • Comments: 18 (9 by maintainers)

Most upvoted comments

@jilcimar Please test with the latest code from the GitHub master branch, setting the print_backtrace_on_error option to true. This option will print the call stack when an unknown error occurs. This is an unknown error, and I cannot currently think of the circumstances under which this issue might arise.

@iamrafaelmelo Please execute the following command to update swoole-src and recompile, ensuring that the cache is cleared.

git pull
phpize
./configure [your options]
make clean
make -j 8
make install

Check the output of php --ri swoole or look at config.h to see if boost stacktrace or execinfo.h is enabled.

@matyhtf I achieve install boost-dev on Alpine Linux, and works, on enable print_backtrace_on_error option we have been this results

Image

Image

Alpine

  • We are using the latest version (3.21)

Swoole informations

Image

PHP version and extensions

Image

I have the same problem too