stuck workers?

Nikos Mavrogiannopoulos n.mavrogiannopoulos at
Mon Jan 18 10:12:21 PST 2016

On Sun, 2016-01-17 at 17:30 +0800, Yick Xie wrote:
> Hi,
> I updated the ocserv to commit
> 3eb2b903ed8c9cd4e10304e319465e1e50424f97(worker: Prevent any frozen
> worker processes by killing them on inactivity), and found sometimes
> the ocserv worker still become inactive. #A For those "active"
> connections, there is no more effective requests(cannot ping 
> gateway),
> even though by tcpdump it's seen there was still some repeated
> communication between the server and the client, then after couples 
> of
> minutes the problem was gone and a reconnection was launched
> automatically.

Note that this patch will not stop the inactive clients from being
inactive. That could be because of half closed connection, a client
disappearing, kernel bug, ocserv bug etc. The fix will just make sure
that these clients/sessions get disconnected eventually.

>  #B For those already disconnections, the occtl cannot
> disconnect them as before said, once again several minutes later this
> worker was destoryed automatically. Please have a check with both.

That's the expected behavior of the patch. I have still not figured
what causes the blocking of a non-blocking socket.

> #B Disconnection worker gdb:
> gdb /usr/bin/ocserv 15964
> Loaded symbols for /lib/x86_64-linux-gnu/
> 0x00007fac5291d417 in __libc_writev (fd=0, vector=0x7ffff8899a90,
> count=1) at ../sysdeps/unix/sysv/linux/writev.c:49
> 49      ../sysdeps/unix/sysv/linux/writev.c: No such file or 
> directory.
> (gdb) bt full
> #0  0x00007fac5291d417 in __libc_writev (fd=0, vector=0x7ffff8899a90,
> count=1) at ../sysdeps/unix/sysv/linux/writev.c:49
>         resultvar = 12
>         result = <optimized out>

Will have to check that.


More information about the openconnect-devel mailing list