[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [Libevent-users] [2.0.19-stable] Infinite loop
I see in latest version this is being handled by min_heap_adjust_. But
curious to know what lead to this state.
Moreover, it won't hurt to check if e->ev_timeout_pos.min_heap_idx !=
-1 in min_heap_push_ also right?
On 16 September 2016 at 13:01, sahil aggarwal <sahil.agg15@xxxxxxxxx> wrote:
> Was able to reproduce by running the program in GDB and adding the
> breakpoints at event.c:2476 and continuing from there.
>
> So the heap has same event at multiple positions which can cause the
> event in heap to have min_heap_idx = -1. Here is the current heap
>
> $66 = {
> p = 0x63b890,
> n = 19,
> a = 32
> }
>
> (gdb) p base->timeheap.p[0]
> $46 = (struct event *) 0x6024c0
> (gdb) p base->timeheap.p[1]
> $47 = (struct event *) 0x605190
> (gdb) p base->timeheap.p[2]
> $48 = (struct event *) 0x604c90 [a]
> (gdb) p base->timeheap.p[3]
> $49 = (struct event *) 0x604790
> (gdb) p base->timeheap.p[4]
> $50 = (struct event *) 0x604290 [b]
> (gdb) p base->timeheap.p[5]
> $51 = (struct event *) 0x603d90 [y]
> (gdb) p base->timeheap.p[6]
> $52 = (struct event *) 0x603890 [z]
> (gdb) p base->timeheap.p[7]
> $53 = (struct event *) 0x602e90
> (gdb) p base->timeheap.p[8]
> $54 = (struct event *) 0x603390
> (gdb) p base->timeheap.p[9]
> $55 = (struct event *) 0x602990 [x]
> (gdb) p base->timeheap.p[10]
> $56 = (struct event *) 0x604290 [b]
> (gdb) p base->timeheap.p[11]
> $57 = (struct event *) 0x602990 [x]
> (gdb) p base->timeheap.p[12]
> $58 = (struct event *) 0x603d90 [y]
> (gdb) p base->timeheap.p[13]
> $59 = (struct event *) 0x604c90 [a]
> (gdb) p base->timeheap.p[14]
> $60 = (struct event *) 0x603890 [z]
>
>
> Not sure what is causing this corrupted heap state.
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.