Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-3023

moxi hang in authentication during kill -STOP of downstream

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • None
    • moxi
    • Security Level: Public
    • None
    • CentOS 5.2 x64

    Description

      During a test, the downstream server was stopped with a kill -STOP. moxi's downstream connections hung. The expected behavior would have been to see some kind of SERVER_ERROR after a timeout.

      1. pgrep -lf moxi
        7611 ./bin/moxi/moxi -Z port_listen=11211,default_bucket_name=default,downstream_max=1024,downstream_conn_max=16,connect_max_errors=3,connect_retry_interval=30000,connect_timeout=400,auth_timeout=100,cycle=200,downstream_conn_queue_timeout=200,downstream_timeout=5000,wait_queue_timeout=200 -z url=http://127.0.0.1:8091/pools/default/saslBucketsStreaming -p 0 -Y y -O stderr
        ]# gdb -p 7611 moxi/moxi
        GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-23.el5_5.2)
        Copyright (C) 2009 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-redhat-linux-gnu".
        For bug reporting instructions, please see:
        <http://www.gnu.org/software/gdb/bugs/>...
        Reading symbols from /opt/membase/1.6.4r/bin/moxi/moxi...done.
        Attaching to program: /opt/membase/1.6.4r/bin/moxi/moxi, process 7611
        Reading symbols from /lib64/libnsl.so.1...(no debugging symbols found)...done.
        Loaded symbols for /lib64/libnsl.so.1
        Reading symbols from /lib64/libresolv.so.2...(no debugging symbols found)...done.
        Loaded symbols for /lib64/libresolv.so.2
        Reading symbols from /usr/lib64/libidn.so.11...(no debugging symbols found)...done.
        Loaded symbols for /usr/lib64/libidn.so.11
        Reading symbols from /usr/lib64/libz.so.1...(no debugging symbols found)...done.
        Loaded symbols for /usr/lib64/libz.so.1
        Reading symbols from /usr/lib64/libsasl2.so.2...(no debugging symbols found)...done.
        Loaded symbols for /usr/lib64/libsasl2.so.2
        Reading symbols from /lib64/librt.so.1...(no debugging symbols found)...done.
        Loaded symbols for /lib64/librt.so.1
        Reading symbols from /lib64/libm.so.6...(no debugging symbols found)...done.
        Loaded symbols for /lib64/libm.so.6
        Reading symbols from /lib64/libpthread.so.0...(no debugging symbols found)...done.
        [Thread debugging using libthread_db enabled]
        [New Thread 0x44839940 (LWP 7626)]
        [New Thread 0x43e38940 (LWP 7619)]
        [New Thread 0x43437940 (LWP 7617)]
        [New Thread 0x42a36940 (LWP 7616)]
        [New Thread 0x42035940 (LWP 7615)]
        [New Thread 0x41634940 (LWP 7614)]
        [New Thread 0x40c33940 (LWP 7613)]
        Loaded symbols for /lib64/libpthread.so.0
        Reading symbols from /lib64/libc.so.6...(no debugging symbols found)...done.
        Loaded symbols for /lib64/libc.so.6
        Reading symbols from /lib64/libdl.so.2...(no debugging symbols found)...done.
        Loaded symbols for /lib64/libdl.so.2
        Reading symbols from /lib64/libcrypt.so.1...(no debugging symbols found)...done.
        Loaded symbols for /lib64/libcrypt.so.1
        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
        0x000000310f2d4018 in epoll_wait () from /lib64/libc.so.6
        (gdb) thr a a bt

      Thread 8 (Thread 0x40c33940 (LWP 7613)):
      #0 0x000000310f2d4018 in epoll_wait () from /lib64/libc.so.6
      #1 0x000000000043f380 in epoll_dispatch (base=0x176a450, arg=0x176aa80,
      tv=<value optimized out>) at epoll.c:198
      #2 0x000000000043d8b1 in event_base_loop (base=0x176a450, flags=0)
      at event.c:516
      #3 0x00000000004138d5 in worker_libevent (arg=<value optimized out>)
      at thread.c:272
      #4 0x000000310fe064a7 in start_thread () from /lib64/libpthread.so.0
      #5 0x000000310f2d3c2d in clone () from /lib64/libc.so.6

      Thread 7 (Thread 0x41634940 (LWP 7614)):
      #0 0x000000310f2cced2 in select () from /lib64/libc.so.6
      #1 0x000000000042cf52 in mcs_io_read (fd=44, dta=0x41633e90, size=24,
      timeout=0x0) at mcs.c:593
      #2 0x0000000000416530 in cproxy_auth_downstream (
      server=<value optimized out>, behavior=0x18274e0, fd=44) at cproxy.c:2660
      #3 0x000000000041a413 in downstream_connect_init (d=0x17c5a20,
      msst=0x17fac38, behavior=0x18274e0, c=0x2aaaac005720) at cproxy.c:1489
      #4 0x000000000041b500 in cproxy_on_connect_downstream_conn (c=0x2aaaac005720)
      at cproxy.c:2931
      #5 0x000000000040c3cb in drive_machine (c=0x2aaaac005720) at memcached.c:3418
      #6 0x000000000043d97a in event_process_active (base=0x176eec0, flags=0)
      at event.c:385
      #7 event_base_loop (base=0x176eec0, flags=0) at event.c:525
      #8 0x00000000004138d5 in worker_libevent (arg=<value optimized out>)
      at thread.c:272
      #9 0x000000310fe064a7 in start_thread () from /lib64/libpthread.so.0
      #10 0x000000310f2d3c2d in clone () from /lib64/libc.so.6

      Thread 6 (Thread 0x42035940 (LWP 7615)):
      #0 0x000000310f2cced2 in select () from /lib64/libc.so.6
      #1 0x000000000042cf52 in mcs_io_read (fd=56, dta=0x42034e90, size=24,
      timeout=0x0) at mcs.c:593
      #2 0x0000000000416530 in cproxy_auth_downstream (
      server=<value optimized out>, behavior=0x2aaab8062a80, fd=56)
      at cproxy.c:2660
      #3 0x000000000041a413 in downstream_connect_init (d=0x2aaab8000b10,
      msst=0x2aaab8007578, behavior=0x2aaab8062a80, c=0x17b2940) at cproxy.c:1489
      #4 0x000000000041b500 in cproxy_on_connect_downstream_conn (c=0x17b2940)
      at cproxy.c:2931
      #5 0x000000000040c3cb in drive_machine (c=0x17b2940) at memcached.c:3418
      #6 0x000000000043d97a in event_process_active (base=0x1773930, flags=0)
      at event.c:385
      #7 event_base_loop (base=0x1773930, flags=0) at event.c:525
      #8 0x00000000004138d5 in worker_libevent (arg=<value optimized out>)
      at thread.c:272
      #9 0x000000310fe064a7 in start_thread () from /lib64/libpthread.so.0
      #10 0x000000310f2d3c2d in clone () from /lib64/libc.so.6

      Thread 5 (Thread 0x42a36940 (LWP 7616)):
      #0 0x000000310f2d4018 in epoll_wait () from /lib64/libc.so.6
      #1 0x000000000043f380 in epoll_dispatch (base=0x17783a0, arg=0x17789d0,
      tv=<value optimized out>) at epoll.c:198
      #2 0x000000000043d8b1 in event_base_loop (base=0x17783a0, flags=0)
      at event.c:516
      #3 0x00000000004138d5 in worker_libevent (arg=<value optimized out>)
      at thread.c:272
      #4 0x000000310fe064a7 in start_thread () from /lib64/libpthread.so.0
      #5 0x000000310f2d3c2d in clone () from /lib64/libc.so.6

      Thread 4 (Thread 0x43437940 (LWP 7617)):
      #0 0x000000310fe0ab99 in pthread_cond_wait@@GLIBC_2.3.2 ()
      from /lib64/libpthread.so.0
      #1 0x0000000000412b40 in assoc_maintenance_thread (arg=<value optimized out>)
      at assoc.c:220
      #2 0x000000310fe064a7 in start_thread () from /lib64/libpthread.so.0
      #3 0x000000310f2d3c2d in clone () from /lib64/libc.so.6

      Thread 3 (Thread 0x43e38940 (LWP 7619)):
      #0 0x000000310f2cae46 in poll () from /lib64/libc.so.6
      #1 0x0000000000446bb6 in Curl_socket_ready ()
      #2 0x0000000000000000 in ?? ()

      Thread 2 (Thread 0x44839940 (LWP 7626)):
      #0 0x000000310f2c5f3b in read () from /lib64/libc.so.6
      #1 0x000000310f26cc07 in _IO_new_file_underflow () from /lib64/libc.so.6
      #2 0x000000310f26d5ce in _IO_default_uflow_internal () from /lib64/libc.so.6
      #3 0x000000310f268e8b in getc () from /lib64/libc.so.6
      #4 0x000000000042e00f in check_stdin_thread (arg=<value optimized out>)
      at stdin_check.c:16
      #5 0x000000310fe064a7 in start_thread () from /lib64/libpthread.so.0
      #6 0x000000310f2d3c2d in clone () from /lib64/libc.so.6

      Thread 1 (Thread 0x2b97de8d3fa0 (LWP 7611)):
      #0 0x000000310f2d4018 in epoll_wait () from /lib64/libc.so.6
      #1 0x000000000043f380 in epoll_dispatch (base=0x17571c0, arg=0x17577f0,
      tv=<value optimized out>) at epoll.c:198
      #2 0x000000000043d8b1 in event_base_loop (base=0x17571c0, flags=0)
      at event.c:516
      #3 0x0000000000408f5b in main (argc=12, argv=0x7fffcbe30448)
      at memcached.c:4966
      (gdb)

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            steve Steve Yen
            ingenthr Matt Ingenthron
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty