ocserv-worker 100% CPU USAGE

Farzad Fallah farzad.fallah at gmail.com
Wed Aug 20 03:07:17 PDT 2014


Hi Devs,
On ocserv 0.8.2 from I am getting ocserv-worker processes which use
100% of CPU time.
Here is full debugging info for one of the processes which is using 100% CPU :

ID: 5634
        Username: XX  Groupname: (none)
        State: connected  Remote IP: XX
        IPv4: 10.10.4.167  P-t-P IPv4: 10.10.4.166
        Device: tun06  User-Agent: Cisco AnyConnect VPN Agent for
Apple iPad 3.0.0
        Connected at: 2014-08-20 11:49 ( 7m:11s)
        TLS ciphersuite: (TLS1.0)-(RSA)-(AES-128-CBC)-(SHA1)
        DTLS cipher: AES128-SHA

        DNS: 8.8.8.8
Routes: defaultroute

root at XX:/# gdb /usr/local/sbin/ocserv 5634
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/local/sbin/ocserv...done.
Attaching to program: /usr/local/sbin/ocserv, process 5634
Reading symbols from /usr/lib/libopts.so.25...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib/libopts.so.25
Reading symbols from
/usr/lib/x86_64-linux-gnu/libgnutls-deb0.so.28...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libgnutls-deb0.so.28
Reading symbols from /lib/x86_64-linux-gnu/libpam.so.0...(no debugging
symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libpam.so.0
Reading symbols from /lib/x86_64-linux-gnu/libutil.so.1...(no
debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libutil.so.1
Reading symbols from /lib/x86_64-linux-gnu/libcrypt.so.1...(no
debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libcrypt.so.1
Reading symbols from /lib/x86_64-linux-gnu/libc.so.6...(no debugging
symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libc.so.6
Reading symbols from /lib/x86_64-linux-gnu/libz.so.1...(no debugging
symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libz.so.1
Reading symbols from /usr/lib/x86_64-linux-gnu/libp11-kit.so.0...(no
debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libp11-kit.so.0
Reading symbols from /lib/x86_64-linux-gnu/librt.so.1...(no debugging
symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/librt.so.1
Reading symbols from /usr/lib/x86_64-linux-gnu/libtasn1.so.6...(no
debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libtasn1.so.6
Reading symbols from /usr/lib/x86_64-linux-gnu/libnettle.so.4...(no
debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libnettle.so.4
Reading symbols from /usr/lib/x86_64-linux-gnu/libhogweed.so.2...(no
debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libhogweed.so.2
Reading symbols from /usr/lib/x86_64-linux-gnu/libgmp.so.10...(no
debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libgmp.so.10
Reading symbols from /lib/x86_64-linux-gnu/libdl.so.2...(no debugging
symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libdl.so.2
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging
symbols found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /usr/lib/x86_64-linux-gnu/libffi.so.5...(no
debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libffi.so.5
Reading symbols from /lib/x86_64-linux-gnu/libpthread.so.0...(no
debugging symbols found)...done.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Loaded symbols for /lib/x86_64-linux-gnu/libpthread.so.0
Reading symbols from /lib/x86_64-linux-gnu/libnss_compat.so.2...(no
debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libnss_compat.so.2
Reading symbols from /lib/x86_64-linux-gnu/libnsl.so.1...(no debugging
symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libnsl.so.1
Reading symbols from /lib/x86_64-linux-gnu/libnss_nis.so.2...(no
debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libnss_nis.so.2
Reading symbols from /lib/x86_64-linux-gnu/libnss_files.so.2...(no
debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libnss_files.so.2
0x00007fa7ddb1ed8a in pselect () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt full
#0  0x00007fa7ddb1ed8a in pselect () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#1  0x000000000040a5a4 in connect_handler (ws=0x2629c60) at worker-vpn.c:1902
        req = 0x2629c78
        rfds = {fds_bits = {65840, 0 <repeats 15 times>}}
        max = 16
        p = <optimized out>
        tv = {tv_sec = 10, tv_nsec = 0}
        proto_overhead = 28
        ret = <optimized out>
        t = -382479640
        i = <optimized out>
        ip6 = <optimized out>
        emptyset = {__val = {0 <repeats 16 times>}}
        e = <optimized out>
        tls_pending = 0
        dtls_pending = 0
        tnow = {tv_sec = 1408529098, tv_nsec = 37290000}
        sl = 4
        blockset = {__val = {16384, 0 <repeats 15 times>}}
#2  vpn_server (ws=ws at entry=0x2629c60) at worker-vpn.c:824
        buf = "CONNECT /CSCOSSLC/tunnel HTTP/1.1\r\nHost:
XX\r\nUser-Agent: Cisco AnyConnect VPN Agent for Apple iPad
3.0.09440\r\nCookie:
webvpn=T+jme20om068mLbIO39FmJD+U/LwHgQnXKV6mSlLGf8W+ANKyNKY"...
        ret = <optimized out>
        nparsed = <optimized out>
        nrecvd = <optimized out>
        session = 0x263b9f0
        parser = {type = 0, flags = 0, state = 18, header_state = 0,
index = 0, nread = 0, content_length = 18446744073709551615,
http_major = 1, http_minor = 1, status_code = 0, method = 5,
http_errno = 0, upgrade = 1,
          data = 0x2629c60}
        settings = {on_message_begin = 0, on_url = 0x4083e0 <url_cb>,
on_status = 0, on_header_field = 0x408ba0 <header_field_cb>,
on_header_value = 0x408c20 <header_value_cb>, on_headers_complete =
0x408b80 <header_complete_cb>,
          on_body = 0x4084e0 <body_cb>, on_message_complete = 0x4082b0
<message_complete_cb>}
        requests_left = <optimized out>
#3  0x0000000000406d67 in main (argc=<optimized out>, argv=<optimized
out>) at main.c:1100
        fd = 8
        pid = 0
        e = <optimized out>
        ltmp = 0x26233f0
        ctmp = <optimized out>
        cpos = <optimized out>
        rd_set = {fds_bits = {16, 0 <repeats 15 times>}}
        wr_set = {fds_bits = {0 <repeats 16 times>}}
        n = 24
        ret = <optimized out>
        flags = <optimized out>
        ts = {tv_sec = 30, tv_nsec = 0}
        cmd_fd = {12, 16}
        ws = 0x2629c60
        worker_pool = <optimized out>
        main_pool = 0x260a0c0
        set = <optimized out>
        s = 0x260a1b0
        emptyset = {__val = {0 <repeats 16 times>}}
        blockset = {__val = {90115, 0 <repeats 15 times>}}
        creds = {xcred = 0x2623be0, cprio = 0x2628a10, dh_params = 0x0}

root at XX:/# strace -p 5634
pselect6(19, [4 7 8 18], NULL, NULL, {10, 0}, {[], 8}) = 1 (in [7],
left {9, 999998495})
recvfrom(5, 0x262e330, 18780, 0, 0, 0)  = -1 EBADF (Bad file descriptor)
pselect6(19, [4 7 8 18], NULL, NULL, {10, 0}, {[], 8}) = 1 (in [7],
left {9, 999998510})
recvfrom(5, 0x262e330, 18780, 0, 0, 0)  = -1 EBADF (Bad file descriptor)
pselect6(19, [4 7 8 18], NULL, NULL, {10, 0}, {[], 8}) = 1 (in [7],
left {9, 999998515})
recvfrom(5, 0x262e330, 18780, 0, 0, 0)  = -1 EBADF (Bad file descriptor)
pselect6(19, [4 7 8 18], NULL, NULL, {10, 0}, {[], 8}) = 1 (in [7],
left {9, 999998489})
recvfrom(5, 0x262e330, 18780, 0, 0, 0)  = -1 EBADF (Bad file descriptor)



More information about the openconnect-devel mailing list