Hello all,
Since updating to the latest SVN revision of Axis2/C this morning my
application crashes on the call to stub_create()
Further tracing reveals that this function call eventually crashes while
parsing the Axis2.xml file. The only change in my Axis2.xml file is the
following line:
<!--<module ref="addressing"/>-->
Here are more details:
om_document.c:201
do
{
axiom_node_t *ret_val = NULL;
ret_val = axiom_document_build_next(document, env); [1]*****
first call works. Second pass causes crash.[2]
if (!ret_val)
{
if (axiom_node_is_complete(document->root_element, env)
==
AXIS2_TRUE)
{
/** document is completly build */
return document->root_element;
}
else
{
/** error occured */
return NULL;
}
}
}
while (!axiom_node_is_complete(document->root_element, env));
om_document:131
last_child = axiom_stax_builder_next(document->builder, env);
[2]****** first time in ok. Second time crashes [3]
om_stax_builder.c:804
token = axiom_xml_reader_next(om_builder->parser, env);
om_stax_builder.c:817
switch (token)
{
.... Snip
case AXIOM_XML_READER_COMMENT:
node = axiom_stax_builder_create_om_comment(om_builder,
env); [3]****** first ok, second crashes [4]
axiom_stax_builder_end_element(om_builder, env);
break;
om_stax_builder.c:602
comment_value = axiom_xml_reader_get_value(om_builder->parser, env);
****** I am guessing comment_value is a pointer to an element of
document?
...
om_stax_builder.c:645
#ifdef AXIS2_LIBXML2_ENABLED
axiom_xml_reader_xml_free(om_builder->parser,env,comment_value);
#else
AXIS2_FREE(env->allocator,comment_value); [4]******* crash
here on second pass.
#endif
I don't understand.. This behaviour is certainly not happening to most
users, and I have the latest SVN code with a *nearly* unmodified
Axis2.xml. Has anyone any ideas about this? I will try to enable
LibXML2 tomorrow. I had not gotten any code since version 1.3.0 back
when LibXML2 was still the default and have never tried running with
Guththila enabled.
If I can get the latest SVN code working I will see if it changes the
behaviour of asynchronous mode environment cleanup.
Bye and thanks for any help you may give.
Carl
-----Message d'origine-----
De : Manjula Peiris [mailto:[EMAIL PROTECTED]
Envoyé : lundi, octobre 27, 2008 11:05
À : Apache AXIS C User List
Objet : Re: RE : early env cleanup in asynchronous mode
What is the Axis2/C version you are using ? Can you ran the client
through a memory \
profiling tool like valgrind and sent us the traces?
On Mon, 2008-10-27 at 10:14 -0400, Lefrancois, Carl wrote:
> Thanks for your reply, Supun
>
> I am hesitant to raise a Jira right away for two reasons: my version
> of Axis2/C is a few months old and I believe this behaviour may be
> right, and it is me who is calling the wrong function. Are we sure
> there is a bug here?
>
> Has anyone on the list made a client which uses the same env for many
> web service calls in asynchronous mode? Maybe in this mode we need to
> create a new env for each call?
>
> If I cannot find a better function and no one replies saying this
> should work, then a Jira could be a good idea. I think this
> functionality is something Axis2/C should support.
>
>
> -Carl
>
>
> -----Message d'origine-----
> De : Supun Kamburugamuva [mailto:[EMAIL PROTECTED]
> Envoyé : samedi, octobre 25, 2008 00:37
> À : Apache AXIS C User List
> Objet : Re: early env cleanup in asynchronous mode
>
>
> Recently I got this error. But not sure what is happening exactly.
> Need to have a thorough look. Please create a Jira.
>
> Supun.
>
>
> On Sat, Oct 25, 2008 at 12:27 AM, Lefrancois, Carl
> <[EMAIL PROTECTED]> wrote:
>
> Hello all,
>
> No doubt my problem is due to user error, but I'm not sure what to try
> next to fix this problem.
>
> I am working to implement asynchronous mode client calls in a project
> which is already fairly mature and works well in blocking mode. When
> my DLL is loaded, I initialise the Axis2/C environment, and I free the
> environment on unload of the DLL. In between I can make many web
> service calls in blocking mode.
>
> What is happening now is that I used code from the echo_non_blocking.c
> sample to implement asynchronous mode but I get an access violation
> because the env is freed inside the function which calls my
> on_complete callback. After this function is completed my application
> still tries to use the same env.
>
> Can someone point out which function to call so I can make use of the
> asynchronous callbacks and still keep the same environment between
> calls?
>
>
>
>
> here is the code I am using:
> ======================================================================
> ==
> =============================
> /* Send request */
> svc_client = axis2_stub_get_svc_client (stub, axis2_env );
> AXIS2_LOG_INFO(axis2_env->log, "\n---appel d'axis2 send receive
> INITIÉ---\n"); ******* I see this in the log
> axis2_svc_client_send_receive_non_blocking(svc_client, axis2_env,
> payload, callback);
> AXIS2_LOG_INFO(axis2_env->log, "\n---appel d'axis2 send receive
> RETOURNÉ---\n");******* I see this in the log
>
> /** Wait till callback is complete. Simply keep the parent thread
> running
> until our on_complete or on_error is invoked */
> while (count < 15)
> {
> if (isComplete)
> {
> /* We are done with the callback */
> break;
> }
> AXIS2_LOG_INFO(axis2_env->log, "\n---AXIS DORT---\n");
> ******* I see this in the log
> AXIS2_SLEEP(1);
> AXIS2_LOG_INFO(axis2_env->log, "\n---AXIS SE RÉVEILLE---\n");
> ******* crash happens here after on_complete.. Axis2_env is freed!
> count++;
> }
>
> if (!(count < 15))
> {
> AXIS2_LOG_INFO(axis2_env->log, "\n---appel d'axis2 send receive
> COMPLÉTÉ TIMEOUT---\n"); **** never see this in log
> *lpiEtatTraitement = ETAT_TRAITEMENT_TIMEOUT;
> }
> else
> {
> AXIS2_LOG_INFO(axis2_env->log, "\n---appel d'axis2 send receive
> COMPLÉTÉ OK---\n"); **** never see this in log
> }
> ======================================================================
> ==
> =============================
>
>
> axis2_status_t AXIS2_CALL OnRatingStubOpComplete( struct
> axis2_callback * callback, const axutil_env_t * env)
> {
> AXIS2_LOG_INFO(axis2_env->log,
> "\n---OnRatingStubOpComplete()---\n"); ******* I see this
in
> the log
> isComplete = 1;
> return AXIS2_SUCCESS;
> }
>
> ======================================================================
> ==
> =============================
>
> ... In the trace execution goes into op_client.c here:
>
> if (args_list->callback)
> {
> axis2_callback_invoke_on_complete(args_list->callback, th_env,
> args_list->op_client->async_result); **** calls my on_complete
> function above
> axis2_callback_set_complete(args_list->callback, th_env,
> AXIS2_TRUE);
> }
>
> /* clean up memory */
> axis2_async_result_free(args_list->op_client->async_result,
> th_env);
>
> axis2_op_ctx_free(op_ctx, th_env);
>
> th_pool = th_env->thread_pool;
>
> AXIS2_FREE(th_env->allocator, args_list);
>
> if (th_env)
> {
> axutil_free_thread_env(th_env);
> th_env = NULL;
> }
> axutil_thread_pool_exit_thread(th_pool, thd);
> ***** this frees my env! as shown in my log
> return NULL;
> }
>
> ======================================================================
> ==
> =============================
>
>
>
>
> So can someone tell me, is axis2_svc_client_send_receive_non_blocking
> the wrong function to use if I want to make many service calls with
> one environment?
>
>
> Carl Lefrançois
_____
"Ce message est confidentiel, à l'usage exclusif du destinataire
ci-dessus et son contenu ne représente en aucun cas un engagement de la
part de AXA, sauf en cas de stipulation expresse et par écrit de la part
de AXA. Toute publication, utilisation ou diffusion, même partielle,
doit être autorisée préalablement. Si vous n'êtes pas destinataire de ce
message, merci d'en avertir immédiatement l'expéditeur."
"This e-mail message is confidential, for the exclusive use of the
addressee and its contents shall not constitute a commitment by AXA,
except as otherwise specifically provided in writing by AXA. Any
unauthorized disclosure, use or dissemination, either whole or partial,
is prohibited. If you are not the intended recipient of the message,
please notify the sender immediately."
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]