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 "Rutger van Eerd (JIRA)" <ji...@apache.org> on 2009/03/09 16:02:50 UTC

[jira] Created: (AXIS2C-1355) Changing service client options after between messages

Changing service client options after between messages
------------------------------------------------------

                 Key: AXIS2C-1355
                 URL: https://issues.apache.org/jira/browse/AXIS2C-1355
             Project: Axis2-C
          Issue Type: Bug
          Components: core/clientapi
    Affects Versions: 1.6.0
         Environment: Axis2/C from svn (26 Feb 2009)
Linux 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:27:17 EDT 2006 i686 i686 i386 GNU/Linux

            Reporter: Rutger van Eerd
            Priority: Minor


I want to use a single service client to send multiple messages, with different options (i.e. SOAP action). Basicly I do the following.
1. Create service client object.
2. Create options object and set options.
3. Set options to service client (axis2_svc_client_set_options).
4. Execute message (axis2_svc_client_send_receive).
5. Create new options object and set new options.
6. Set new options to service client (axis2_svc_client_set_options).
7. Execute new message (axis2_svc_client_send_receive).

When doing step 7, I get the following message when running under Valgrind.

==3630== Invalid read of size 4
==3630==    at 0x40954A2: axis2_options_get_xml_parser_reset (options.c:883)
==3630==    by 0x4095E02: axis2_op_client_free (op_client.c:655)
==3630==    by 0x4097D2E: axis2_svc_client_create_op_client (svc_client.c:1072)
==3630==    by 0x4099735: axis2_svc_client_send_receive_with_op_qname (svc_client.c:835)
==3630==    by 0x4099A1C: axis2_svc_client_send_receive (svc_client.c:939)
==3630==    by 0x80496BA: main (client.cpp:273)
==3630==  Address 0x427CD4C is 60 bytes inside a block of size 64 free'd
==3630==    at 0x4004EFA: free (vg_replace_malloc.c:235)
==3630==    by 0x4010E82: axutil_allocator_free_impl (allocator.c:92)
==3630==    by 0x40951D8: axis2_options_free (options.c:787)
==3630==    by 0x409785D: axis2_svc_client_set_options (svc_client.c:376)
==3630==    by 0x804961F: main (client.cpp:261)

My guess is that the op_client tries to access the old options object from step 2/3. This is no longer valid as it has been freed when setting the new options (step 6).

Or is svc_client not designed to send multiple messages with different options?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AXIS2C-1355) Changing service client options between messages

Posted by "Rutger van Eerd (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-1355?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rutger van Eerd updated AXIS2C-1355:
------------------------------------

    Priority: Major  (was: Minor)
     Summary: Changing service client options between messages  (was: Changing service client options after between messages)

> Changing service client options between messages
> ------------------------------------------------
>
>                 Key: AXIS2C-1355
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1355
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: core/clientapi
>    Affects Versions: 1.6.0
>         Environment: Axis2/C from svn (26 Feb 2009)
> Linux 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:27:17 EDT 2006 i686 i686 i386 GNU/Linux
>            Reporter: Rutger van Eerd
>
> I want to use a single service client to send multiple messages, with different options (i.e. SOAP action). Basicly I do the following.
> 1. Create service client object.
> 2. Create options object and set options.
> 3. Set options to service client (axis2_svc_client_set_options).
> 4. Execute message (axis2_svc_client_send_receive).
> 5. Create new options object and set new options.
> 6. Set new options to service client (axis2_svc_client_set_options).
> 7. Execute new message (axis2_svc_client_send_receive).
> When doing step 7, I get the following message when running under Valgrind.
> ==3630== Invalid read of size 4
> ==3630==    at 0x40954A2: axis2_options_get_xml_parser_reset (options.c:883)
> ==3630==    by 0x4095E02: axis2_op_client_free (op_client.c:655)
> ==3630==    by 0x4097D2E: axis2_svc_client_create_op_client (svc_client.c:1072)
> ==3630==    by 0x4099735: axis2_svc_client_send_receive_with_op_qname (svc_client.c:835)
> ==3630==    by 0x4099A1C: axis2_svc_client_send_receive (svc_client.c:939)
> ==3630==    by 0x80496BA: main (client.cpp:273)
> ==3630==  Address 0x427CD4C is 60 bytes inside a block of size 64 free'd
> ==3630==    at 0x4004EFA: free (vg_replace_malloc.c:235)
> ==3630==    by 0x4010E82: axutil_allocator_free_impl (allocator.c:92)
> ==3630==    by 0x40951D8: axis2_options_free (options.c:787)
> ==3630==    by 0x409785D: axis2_svc_client_set_options (svc_client.c:376)
> ==3630==    by 0x804961F: main (client.cpp:261)
> My guess is that the op_client tries to access the old options object from step 2/3. This is no longer valid as it has been freed when setting the new options (step 6).
> Or is svc_client not designed to send multiple messages with different options?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: jira issues 1258 and 1312

Posted by Dmitry Goncharov <dg...@unison.com>.

Manjula Peiris wrote:
> Hi Dmitry,
>
> We have fix some Jiras during the last couple of months. But couldn't
> have time to fix these I think. Will try to fix after the release if we
> get some free time.
>
> Thanks,
> -Manjula.
>
>   
Looking forward, Dmitry
> On Mon, 2009-04-13 at 12:01 +0400, Dmitry Goncharov wrote:
>   
>> Hi,
>>
>> A few month ago i opened jira jissues
>> "1258 memory leaks in when using tls" and 
>> "1312 axis2_http_client_connect_ssl_host() cannot make an https
>> connection through http proxy when the proxy requires authentication"
>> and attached patches.
>> Having these issues open hinders moving to the new version of axis.
>>
>> Are there plans to apply the patches?
>>
>>
>> BR, Dmitry
>>     
>
>
>   

Re: jira issues 1258 and 1312

Posted by Manjula Peiris <ma...@wso2.com>.
Hi Dmitry,

We have fix some Jiras during the last couple of months. But couldn't
have time to fix these I think. Will try to fix after the release if we
get some free time.

Thanks,
-Manjula.


On Mon, 2009-04-13 at 12:01 +0400, Dmitry Goncharov wrote:
> Hi,
> 
> A few month ago i opened jira jissues
> "1258 memory leaks in when using tls" and 
> "1312 axis2_http_client_connect_ssl_host() cannot make an https
> connection through http proxy when the proxy requires authentication"
> and attached patches.
> Having these issues open hinders moving to the new version of axis.
> 
> Are there plans to apply the patches?
> 
> 
> BR, Dmitry


jira issues 1258 and 1312

Posted by Dmitry Goncharov <dg...@unison.com>.
Hi,

A few month ago i opened jira jissues
"1258 memory leaks in when using tls" and
"1312 axis2_http_client_connect_ssl_host() cannot make an https 
connection through http proxy when the proxy requires authentication"
and attached patches.
Having these issues open hinders moving to the new version of axis.

Are there plans to apply the patches?


BR, Dmitry

[jira] Commented: (AXIS2C-1355) Changing service client options between messages

Posted by "Damitha Kumarage (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2C-1355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12680766#action_12680766 ] 

Damitha Kumarage commented on AXIS2C-1355:
------------------------------------------

The best thing is take the options struct from svc_client in your subsequence uses of svc_client and set the new options there. Also there there is a function you can try called svc_client_set_override_options(). However I haven't used that and don't know whether it work.

I could reproduce the problem you mentioned. Yes there is a bug there. After options struct is freed from the service client it tries to access an option from within the same options struct set to op_client.

> Changing service client options between messages
> ------------------------------------------------
>
>                 Key: AXIS2C-1355
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1355
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: core/clientapi
>    Affects Versions: 1.6.0
>         Environment: Axis2/C from svn (26 Feb 2009)
> Linux 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:27:17 EDT 2006 i686 i686 i386 GNU/Linux
>            Reporter: Rutger van Eerd
>
> I want to use a single service client to send multiple messages, with different options (i.e. SOAP action). Basicly I do the following.
> 1. Create service client object.
> 2. Create options object and set options.
> 3. Set options to service client (axis2_svc_client_set_options).
> 4. Execute message (axis2_svc_client_send_receive).
> 5. Create new options object and set new options.
> 6. Set new options to service client (axis2_svc_client_set_options).
> 7. Execute new message (axis2_svc_client_send_receive).
> When doing step 7, I get the following message when running under Valgrind.
> ==3630== Invalid read of size 4
> ==3630==    at 0x40954A2: axis2_options_get_xml_parser_reset (options.c:883)
> ==3630==    by 0x4095E02: axis2_op_client_free (op_client.c:655)
> ==3630==    by 0x4097D2E: axis2_svc_client_create_op_client (svc_client.c:1072)
> ==3630==    by 0x4099735: axis2_svc_client_send_receive_with_op_qname (svc_client.c:835)
> ==3630==    by 0x4099A1C: axis2_svc_client_send_receive (svc_client.c:939)
> ==3630==    by 0x80496BA: main (client.cpp:273)
> ==3630==  Address 0x427CD4C is 60 bytes inside a block of size 64 free'd
> ==3630==    at 0x4004EFA: free (vg_replace_malloc.c:235)
> ==3630==    by 0x4010E82: axutil_allocator_free_impl (allocator.c:92)
> ==3630==    by 0x40951D8: axis2_options_free (options.c:787)
> ==3630==    by 0x409785D: axis2_svc_client_set_options (svc_client.c:376)
> ==3630==    by 0x804961F: main (client.cpp:261)
> My guess is that the op_client tries to access the old options object from step 2/3. This is no longer valid as it has been freed when setting the new options (step 6).
> Or is svc_client not designed to send multiple messages with different options?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.