Issue with AnyEvent::AIO

Marc Lehmann schmorp at schmorp.de
Sat Jul 1 08:15:42 CEST 2023


On Fri, Jun 30, 2023 at 08:31:14AM +0200, Dominik Csapak <d.csapak at proxmox.com> wrote:
> Is there any way to detect that during runtime? (so i could go and try to
> detect the parts of the code where that might happen.)

You cna register  apost_detect block and priont a stracktrace, e.g. something
like this (untested):

   my $guard = AnyEvent::post_detect { use Carp; Carp::cluck "anyevent initialised" };

> epoll_wait(4, [{events=EPOLLIN, data={u32=8, u64=4294967304}}], 64, 3346) = 1

That basiclaly means that fd#8 is ready to read from, but nothiong reads
from it. Maybe (on linux) looking at /proc/pid/fd can tell you what fd#8
is? or maybe straceing the whole process can tell you what fd#8 is before
it is added to the epoll set?

> Is there any other information i can provide to help (some log output, strace, etc.?)
> I would be very grateful if you could give any hint as to how i can

Have you tried running your program with PERL_ANYEVENT_STRICT=1 in the
environment? If the cause is a bug somewhjere, this will catch a lopt of
common mistakes (but obviously won't catch everything).

If that gives you an error something, that would also be worth investigating.

It cannot catch fork-related issues.

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp at schmorp.de
      -=====/_/_//_/\_,_/ /_/\_\



More information about the anyevent mailing list