strace看到的情况是:
clock_gettime(CLOCK_MONOTONIC, {8078, 581490395}) = 0
rt_sigprocmask(SIG_SETMASK, ~[], ~[ILL TRAP BUS FPE KILL SEGV STOP], 8) = 0
rt_sigtimedwait(~[], 0x403989e30, {0, 0}, 8) = -1 EAGAIN (Resource temporarily unavailable)
rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP BUS FPE KILL SEGV STOP], NULL, 8) = 0
gettid() = 4668
gettid() = 4668
write(102394, "P", 1) = 1
gettid() = 4668
read(102393, "R", 1) = 1
gettid() = 4668
clock_gettime(CLOCK_MONOTONIC, {8078, 585339859}) = 0
rt_sigprocmask(SIG_SETMASK, ~[], ~[ILL TRAP BUS FPE KILL SEGV STOP], 8) = 0
rt_sigtimedwait(~[], 0x403989e30, {0, 0}, 8) = -1 EAGAIN (Resource temporarily unavailable)
rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP BUS FPE KILL SEGV STOP], NULL, 8) = 0
gettid() = 4668
gettid() = 4668
write(102394, "S", 1) = 1
gettid() = 4668
read(102393, "S", 1) = 1
gettid() = 4668
clock_gettime(CLOCK_MONOTONIC, {8078, 589163481}) = 0
rt_sigprocmask(SIG_SETMASK, ~[], ~[ILL TRAP BUS FPE KILL SEGV STOP], 8) = 0
rt_sigtimedwait(~[], 0x403989e30, {0, 0}, 8) = -1 EAGAIN (Resource temporarily unavailable)
rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP BUS FPE KILL SEGV STOP], NULL, 8) = 0
gettid() = 4668
gettid() = 4668
write(102394, "T", 1) = 1
gettid() = 4668
read(102393, "T", 1) = 1
gettid() = 4668
clock_gettime(CLOCK_MONOTONIC, {8078, 592980751}) = 0
rt_sigprocmask(SIG_SETMASK, ~[], ~[ILL TRAP BUS FPE KILL SEGV STOP], 8) = 0
rt_sigtimedwait(~[], 0x403989e30, {0, 0}, 8) = -1 EAGAIN (Resource temporarily unavailable)
rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP BUS FPE KILL SEGV STOP], NULL, 8) = 0
gettid() = 4668
这应该怎么解决呢?怎么找问题呢
4 个解决方案
#1
gdb 设置断点调试一下呗.
#2
在libevent轮询的函数里 设断点
#3
strace 有没有办法知道正在执行的是哪一行呢?
libevent 安装的时候,不知道有没有用-g参数,能打断点?
libevent 安装的时候,不知道有没有用-g参数,能打断点?
#4
可以改libevent的makefile吧
在makefile里加-g
在makefile里加-g
#1
gdb 设置断点调试一下呗.
#2
在libevent轮询的函数里 设断点
#3
strace 有没有办法知道正在执行的是哪一行呢?
libevent 安装的时候,不知道有没有用-g参数,能打断点?
libevent 安装的时候,不知道有没有用-g参数,能打断点?
#4
可以改libevent的makefile吧
在makefile里加-g
在makefile里加-g