Skip to content

Instantly share code, notes, and snippets.

@voutilad
Created May 17, 2020 00:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save voutilad/c4fad9067569f220121e971def22121d to your computer and use it in GitHub Desktop.
Save voutilad/c4fad9067569f220121e971def22121d to your computer and use it in GitHub Desktop.
investigating a ghost in the machine
Thread 3 hit Breakpoint 1, event_queue_insert (base=0xba9a8534800,
ev=0xba76e0afeb0 <i8253_channel+32>, queue=1) at event.c:879
879 event_errx(1, "%s: %p(fd %d) already on queue %x", __func__,
(gdb) l
874 if (ev->ev_flags & queue) {
875 /* Double insertion is possible for active events */
876 if (queue & EVLIST_ACTIVE)
877 return;
878
879 event_errx(1, "%s: %p(fd %d) already on queue %x", __func__,
880 ev, ev->ev_fd, queue);
881 }
882
883 if (~ev->ev_flags & EVLIST_INTERNAL)
(gdb) p ev
$1 = (struct event *) 0xba76e0afeb0 <i8253_channel+32>
(gdb) p *ev
$2 = {ev_next = {tqe_next = 0x0, tqe_prev = 0x0}, ev_active_next = {tqe_next = 0x0, tqe_prev = 0xba9a852e590}, ev_signal_next = {tqe_next = 0x0, tqe_prev = 0x0}, min_heap_idx = 0,
ev_base = 0xba9a8534800, ev_fd = -1, ev_events = 0, ev_ncalls = 0, ev_pncalls = 0xbaa47693f2a, ev_timeout = {tv_sec = 123701, tv_usec = 532558}, ev_pri = 0,
ev_callback = 0xba76e011bc0 <i8253_fire>, ev_arg = 0xba76e0afe90 <i8253_channel>, ev_res = 1, ev_flags = 129}
[Current thread is 3 (thread 159966)]
(gdb) bt
#0 event_queue_insert (base=0xba9a8534800, ev=0xba76e0afeb0 <i8253_channel+32>, queue=1) at event.c:879
#1 0x00000baa0f58667b in event_add (ev=0xba76e0afeb0 <i8253_channel+32>, tv=0xbaa47693ee8) at event.c:729
#2 0x00000ba76e011c6f in i8253_fire (fd=-1, type=1, arg=0xba76e0afe90 <i8253_channel>) at i8253.c:347
#3 0x00000baa0f58614f in event_process_active (base=0xba9a8534800) at event.c:333
#4 0x00000baa0f58587a in event_base_loop (base=0xba9a8534800, flags=0) at event.c:483
#5 0x00000baa0f5855d7 in event_loop (flags=0) at event.c:409
#6 0x00000baa0f585589 in event_dispatch () at event.c:347
#7 0x00000ba76e002696 in event_thread (arg=0x7f7ffffee5df) at vm.c:1363
#8 0x00000ba9c877da31 in _rthread_start (v=<optimized out>) at /usr/src/lib/librthread/rthread.c:96
#9 0x00000baa0b829118 in __tfork_thread () at /usr/src/lib/libc/arch/amd64/sys/tfork_thread.S:77
#10 0x0000000000000000 in ?? ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment