[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [Libevent-users] Assertion fails in insert_common_timeout_inorder
On Mon, Jun 25, 2012 at 2:41 AM, Avi Bab <ABab@xxxxxxxxxxxxx> wrote:
>
>
>
>
> I am using libevent-2.0.18-stable running on Liux (CentOs 6.2).
>
> Adding an event with a common timeout I get an assertion failure in
> insert_common_timeout_inorder (event.c:2532):
> “EVUTIL_ASSERT(is_same_common_timeout(&e->ev_timeout, &ev->ev_timeout));”
A nice bunch of data; that should help track it down!
The assertion is triggering because it's trying to assert an event
with a common timeout into one of the common timeout queues ... but
one of the events in that queue had a different timeout, which is
supposed to be impossible, since each queue only has events of a
single common timeout!
If your gdb results are right, it appears that the event in the queue
has a timeout of 0,0: It looks like it was cleared without actually
removing it from the queue!
My guess here is that something re-set one of your pending events
(e.g. by calling event_assign or event_set on it) without first
calling event_del() to remove it from the event_base.
There's actually a feature to try to detect this mistake for you:
check out the documentation for event_enable_debug_mode(): it should
detect that bug (if that's what's happening) at the point where the
erroneous event_assign() is happening.
If you're on Linux, you could also try running under valgrind; that
would detect other kinds of errors that could be causing this
behavior.
yrs,
--
Nick
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.