[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [Libevent-users] infinite loop in evmap_io_active
On Mon, Apr 11, 2011 at 6:34 AM, Mike Cui <cuicui@xxxxxxxxx> wrote:
> I'm also seeing an infinite loop in evmap_io_active:
>
> TAILQ_FOREACH(ev, &ctx->events, ev_io_next) {
> if (ev->ev_events & events)
> event_active_nolock(ev, ev->ev_events & events, 1);
> }
>
> It looks like the ev_io_next pointer points back to itself :(
So, the likeliest reason for this to happen is a corrupt event, as I
just mentioned in my email to Sherif:
"One reason that can happen
is if you add an event, then re-assign it and re-add it without first
deleting it. To debug that, try enabling debug mode by calling
event_enable_debug_mode();
near the start of your program (before you construct any event_bases).
It should detect any attempts to modify an event that's currently pending."
HTH,
--
Nick
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.