来自/lib64/libc.so.6的poll()中的星号分段错误

时间:2015-12-08 11:54:19

标签: segmentation-fault asterisk

有一段时间我增加了Asterisk机器上的拨出电话数量,并且我不时会出现分段错误。在进行核心转储后,我观察到总是在这里碾压:

Channel.c:

if (sizeof(int) == 4) { /* XXX fix timeout > 600000 on linux x86-32 */
        do {
            int kbrms = rms;
            if (kbrms > 600000)
                kbrms = 600000;
            res = ast_poll(pfds, max, kbrms);
            if (!res)
                rms -= kbrms;
        } while (!res && (rms > 0));
    } else {
        res = ast_poll(pfds, max, rms);
    }

核心转储的导出。

第一次转储:

Thread 51 (Thread 0x2ba89c07b700 (LWP 14073)):
0  0x00002ba8399bd613 in poll () from /lib64/libc.so.6
No symbol table info available.
1  0x00002ba88a5940b9 in do_monitor (data=<value optimized out>) at chan_dahdi.c:11816
        __cancel_buf = {__cancel_jmp_buf = {{__cancel_jmp_buf = {48003172248944, 3445977733249848716, 140735914321392, 48003172252096, 0, 3, 8683971917012751756, 8683932733782316428}, __mask_was_saved = 0}}, __pad = {0x2ba89c07ad70, 0x0, 0x6e00000077, 0x18}}
        __cancel_routine = 0x2ba88a5633c0 <monitor_pfds_clean>
        not_first_call = <value optimized out>
        count = <value optimized out>
        res = 0
        res2 = <value optimized out>
        spoint = <value optimized out>
        pollres = <value optimized out>
        i = 0x0
        last = 0x0
        doomed = <value optimized out>
        thispass = 1449476961
        lastpass = <value optimized out>
        found = <value optimized out>
        buf = '\000' <repeats 1023 times>
        pfds = 0x2ba8980008e0
        lastalloc = 123
        __PRETTY_FUNCTION__ = "do_monitor"
        __FUNCTION__ = "do_monitor"*

第二次转储:

*0  0x00002b8975c63613 in poll () from /lib64/libc.so.6
No symbol table info available.
1  0x000000000047581a in ast_waitfor_nandfds (c=0x2b8991e5eaf8, n=1, fds=0x566526f0, nfds=-1847204016, exception=0x0, outfd=0x0, ms=0x2b8991e5eb04) at channel.c:3282
        kbrms = 36521
        start = {tv_sec = 1449469680, tv_usec = 241082}
        pfds = <value optimized out>
        res = <value optimized out>
        rms = 36521
        x = <value optimized out>
        y = <value optimized out>
        max = 2
        sz = <value optimized out>
        now = <value optimized out>
        whentohangup = <value optimized out>
        diff = <value optimized out>
        winner = 0x0
        fdmap = 0x2b8991e5e750
        __PRETTY_FUNCTION__ = "ast_waitfor_nandfds"*

Asterisk版本1.8.28-cert5,Linux RedHat 6.2 64位。

有什么想法吗?

祝你好运, George Sand

1 个答案:

答案 0 :(得分:0)

对于需要使用调试信息编译的星号版本的调试(这一个是WITHOUT)。

请注意,这个问题不是编程问题,而是关于SO的问题。