[jira] [Commented] (PROTON-787) thread safety issue -- openssl initialization

2014-12-23 Thread Bozo Dragojevic (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14256848#comment-14256848
 ] 

Bozo Dragojevic commented on PROTON-787:


from :
{quote}
 * The messenger interface is single-threaded. All methods except one
 * (::pn_messenger_interrupt()) are intended to be used by one thread
 * at a time.
{quote}

> thread safety issue -- openssl initialization
> -
>
> Key: PROTON-787
> URL: https://issues.apache.org/jira/browse/PROTON-787
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: proton-c
>Affects Versions: 0.8
> Environment: unix
>Reporter: Jim Spring
>Priority: Minor
>
> Doing multiple calls to pn_messenger_subscribe can potentially end up in 
> simultaneous calls to pn_ssl_globals_init which calls into openssl which is 
> not thread safe.
> One fix is to explicitly serialize calls (my current approach).
> One other fix - allow for an initial "proton_init" type call that includes 
> openssl initialization.  Which is called before usage of the library.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PROTON-787) thread safety issue -- openssl initialization

2014-12-20 Thread Jim Spring (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14255039#comment-14255039
 ] 

Jim Spring commented on PROTON-787:
---

Note - I have seen other simultaneous calls to pn_messenger_send/put result in 
similar behavior.

> thread safety issue -- openssl initialization
> -
>
> Key: PROTON-787
> URL: https://issues.apache.org/jira/browse/PROTON-787
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: proton-c
>Affects Versions: 0.8
> Environment: unix
>Reporter: Jim Spring
>Priority: Minor
>
> Doing multiple calls to pn_messenger_subscribe can potentially end up in 
> simultaneous calls to pn_ssl_globals_init which calls into openssl which is 
> not thread safe.
> One fix is to explicitly serialize calls (my current approach).
> One other fix - allow for an initial "proton_init" type call that includes 
> openssl initialization.  Which is called before usage of the library.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)