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 "Gupta, Shivam" <sh...@hp.com> on 2008/09/29 11:30:34 UTC

Memory fault in Axis2C

Hello,

   We are trying to run Axis on Unix platform. However, when we try to invoke the 'echo' webservice, the Axis server crashes giving a memory fault. In the mail below I have explained the findings I derived after debugging Axis2c:

1). I had built the libecho.so file using the following files : echo.c, echo.h and echo_skeleton.c

2). The Axis2 Log clearly states that the "libecho.so loaded successfully".

3). The processing of the request proceeds till the statement :

File: msg_recv.c

Function: axis2_msg_recv_make_new_svc_obj Code Lines:

if (impl_class)

{

AXIS2_SVC_SKELETON_INIT((axis2_svc_skeleton_t *) impl_class, env); } axutil_allocator_switch_to_local_pool(env->allocator);

4). the Code exits and the Axis server crashes. I have also made sure that the functions are built inside the libecho.so file. It is not an empty linkable.

Please help me out here. I am not able to figure out waht is going wrong here.

Regards,

Shivam.







Re: Memory fault in Axis2C

Posted by Damitha Kumarage <da...@gmail.com>.
Hi Shivam,
Are you running simple axis2c server or running axis2 apache module in 
Apache2?.  I am asking this because the code line
*axutil_allocator_switch_to_local_pool(env->allocator);
*
has meaning when only running as an Apache2 module. If you are running 
in Apache2 please run in simple axis2 server and tell us what happen. 
Also make sure to run your server with trace enabled (Build axis2/C with 
trace enabled and run server with option -l6) and send us the resulting 
server log file.

thanks,
Damitha

Gupta, Shivam wrote:
> Hello,
>  
>    We are trying to run Axis on Unix platform. However, when we try to 
> invoke the 'echo' webservice, the Axis server crashes giving a memory 
> fault. In the mail below I have explained the findings I derived after 
> debugging Axis2c:
>  
> 1). I had built the libecho.so file using the following files : 
> echo.c, echo.h and echo_skeleton.c
>  
> 2). The Axis2 Log clearly states that the "libecho.so loaded 
> successfully".
>  
> 3). The processing of the request proceeds till the statement :     
>
> File: /msg_recv.c/
>
> Function: /axis2_msg_recv_make_new_svc_obj Code Lines:/
>
> * if (impl_class) *
>
> * { *
>
> * AXIS2_SVC_SKELETON_INIT((axis2_svc_skeleton_t *) impl_class, env); } 
> axutil_allocator_switch_to_local_pool(env->allocator); *
>
> *4). *the Code exits and the Axis server crashes. I have also made 
> sure that the functions are built inside the libecho.so file. It is 
> not an empty linkable.
>
> Please help me out here. I am not able to figure out waht is going 
> wrong here.
>
> Regards,
>
> Shivam.
>
>  
>
>  
>
> * * 
>


-- 
__________________________________________________________________

Damitha Kumarage
http://people.apache.org/
__________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


Re: Memory fault in Axis2C

Posted by Supun Kamburugamuva <su...@gmail.com>.
What is the version of Axis2/C you are using?

Supun

On Mon, Sep 29, 2008 at 4:47 PM, Gupta, Shivam <sh...@hp.com> wrote:

> Hi,
>
>   I have built the samples using Eclipse IDE. I have attached the Makefile
> that was used by Eclipse to build the objects. As far as the trace is
> concerned, there is nothing stated in the log files. The last message
> recorded is that " libecho.so loaded successfully.".
>
>   Please help me here,
>
> Regards,
> Shivam.
>
> -----Original Message-----
> From: Manjula Peiris [mailto:manjula@wso2.com]
> Sent: Monday, September 29, 2008 4:37 PM
> To: Apache AXIS C Developers List
> Subject: RE: Memory fault in Axis2C
>
> Hi Shivam,
>
> Can you send the backtrace of the crash? Did you compile the samples of
> your own or are you using the same set of samples coming with the
> distribution ?
>
> Thanks,
> -Manjula
>
>
> On Mon, 2008-09-29 at 10:06 +0000, Gupta, Shivam wrote:
> > Hello,
> >
> >       I think I have already taken care of assigning the Skeleton init
> > function to the service_init function. The below code is an extract
> > from the echo_skeleton.c file:
> >
> > static const axis2_svc_skeleton_ops_t echo_svc_skeleton_ops_var = {
> >     echo_init,
> >     echo_invoke,
> >     echo_on_fault,
> >     echo_free
> > };
> >
> > axis2_svc_skeleton_t *
> > axis2_echo_create(
> >     const axutil_env_t * env)
> > {
> >     axis2_svc_skeleton_t *svc_skeleton = NULL;
> >     /* Allocate memory for the structs */
> >     svc_skeleton = AXIS2_MALLOC(env->allocator,
> > sizeof(axis2_svc_skeleton_t));
> >
> >     svc_skeleton->ops = &echo_svc_skeleton_ops_var;
> >
> >     svc_skeleton->func_array = NULL;
> >
> >     return svc_skeleton;
> > }
> >
> >  Moreover, I have not changed anything in the code. So I think there
> > is no possibility of me not setting some code parameter. There would
> > be some other issue.
> > I hope this helps you in guiding me.
> >
> > Thanks,
> > Shivam.
> >
> >
> >
> > ______________________________________________________________________
> > From: Supun Kamburugamuva [mailto:supun06@gmail.com]
> > Sent: Monday, September 29, 2008 3:15 PM
> > To: Apache AXIS C Developers List
> > Subject: Re: Memory fault in Axis2C
> >
> >
> >
> > Please check weather you have defined the init function of the service
> > and set it to the service skeleton.
> >
> > The method signature of this function is:
> >
> > int AXIS2_CALL echo_init(
> >     axis2_svc_skeleton_t * svc_skeleton,
> >     const axutil_env_t * env);
> >
> > Supun..
> >
> >
> > On Mon, Sep 29, 2008 at 2:30 PM, Gupta, Shivam <sh...@hp.com>
> > wrote:
> >         Hello,
> >
> >            We are trying to run Axis on Unix platform. However, when
> >         we try to invoke the 'echo' webservice, the Axis server
> >         crashes giving a memory fault. In the mail below I have
> >         explained the findings I derived after debugging Axis2c:
> >
> >         1). I had built the libecho.so file using the following
> >         files : echo.c, echo.h and echo_skeleton.c
> >
> >         2). The Axis2 Log clearly states that the "libecho.so loaded
> >         successfully".
> >
> >         3). The processing of the request proceeds till the
> >         statement :
> >         File: msg_recv.c
> >
> >         Function: axis2_msg_recv_make_new_svc_obj Code Lines:
> >
> >         if (impl_class)
> >
> >         {
> >
> >         AXIS2_SVC_SKELETON_INIT((axis2_svc_skeleton_t *) impl_class,
> >         env); } axutil_allocator_switch_to_local_pool(env->allocator);
> >
> >         4). the Code exits and the Axis server crashes. I have also
> >         made sure that the functions are built inside the libecho.so
> >         file. It is not an empty linkable.
> >
> >         Please help me out here. I am not able to figure out waht is
> >         going wrong here.
> >
> >         Regards,
> >
> >         Shivam.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > --
> > Software Engineer, WSO2 Inc
> > http://wso2.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>



-- 
Software Engineer, WSO2 Inc
http://wso2.org

RE: Memory fault in Axis2C

Posted by "Gupta, Shivam" <sh...@hp.com>.
Hi,

   I have built the samples using Eclipse IDE. I have attached the Makefile that was used by Eclipse to build the objects. As far as the trace is concerned, there is nothing stated in the log files. The last message recorded is that " libecho.so loaded successfully.".

   Please help me here,

Regards,
Shivam.

-----Original Message-----
From: Manjula Peiris [mailto:manjula@wso2.com]
Sent: Monday, September 29, 2008 4:37 PM
To: Apache AXIS C Developers List
Subject: RE: Memory fault in Axis2C

Hi Shivam,

Can you send the backtrace of the crash? Did you compile the samples of your own or are you using the same set of samples coming with the distribution ?

Thanks,
-Manjula


On Mon, 2008-09-29 at 10:06 +0000, Gupta, Shivam wrote:
> Hello,
>
>       I think I have already taken care of assigning the Skeleton init
> function to the service_init function. The below code is an extract
> from the echo_skeleton.c file:
>
> static const axis2_svc_skeleton_ops_t echo_svc_skeleton_ops_var = {
>     echo_init,
>     echo_invoke,
>     echo_on_fault,
>     echo_free
> };
>
> axis2_svc_skeleton_t *
> axis2_echo_create(
>     const axutil_env_t * env)
> {
>     axis2_svc_skeleton_t *svc_skeleton = NULL;
>     /* Allocate memory for the structs */
>     svc_skeleton = AXIS2_MALLOC(env->allocator,
> sizeof(axis2_svc_skeleton_t));
>
>     svc_skeleton->ops = &echo_svc_skeleton_ops_var;
>
>     svc_skeleton->func_array = NULL;
>
>     return svc_skeleton;
> }
>
>  Moreover, I have not changed anything in the code. So I think there
> is no possibility of me not setting some code parameter. There would
> be some other issue.
> I hope this helps you in guiding me.
>
> Thanks,
> Shivam.
>
>
>
> ______________________________________________________________________
> From: Supun Kamburugamuva [mailto:supun06@gmail.com]
> Sent: Monday, September 29, 2008 3:15 PM
> To: Apache AXIS C Developers List
> Subject: Re: Memory fault in Axis2C
>
>
>
> Please check weather you have defined the init function of the service
> and set it to the service skeleton.
>
> The method signature of this function is:
>
> int AXIS2_CALL echo_init(
>     axis2_svc_skeleton_t * svc_skeleton,
>     const axutil_env_t * env);
>
> Supun..
>
>
> On Mon, Sep 29, 2008 at 2:30 PM, Gupta, Shivam <sh...@hp.com>
> wrote:
>         Hello,
>
>            We are trying to run Axis on Unix platform. However, when
>         we try to invoke the 'echo' webservice, the Axis server
>         crashes giving a memory fault. In the mail below I have
>         explained the findings I derived after debugging Axis2c:
>
>         1). I had built the libecho.so file using the following
>         files : echo.c, echo.h and echo_skeleton.c
>
>         2). The Axis2 Log clearly states that the "libecho.so loaded
>         successfully".
>
>         3). The processing of the request proceeds till the
>         statement :
>         File: msg_recv.c
>
>         Function: axis2_msg_recv_make_new_svc_obj Code Lines:
>
>         if (impl_class)
>
>         {
>
>         AXIS2_SVC_SKELETON_INIT((axis2_svc_skeleton_t *) impl_class,
>         env); } axutil_allocator_switch_to_local_pool(env->allocator);
>
>         4). the Code exits and the Axis server crashes. I have also
>         made sure that the functions are built inside the libecho.so
>         file. It is not an empty linkable.
>
>         Please help me out here. I am not able to figure out waht is
>         going wrong here.
>
>         Regards,
>
>         Shivam.
>
>
>
>
>
>
>
>
>
>
>
> --
> Software Engineer, WSO2 Inc
> http://wso2.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


RE: Memory fault in Axis2C

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

Can you send the backtrace of the crash? Did you compile the samples of
your own or are you using the same set of samples coming with the
distribution ?

Thanks,
-Manjula 


On Mon, 2008-09-29 at 10:06 +0000, Gupta, Shivam wrote:
> Hello,
>  
>       I think I have already taken care of assigning the Skeleton init
> function to the service_init function. The below code is an extract
> from the echo_skeleton.c file:
>  
> static const axis2_svc_skeleton_ops_t echo_svc_skeleton_ops_var = {
>     echo_init,
>     echo_invoke,
>     echo_on_fault,
>     echo_free
> };
>  
> axis2_svc_skeleton_t *
> axis2_echo_create(
>     const axutil_env_t * env)
> {
>     axis2_svc_skeleton_t *svc_skeleton = NULL;
>     /* Allocate memory for the structs */
>     svc_skeleton = AXIS2_MALLOC(env->allocator,
> sizeof(axis2_svc_skeleton_t));
>  
>     svc_skeleton->ops = &echo_svc_skeleton_ops_var;
>  
>     svc_skeleton->func_array = NULL;
>  
>     return svc_skeleton;
> }
>  
>  Moreover, I have not changed anything in the code. So I think there
> is no possibility of me not setting some code parameter. There would
> be some other issue.
> I hope this helps you in guiding me.
>  
> Thanks,
> Shivam.
> 
> 
> 
> ______________________________________________________________________
> From: Supun Kamburugamuva [mailto:supun06@gmail.com] 
> Sent: Monday, September 29, 2008 3:15 PM
> To: Apache AXIS C Developers List
> Subject: Re: Memory fault in Axis2C
> 
> 
> 
> Please check weather you have defined the init function of the service
> and set it to the service skeleton.
> 
> The method signature of this function is:
> 
> int AXIS2_CALL echo_init(
>     axis2_svc_skeleton_t * svc_skeleton,
>     const axutil_env_t * env);
> 
> Supun..
> 
> 
> On Mon, Sep 29, 2008 at 2:30 PM, Gupta, Shivam <sh...@hp.com>
> wrote:
>         Hello,
>          
>            We are trying to run Axis on Unix platform. However, when
>         we try to invoke the 'echo' webservice, the Axis server
>         crashes giving a memory fault. In the mail below I have
>         explained the findings I derived after debugging Axis2c:
>          
>         1). I had built the libecho.so file using the following
>         files : echo.c, echo.h and echo_skeleton.c
>          
>         2). The Axis2 Log clearly states that the "libecho.so loaded
>         successfully".
>          
>         3). The processing of the request proceeds till the
>         statement :     
>         File: msg_recv.c
>         
>         Function: axis2_msg_recv_make_new_svc_obj Code Lines:
>         
>         if (impl_class)
>         
>         {
>         
>         AXIS2_SVC_SKELETON_INIT((axis2_svc_skeleton_t *) impl_class,
>         env); } axutil_allocator_switch_to_local_pool(env->allocator);
>         
>         4). the Code exits and the Axis server crashes. I have also
>         made sure that the functions are built inside the libecho.so
>         file. It is not an empty linkable.
>         
>         Please help me out here. I am not able to figure out waht is
>         going wrong here.
>         
>         Regards,
>         
>         Shivam.
>         
>          
>         
>          
>         
>          
>         
>         
> 
> 
> 
> -- 
> Software Engineer, WSO2 Inc
> http://wso2.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


RE: Memory fault in Axis2C

Posted by "Gupta, Shivam" <sh...@hp.com>.
Hello,

      I think I have already taken care of assigning the Skeleton init function to the service_init function. The below code is an extract from the echo_skeleton.c file:

static const axis2_svc_skeleton_ops_t echo_svc_skeleton_ops_var = {
    echo_init,
    echo_invoke,
    echo_on_fault,
    echo_free
};

axis2_svc_skeleton_t *
axis2_echo_create(
    const axutil_env_t * env)
{
    axis2_svc_skeleton_t *svc_skeleton = NULL;
    /* Allocate memory for the structs */
    svc_skeleton = AXIS2_MALLOC(env->allocator, sizeof(axis2_svc_skeleton_t));

    svc_skeleton->ops = &echo_svc_skeleton_ops_var;

    svc_skeleton->func_array = NULL;

    return svc_skeleton;
}

 Moreover, I have not changed anything in the code. So I think there is no possibility of me not setting some code parameter. There would be some other issue.
I hope this helps you in guiding me.

Thanks,
Shivam.

________________________________
From: Supun Kamburugamuva [mailto:supun06@gmail.com]
Sent: Monday, September 29, 2008 3:15 PM
To: Apache AXIS C Developers List
Subject: Re: Memory fault in Axis2C

Please check weather you have defined the init function of the service and set it to the service skeleton.

The method signature of this function is:

int AXIS2_CALL echo_init(
    axis2_svc_skeleton_t * svc_skeleton,
    const axutil_env_t * env);

Supun..


On Mon, Sep 29, 2008 at 2:30 PM, Gupta, Shivam <sh...@hp.com>> wrote:
Hello,

   We are trying to run Axis on Unix platform. However, when we try to invoke the 'echo' webservice, the Axis server crashes giving a memory fault. In the mail below I have explained the findings I derived after debugging Axis2c:

1). I had built the libecho.so file using the following files : echo.c, echo.h and echo_skeleton.c

2). The Axis2 Log clearly states that the "libecho.so loaded successfully".

3). The processing of the request proceeds till the statement :

File: msg_recv.c

Function: axis2_msg_recv_make_new_svc_obj Code Lines:

if (impl_class)

{

AXIS2_SVC_SKELETON_INIT((axis2_svc_skeleton_t *) impl_class, env); } axutil_allocator_switch_to_local_pool(env->allocator);

4). the Code exits and the Axis server crashes. I have also made sure that the functions are built inside the libecho.so file. It is not an empty linkable.

Please help me out here. I am not able to figure out waht is going wrong here.

Regards,

Shivam.









--
Software Engineer, WSO2 Inc
http://wso2.org

Re: Memory fault in Axis2C

Posted by Supun Kamburugamuva <su...@gmail.com>.
Please check weather you have defined the init function of the service and
set it to the service skeleton.

The method signature of this function is:

int AXIS2_CALL echo_init(
    axis2_svc_skeleton_t * svc_skeleton,
    const axutil_env_t * env);

Supun..


On Mon, Sep 29, 2008 at 2:30 PM, Gupta, Shivam <sh...@hp.com> wrote:

>  Hello,
>
>    We are trying to run Axis on Unix platform. However, when we try to
> invoke the 'echo' webservice, the Axis server crashes giving a memory fault.
> In the mail below I have explained the findings I derived after debugging
> Axis2c:
>
> 1). I had built the libecho.so file using the following files : echo.c,
> echo.h and echo_skeleton.c
>
> 2). The Axis2 Log clearly states that the "libecho.so loaded successfully".
>
> 3). The processing of the request proceeds till the statement :
>
> File: *msg_recv.c*
>
> Function: *axis2_msg_recv_make_new_svc_obj Code Lines:*
>
> *if (impl_class)*
>
> *{*
>
> *AXIS2_SVC_SKELETON_INIT((axis2_svc_skeleton_t *) impl_class, env); }
> axutil_allocator_switch_to_local_pool(env->allocator);*
>
> *4). *the Code exits and the Axis server crashes. I have also made sure
> that the functions are built inside the libecho.so file. It is not an empty
> linkable.
>
> Please help me out here. I am not able to figure out waht is going wrong
> here.
>
> Regards,
>
> Shivam.
>
>
>
>
>
> **
>



-- 
Software Engineer, WSO2 Inc
http://wso2.org