You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Justin Ross (JIRA)" <ji...@apache.org> on 2017/03/04 01:30:45 UTC

[jira] [Updated] (QPID-7463) [Python Client for AMQP 0-8,0-9] Race condition when creating session

     [ https://issues.apache.org/jira/browse/QPID-7463?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Justin Ross updated QPID-7463:
------------------------------
    Fix Version/s:     (was: qpid-python-1.36.0)
                   qpid-python-1.37.0

> [Python Client for AMQP 0-8,0-9] Race condition when creating session
> ---------------------------------------------------------------------
>
>                 Key: QPID-7463
>                 URL: https://issues.apache.org/jira/browse/QPID-7463
>             Project: Qpid
>          Issue Type: Bug
>          Components: Python Client
>    Affects Versions: qpid-python-1.35.0
>            Reporter: Lorenz Quack
>             Fix For: qpid-python-1.37.0
>
>
> It seems that {{Client.session()}} is not thread safe. There seems to be a race condition that means two concurrent calls can actually share the same underlying session.
> {{Client.session()}} acquires {{self.lock}} and determines a free session id. It then releases the lock before calling {{self.channel(id)}} which acquires the lock again and allocates the id and creates the session.
> If a second call to {{Client.session()}} happens in the moment the lock is released but before {{self.channel(id)}} reacquires it the second call will find the same free {{id}} and will then subsequently return the same session object from {{self.channel(id)}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org