[asterisk-bugs] [JIRA] (ASTERISK-24571) deadlok when asterisk is loading and will do "sip reload"

Badalian Vyacheslav (JIRA) noreply at issues.asterisk.org
Tue Dec 2 19:51:29 CST 2014


    [ https://issues.asterisk.org/jira/browse/ASTERISK-24571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=223808#comment-223808 ] 

Badalian Vyacheslav commented on ASTERISK-24571:
------------------------------------------------

Attacked show locks

i was add to ast_websocket_write
{code}
+        ao2_lock(session);
        if (ast_careful_fwrite(session->f, session->fd, frame, header_size, session->timeout)) {
                ao2_unlock(session);
                return -1;
        }

        if (actual_length && ast_careful_fwrite(session->f, session->fd, payload, actual_length, session->timeout)) {
                ao2_unlock(session);
                return -1;
        }
        fflush(session->f);
        ao2_unlock(session);
{code}

because you unlock session but not lock it... it looks to mistake...and in ast_websocket_close you also lock and unlock session before write to it...
I was wrong? It's do deadlock?

> deadlok when asterisk is loading and will do "sip reload"
> ---------------------------------------------------------
>
>                 Key: ASTERISK-24571
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-24571
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>    Affects Versions: 11.14.1
>            Reporter: Badalian Vyacheslav
>            Assignee: Badalian Vyacheslav
>         Attachments: locks.txt, vgdb.txt
>
>
> Found then tested in valgrind.
> We use FreePBX. On valgrind asterisk have long load. 
> If asterisk load extentions file (loading about 5 sec) and do sip reload - asterisk go to deadlock.
> If we kiil asterisk - ports stay openned. Only reboot free ports (may be you must add REUSE flag?)



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list