- Regarding NTLM server, I've been using a Windows Server here at work, I couldn't find a public test server yet... Does someone know any public ntlm webservers? Damitha?
- Regarding the segfault it is not somethig specific to ntlm... Actually I've found the bug by mistake, because I forgot to execute an ldconfig command after compiling libntlm and Axis couldn't find the library on runtime, which caused it to segfault...
The bug seems to be that, under certain error conditions axis tries to release dep_engine twice... As I explained earlier, conf has a reference to dep_engine and vice versa, and dep engine tries to be released twice...
To reproduce the segfault
- Build the samples.
- go to $AXIS2C_HOME/lib and move/delete one of the libraries (i.e. libaxis2_http_sender.so.0.7.0)
- Run the sample (i.e. echo) It will segfault.
This segfault could be avoided easily just by commenting conf.c lines 352 to line 355... In that case rebuild axis, remove the library again, and the server will show an error message (which it is expected because there is a library missing) but it won't segfault.
This segfault concerns me a bit because it can emerge on other error conditions...
Shall I create an issue and attach a patch for this?
First I don't have any experience with NTLM. I followed Damitha's instructions from his email, Readme and blog.Compiled svn head with --enable-libntlm and then replaced /trunk/src/core/transport/http/sender/ntlm/libntlm/libntlm_wrapper.c with http://damithakumarage.files.wordpress.com/2011/06/libntlm_wrapper-c.doc and compiled again and installed.Then from samples/client/ntlm directory, ntlm-post didn't crash for me but it failed. Looks like endpoint is not active anymore.$./ntlm_postUsing endpoint : http://172.16.176.132:80/myservice/Service1.asmxSending OM : <ns1:HelloWorld xmlns:ns1="http://tempuri.org">Hello World!</ns1:HelloWorld>ntlm client invoke FAILED!
If you know any active endpoints I could try them.thanks,Dinesh.On Tue, Oct 23, 2012 at 11:56 PM, Dinesh Weerapurage <firstname.lastname@example.org> wrote:
Based on Damitha's email , libntlm_wrapper is not in Axis2/C source tree (because of licensing issue). However this post  provides a download link for libntlm_wrapper. Please let us know how it goes.thanks,Dinesh.2. http://damithakumarage.wordpress.com/2011/06/02/ntlm-auth-support-for-axis2c/
On Tue, Oct 23, 2012 at 12:02 PM, Alex Mantaut <email@example.com> wrote:
I'm starting to test ntlm functionality in RC7 and I've found some bugs...
I'm trying to execute the ntlm_post sample to test ntlm functionality and it seg faults...
This is the output
debug] phase.c(121) axis2_handler_t *request_uri_based_dispatcher added to the index 0 of the phase Transport
[debug] phase.c(121) axis2_handler_t *addressing_based_dispatcher added to the index 1 of the phase Transport
[debug] phase.c(121) axis2_handler_t *rest_dispatcher added to the index 0 of the phase Dispatch
[debug] phase.c(121) axis2_handler_t *soap_message_body_based_dispatcher added to the index 1 of the phase Dispatch
[debug] phase.c(121) axis2_handler_t *soap_action_based_dispatcher added to the index 2 of the phase Dispatch
[debug] phase.c(121) axis2_handler_t *dispatch_post_conditions_evaluator added to the index 0 of the phase PostDispatch
[debug] phase.c(121) axis2_handler_t *context_handler added to the index 1 of the phase PostDispatch
[debug] conf_builder.c(227) No custom dispatching order found. Continue with the default dispatching order
[debug] conf_builder.c(351) Module addressing found in axis2.xml
[error] class_loader.c(152) Loading shared library /usr/local/axis2c/lib/libaxis2_http_sender.so Failed. DLERROR IS libaxis2_ntlm.so.0: cannot open shared object file: No such file or directory
[error] conf_builder.c(848) Transport sender is NULL for transport http, unable to continue
[error] conf_builder.c(250) Processing transport senders failed, unable to continue
[error] dep_engine.c(929) Populating Axis2 Configuration failed
[error] conf_init.c(225) Loading deployment engine failed for client repository /usr/local/axis2c
Upon closer examination there seem to be 2 errors. Somehow it doesn't find the libntlm module, and while freeing the resources it segfaults...
I'm still working on the first one. But I think I've found a solution for the second...
It seems the the conf_free method has a reference to dep_engine, and dep_engine has a reference to conf... When someone releases conf in case of error it frees the dep_engine,
but the dep_engine is also freed elswere causing segfault...
I think that dep_engine should be in charge of releasing conf, and not the other way around... Can someone please confirm this? In that case the patch would be very simple: just delete conf.c fom line 352 to line 355... I've tried it and it stops the segfault and in all the samples it doesn't increase the memory leak...
+54 (11) 6040-4000 begin_of_the_skype_highlighting FREE +54 (11) 6040-4000end_of_the_skype_highlighting