libev: segmentation fault in ev_feed_event().

Marc Lehmann schmorp at schmorp.de
Sun Aug 28 16:31:26 CEST 2022


On Sat, Aug 27, 2022 at 09:09:10PM +0530, Mushtaq Khan <mushtaqk.ecit at gmail.com> wrote:
> I see a segmentation fault ev_feed_event() called from timer_reify(). I
> used to see this issue intermittently now i see this quite consistently in
> my work environment.

Most likely you are seeing the result of memory corruption due to a bug
elsewhere in your program, e.g. from a data race between threads, reusing
memory of active watchers or something like that.

This can be difficult to track down - you can compile libev using
-DEV_VERIFY=2 to enable very frequent checks of its data structures - this
has a good chance of triggering an abor earlier, but especially data races
can be hard to track down - make sure you lock your loops properly when using
them in different threads, for example.

-- 
                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 libev mailing list