[Vortex] How to correctly close a connection?

Robert M. Münch robert.muench at robertmuench.de
Fri Oct 17 14:03:18 CEST 2008

Am 17.10.2008, 09:52 Uhr, schrieb Francis Brosnan Blazquez  
<francis at aspl.es>:

> Do the foreach inside the on close function to get the list of stored
> pointers. Then, match that list with the pointer wrongly accessed.

Hi, after hacking the code to get it compiled I now get this output:

ey stored sasl:authid -> 0x88ce050
Key stored gsasl:data -> 0x88c1998
Key stored sasl:method:used -> 0x4614860
Key stored sasl:password -> 0x4606d5c
Key stored sasl:profile:being-negociated -> 0x88c3260
Key stored _vo:li:master -> 0x4574e58

And Valgrind output:

==3965== Thread 2:
==3965== Invalid free() / delete / delete[]
==3965==    at 0x401D43C: free (vg_replace_malloc.c:323)
==3965==    by 0x45F5DFC: axl_hash_free (axl_hash.c:1216)
==3965==    by 0x45D12C7: vortex_hash_destroy (vortex_hash.c:357)
==3965==    by 0x45BA7C0: vortex_connection_free (vortex_connection.c:2494)
==3965==    by 0x45CF730: __vortex_reader_build_set_to_watch_aux  
==3965==    by 0x45D09DC: __vortex_reader_run (vortex_reader.c:1228)
==3965==    by 0x462723F: start_thread (in  
==3965==    by 0x411A49D: clone (in /lib/tls/i686/cmov/libc-2.3.6.so)
==3965==  Address 0x4606d5c is not stack'd, malloc'd or (recently) free'd

So, it's the "sasl:password" key.

Looking at my log with vortex debug messages I can see stuff like:

start message received: channel='3'  
profile='http://iana.org/beep/SASL/DIGEST-MD5' serverName=''  
profile_content='' encoding='none'
Received channel start for mech: http://iana.org/beep/SASL/DIGEST-MD5,  
setting default auth validation handler for the listener
begin initial server step
getting error code (0): Libgsasl success
starting sasl server iteration
received notification to validate an incoming SASL request for=DIGEST-MD5  
over connection id=2
received request to return current REALM configured
no realm configured, returning no realm found
getting error code (1): SASL mechanism needs more data

This seems to indicate that something with SASL MD5 went wrong and the  
connection is still established.

Could it be, that the receiver vortex side now stores some keys and data,  
even an error happend? And when closing the connection tries to fee these?

Robert M. Münch
Management and IT freelancer

More information about the Vortex mailing list