Uploaded image for project: 'Couchbase C client library libcouchbase'
  1. Couchbase C client library libcouchbase
  2. CCBC-117

Cannot compile libev plugin when switching from v3 to latest 4.11

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0beta2
    • Fix Version/s: 2.0.0
    • Component/s: library
    • Security Level: Public
    • Labels:
      None
    • Environment:
      CentOS 6.x, 64-bit

      Description

      I'm trying to track down the cause of some timeout errors that I am now getting under heavy load since the
      "network error" return issue has been resolved and I was able to abandon the use of lcb_wait(). I don't know
      if this is due to using an old libev OR these are some commands being lost in ringbuffer logic when I pound it
      with tons of lcb_get() calls within a loop (before control is returned to the event loop)

      So, easiest step it to try a new libev first before I come here crying :>

      When I try to compile the plugin with v4.11 (latest from Feb 2012) it will not compile
      unless I add the following

      #include <stdlib.h>
      #include <string.h>
      #include <unistd.h>
      #include <fcntl.h>
      #define INVALID_SOCKET -1

      into either the header file or the top of the code. And, yes, I did add -DHAVE_LIBEV4 to my gcc line

      warning: implicit declaration of function memset
      warning: implicit declaration of function fcntl
      error: INVALID_SOCKET undeclared (first use in this function)
      warning: implicit declaration of function free
      etc

      Looks like the old libev headers sucked in more includes than they do now.

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

        Activity

        Hide
        mleib Michael Leib added a comment -

        Looking into this further, libev has a config.h which is used by ev.c.

        You guys have a config.h as well, which (when loaded) pulls-up config_static.h which has all the goodies
        needed to compile the plugin.

        #include "config.h" at the top of "plugin-libev.c" maybe should be changed to include the full relative path?

        Show
        mleib Michael Leib added a comment - Looking into this further, libev has a config.h which is used by ev.c. You guys have a config.h as well, which (when loaded) pulls-up config_static.h which has all the goodies needed to compile the plugin. #include "config.h" at the top of "plugin-libev.c" maybe should be changed to include the full relative path?
        Hide
        mleib Michael Leib added a comment -

        btw, my problem still exists even with the latest libev....depending on load, I am getting "lost" events (ie lcb_get() never returns
        with a result until I get timeout error) even if I set the timeout to multiple minutes.

        I'm starting to lose faith.

        Show
        mleib Michael Leib added a comment - btw, my problem still exists even with the latest libev....depending on load, I am getting "lost" events (ie lcb_get() never returns with a result until I get timeout error) even if I set the timeout to multiple minutes. I'm starting to lose faith.
        Hide
        mleib Michael Leib added a comment -

        Just an fyi, I just installed the latest available build of the 2.0 server and rebuilt my apps with lcb beta3 and still get random timeout errors with use of lcb_get() even with the timeout set to minutes.

        Show
        mleib Michael Leib added a comment - Just an fyi, I just installed the latest available build of the 2.0 server and rebuilt my apps with lcb beta3 and still get random timeout errors with use of lcb_get() even with the timeout set to minutes.
        Hide
        mleib Michael Leib added a comment -

        I received the latest patch to the libev plugin code with the changes for timers. It appears my problem has been corrected as I am no longer receiving any timeouts.

        Thanks to whomever found and corrected this issue.

        I Think this CBC is still an issue, however, as it has to do with builds with libevent and not the timeout problem.

        Show
        mleib Michael Leib added a comment - I received the latest patch to the libev plugin code with the changes for timers. It appears my problem has been corrected as I am no longer receiving any timeouts. Thanks to whomever found and corrected this issue. I Think this CBC is still an issue, however, as it has to do with builds with libevent and not the timeout problem.
        Hide
        avsej Sergey Avseyev added a comment -

        Will check on recent master and will either fix and mark as resolved or just mark

        Show
        avsej Sergey Avseyev added a comment - Will check on recent master and will either fix and mark as resolved or just mark
        Hide
        avsej Sergey Avseyev added a comment -

        We've released 2.0.0 with libev plugins, therefore it works on our builders, including CentOS 6.2 64bit

        Show
        avsej Sergey Avseyev added a comment - We've released 2.0.0 with libev plugins, therefore it works on our builders, including CentOS 6.2 64bit

          People

          • Assignee:
            avsej Sergey Avseyev
            Reporter:
            mleib Michael Leib
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes