Hi,

On Fri, Nov 21, 2014 at 05:07:57PM +0100, Eike Lohmann wrote:
> Hi, today we got the same error, after a "kill client" via the management 
> interface.
> 
> Nov 21 15:43:08 myserver ovpn[1945]: MANAGEMENT: CMD 'kill clientXXXX'
> Nov 21 15:43:08 myserver ovpn[1945]: clientXXXX/1.2.3.4:3271 SIGTERM[soft,] 
> received, client-instance exiting
> Nov 21 15:43:08 myserver ovpn[1945]: PLUGIN_CALL: POST 
> /usr/lib/openvpn/radiusplugin.so/PLUGIN_CLIENT_DISCONNECT status=0
> Nov 21 15:43:08 myserver ovpn[1945]: MANAGEMENT: Client disconnected
> Nov 21 15:43:08 myserver ovpn[1945]: Assertion failed at multi.h:409

This definitely looks like a race condition of some sort - the ASSERT
you see is here:

static inline bool
multi_process_outgoing_tun (struct multi_context *m, const unsigned int 
mpp_flags)
{
  struct multi_instance *mi = m->pending;
  bool ret = true;

  ASSERT (mi);
...
  set_prefix (mi);
  process_outgoing_tun (&mi->context);
  ret = multi_process_post (m, mi, mpp_flags);
  clear_prefix ();
  return ret;
}

... which I interpret as "the client is gone, mi has been cleared, but
some other bit of OpenVPN still decided to send a packet there".

Is this (sort of) reproduceable, or was this a "once in a lifetime"
crash?  This is definitely a bug, but fixing this by just staring at
the code won't be easy.

(I don't think that using 2.3.x or git master will make a significant
difference here - this is "scheduling / client disconnect cleanup" code
which we didn't touch.)


As a quick fix, changing the code in multi.h to do 

  if ( !mi )
    {
       msg( M_INFO, "multi_process_outgoing_tun: ERROR: mi=NULL" );
       return false;
    }

instead of "ASSERT(mi)" would turn the crash into an error message - but
I'd prefer to really understand how to trigger this, and see if the fix
has side effects.

gert

-- 
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             g...@greenie.muc.de
fax: +49-89-35655025                        g...@net.informatik.tu-muenchen.de

Attachment: pgpx0a_KssUvf.pgp
Description: PGP signature

------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
Openvpn-users mailing list
Openvpn-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-users

Reply via email to