Random segfaults when using AnyEvent::HTTP

Marc Lehmann schmorp at schmorp.de
Sat Dec 12 22:19:59 CET 2015


On Fri, Dec 11, 2015 at 11:29:54PM +0200, Yuriy Ustushenko <yoreek at yahoo.com> wrote:
> So in this case, the object EV::Loop has already been destroyed and when we
> try to create a timer
> we get an error.

This is almost certainly due to the long-standing global destruction bug
in perl, and not something that is caused by AnyEvent::HTTP or EV. I have
recently written a small article about this (about Coro, but the problem
isn't specific to my modules), that explains it in more detail - see:

   http://blog.schmorp.de/2015-11-12-tidbits-why-coro-crashes-or-how-perl-6-deals-with-bugs.html

> Maybe it's not a bug? Maybe it's a feature ?

The current perl maintainers sure consider it a feature :/

If it is a problem for you and you don't want to _exit, your only chance
is to rewrite your programs in a way to avoid the problem during global
destruction, i.e. by making sure there are no outstanding operations, or
otherwise making sure perl doesn't corrupt data structures.

-- 
                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