You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Alex Mantaut <al...@intraway.com> on 2012/01/13 21:29:21 UTC

Crash when reusing svc_client with non-blocking call

Hi all,
       I'm performing a stress test on AXIS2C, sending multiple Asynchronous
request from a client to a service.

 I'm using an instance of svc_client to send multiple non_blocking requests
to a service, but after the request I lock the thread to wait for the
callback on complete to finish... The callback unlocks the mutex, wich
unlocks the 1st thread.

The code is similar to this:

mutex.lock();
for(i=0;i<10;i++)
{
        axis2_svc_client_send_receive_non_blocking (svc_client_, env,                                              
payload, callback);
         mutex.lock();
}
mutex.unlock();

   
echo_callback_on_complete(struct axis2_callback* callback,
                          const axutil_env_t*      env)
{
[does a bunch of stuff]
         mutex.unlock();
          return status;
 }

The thing is when it tries to send a second request it fails with
segmentation fault... After some debugging, I found that some of the
callback resources weren't completly deallcated when finishing 
callback_on_complete(), wich somehow makes the next send request cause a
segmentation fault...

Looking in google I found this
https://issues.apache.org/jira/browse/AXIS2C-1551, and it looks like my
issue... Somebody did fix this? is there a workaround I could use to know
when the callback resources have been released? 
-- 
View this message in context: http://old.nabble.com/Crash-when-reusing-svc_client-with-non-blocking-call-tp33136702p33136702.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Re: Crash when reusing svc_client with non-blocking call

Posted by Sagara Gunathunga <sa...@gmail.com>.
You are in a wrong mailing list, please find correct list here[1].

[1] - http://axis.apache.org/axis2/c/core/lists_issues.html

Thanks !

On Sat, Jan 14, 2012 at 1:59 AM, Alex Mantaut <al...@intraway.com>wrote:

>
> Hi all,
>       I'm performing a stress test on AXIS2C, sending multiple Asynchronous
> request from a client to a service.
>
>  I'm using an instance of svc_client to send multiple non_blocking requests
> to a service, but after the request I lock the thread to wait for the
> callback on complete to finish... The callback unlocks the mutex, wich
> unlocks the 1st thread.
>
> The code is similar to this:
>
> mutex.lock();
> for(i=0;i<10;i++)
> {
>        axis2_svc_client_send_receive_non_blocking (svc_client_, env,
> payload, callback);
>         mutex.lock();
> }
> mutex.unlock();
>
>
> echo_callback_on_complete(struct axis2_callback* callback,
>                          const axutil_env_t*      env)
> {
> [does a bunch of stuff]
>         mutex.unlock();
>          return status;
>  }
>
> The thing is when it tries to send a second request it fails with
> segmentation fault... After some debugging, I found that some of the
> callback resources weren't completly deallcated when finishing
> callback_on_complete(), wich somehow makes the next send request cause a
> segmentation fault...
>
> Looking in google I found this
> https://issues.apache.org/jira/browse/AXIS2C-1551, and it looks like my
> issue... Somebody did fix this? is there a workaround I could use to know
> when the callback resources have been released?
> --
> View this message in context:
> http://old.nabble.com/Crash-when-reusing-svc_client-with-non-blocking-call-tp33136702p33136702.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
>


-- 
Sagara Gunathunga

Blog      - http://ssagara.blogspot.com
Web      - http://people.apache.org/~sagara/
LinkedIn - http://www.linkedin.com/in/ssagara