You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Supun Kamburugamuva <su...@gmail.com> on 2008/09/17 13:01:24 UTC

axis2_msg_recv_make_new_svc_obj function with two threads

Hi all,

I have a question about the msg_recv.c function
axis2_msg_recv_make_new_svc_obj. In this function we load the service dll if
it is not loaded already. This dll loading happens when the first request
comes to the service. Is it possible to have two threads concurrently
accessing this function for the first time? i.e. Two requests to the same
service at the same time. If it can it leads to a seg faults. This is the
situation.

First thread executes to the line 161 then second thread runs.
When second thread accesses line 143 the loaded dll is still not set to the
axis2_svc.
So the second thread will also try to load the same dll and causes a seg
fault.

I have experience this situation. I wonder why this is not happening with
the normal HTTP transport.

Thanks,
Supun..

-- 
Software Engineer, WSO2 Inc
http://wso2.com

Re: axis2_msg_recv_make_new_svc_obj function with two threads

Posted by Supun Kamburugamuva <su...@gmail.com>.
I have created a Jira for the issue:
https://issues.apache.org/jira/browse/AXIS2C-1266

Supun.

On Wed, Sep 17, 2008 at 4:01 PM, Supun Kamburugamuva <su...@gmail.com>wrote:

> Hi all,
>
> I have a question about the msg_recv.c function
> axis2_msg_recv_make_new_svc_obj. In this function we load the service dll if
> it is not loaded already. This dll loading happens when the first request
> comes to the service. Is it possible to have two threads concurrently
> accessing this function for the first time? i.e. Two requests to the same
> service at the same time. If it can it leads to a seg faults. This is the
> situation.
>
> First thread executes to the line 161 then second thread runs.
> When second thread accesses line 143 the loaded dll is still not set to the
> axis2_svc.
> So the second thread will also try to load the same dll and causes a seg
> fault.
>
> I have experience this situation. I wonder why this is not happening with
> the normal HTTP transport.
>
> Thanks,
> Supun..
>
> --
> Software Engineer, WSO2 Inc
> http://wso2.com
>



-- 
Software Engineer, WSO2 Inc
http://wso2.org