axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Damitha Kumarage (JIRA)" <>
Subject [jira] Commented: (AXIS2C-1079) sandesha2c dual channel samples are not working with apache2
Date Sun, 27 Apr 2008 00:18:55 GMT


Damitha Kumarage commented on AXIS2C-1079:

The problem for dual channel samples failiing in Sandesha2 with Apache2 module is explained
by Manjula as follows in a mail in Axis2/C dev mailing list

With HTTPD we are now creating the local pool (actually request pool)
with our own apr_allocator. See the following two function calls at the
beginning of the mod_axis2.c axis2_handler function.

apr_pool_create_ex(&local_pool, NULL, NULL, local_allocator);

The two NULL values passing are the parent pool and the callback
function inorder to handle pool creation failure.

At the end of this axis2_handle function we free both apr_pool and the
apr_allocator using the following two calls.


What makes sandesha to crash is the call to apr_allocator_destroy. But
that call is necessary when handling large size of requests frequently.
(specially quite large attachments).

Because sandesha starts threads and since these threads remains after
the request the crashing happens. The solution for this is we need to
keep a pointer to this apr_allocator_t * (here local_allocator) and a
ref count to keep the number of references. Inside Sandesha sender
thread we can increment the ref count. This destroy function calls only
if the ref count is zero. we can keep the ref_count and the pointer to
the apr_allocator inside axutil_allocator. Then checking for the ref
count and calls to destroy functions are wrapped in a macro called
Sandesha and mod_axis2 calls this macro instead of calling destroy
functions straightway as we are doing now.

> sandesha2c dual channel samples are not working with apache2 
> -------------------------------------------------------------
>                 Key: AXIS2C-1079
>                 URL:
>             Project: Axis2-C
>          Issue Type: Bug
>            Reporter: Damitha Kumarage
> It seems due to a change in apache2 or in the transport I found that sandesha2 dual channel
samples are not working when the server is deployed with the apache2. About two weeks back
when I last tested this it was working fine and after that there was no change to sandesha2/C
code. So I suspect the culprit is some code change in axis2/C. I could not figure out the
problem as there was no error debug message printed to the log.

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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message