axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "S.Uthaiyashankar (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AXIS2C-995) mod_axis2 fails to call svc_skeleton_free
Date Wed, 07 Apr 2010 04:26:33 GMT

    [ https://issues.apache.org/jira/browse/AXIS2C-995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12854333#action_12854333
] 

S.Uthaiyashankar commented on AXIS2C-995:
-----------------------------------------

Methods registered with apr_pool_cleanup_register will be called when the pool is going to
be freed, but AFTER all the SUB POOLS are destroyed. env is still keeping the reference to
the sub pools created in the init method. That is the reason for the crash.

We have to register a method which will be called BEFORE sub pools are destroyed. apr_pool_pre_cleanup_register
is the correct method we should use. 

Please see http://apr.apache.org/docs/apr/1.3/group___pool_cleanup.html for more details.


> mod_axis2 fails to call svc_skeleton_free
> -----------------------------------------
>
>                 Key: AXIS2C-995
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-995
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: core/transport
>    Affects Versions: 1.2.0
>         Environment: solaris 10 x86, apache 2.2.4
>            Reporter: Ben Wyckoff
>            Assignee: S.Uthaiyashankar
>             Fix For: 1.7.0
>
>         Attachments: mod_axis2_shut_down.patch
>
>
> mod_axis2 calls AXIS2_SVC_SKELETON_INIT but never calls AXIS2_SVC_SKELETON_FREE (or the
equivalent), which leaves resources allocated at init time dangling. The axis2_hhtp_server
does properly call free, allowing the service to properly clean up after itself.
> This issue was submitted to the axis2-c users list, and Dumindu Pallewela replied with
the following patch.
> Index: mod_axis2.c
> ===================================================================
> --- mod_axis2.c	(revision 629362)
> +++ mod_axis2.c	(working copy)
> @@ -425,6 +425,19 @@
>  #endif
>  }
>  
> +typedef struct worker_cleanup_data
> +{
> +    const axutil_env_t * env;
> +    axis2_apache2_worker_t * worker;
> +} worker_cleanup_data_t;
> +
> +static apr_status_t worker_cleanup(void *data)
> +{
> +    worker_cleanup_data_t *d = (worker_cleanup_data_t *) data;
> +    axis2_apache2_worker_free(d->worker, d->env);
> +    return APR_SUCCESS;
> +}
> +
>  static int axis2_post_config(apr_pool_t *pconf, apr_pool_t *plog,
>  								 apr_pool_t *ptemp, server_rec *svr_rec)
>  {
> @@ -592,6 +605,14 @@
>                       "[Axis2] Error creating mod_axis2 apache2 worker");
>          exit(APEXIT_CHILDFATAL);
>      }
> +    else
> +    {
> +        worker_cleanup_data_t *data = apr_palloc(pconf, sizeof(worker_cleanup_data_t));
> +        data->env = axutil_env;
> +        data->worker = axis2_worker;
> +        apr_pool_cleanup_register(pconf, data, worker_cleanup, apr_pool_cleanup_null);
> +    }
> +
>  	return OK;
>  }
>  

-- 
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: c-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: c-dev-help@axis.apache.org


Mime
View raw message