[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[Libevent-users] Infinity loop
- To: libevent-users@xxxxxxxxxxxxx
- Subject: [Libevent-users] Infinity loop
- From: Springande Ulv <springandeulv@xxxxxxxxx>
- Date: Sat, 3 Oct 2009 07:32:48 +0200
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: libevent-users-outgoing@xxxxxxxx
- Delivered-to: libevent-users@xxxxxxxx
- Delivery-date: Sat, 03 Oct 2009 01:39:37 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:content-type :content-transfer-encoding:subject:date:message-id:to:mime-version :x-mailer; bh=ug0YgHf2Zhjho/cxz4/cKPYdkJW30qx83D4U2Clak+0=; b=xrkuncU3ThBH8nb+vo9Cd83Uhut8wd8NzbQ0UIbJlrDV/VWXgtMKIxvExXnacsUku5 YjuPhJBC9uGla8UZnsDtA9UclsT5qyoUrrilcJTa9xAL5D1MSGSK0ZsUeswdbpLvZcVk 01VtKzD2Ko9a7lR9ygZeSYPYxwu8UPjdGkJu0=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:content-type:content-transfer-encoding:subject:date:message-id :to:mime-version:x-mailer; b=kPxH/rksdp0dnxFKrKC5Nn/TC1GhfO75jgam7gNNCdfkn4YOyTFVOL62Cq1yJjeF7+ J3AncibOqHxCOCU5BdRlsCJFuRSMNVTvlRZdb2k7iaGUTHU/FqMdgtf1LYaXd9CQttK6 KnxCGKrKmjmb8owKzJknkHzezj111icIrP97A=
- Reply-to: libevent-users@xxxxxxxxxxxxx
- Sender: owner-libevent-users@xxxxxxxxxxxxx
I'm using libevent 1.4.12. Sometimes I end up in an infinity loop in
event.c:timeout_process(). The while loop is not able to exit and
"pops" the same ev object from the base->timeheap. To me it seems that
the ev object is deleted and then reinserted in event_active in an
infinite loop.
while ((ev = min_heap_top(&base->timeheap))) {
if (evutil_timercmp(&ev->ev_timeout, &now, >))
break;
/* delete this event from the I/O queues */
event_del(ev);
event_debug(("timeout_process: call %p",
ev->ev_callback));
event_active(ev, EV_TIMEOUT, 1);
}
Has anyone else experienced something like this? What may be the cause
for this?
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.