Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.0-dp2
    • Fix Version/s: None
    • Component/s: library
    • Security Level: Public
    • Labels:
    • Environment:
      Couchbase Server 2.0 (You are running version 2.0.0 community edition (build-722)) - latest DP release
      php-ext-couchbase 1.1.0-dp2
      libcouchbase 1.1.0dp6-85 throgh deb repo

      Running Ubuntu 12.04

      Description

      Problem Description:
      --------------------
      The given PHP script was expected to run perfectly fine, instead segfaults.

      Version in Use:
      ---------------
      Couchbase Server 2.0 (You are running version 2.0.0 community edition (build-722)) - latest DP release
      php-ext-couchbase 1.1.0-dp2
      libcouchbase 1.1.0dp6-85 throgh deb repo

      The View:
      ---------
      function (doc) {
      if(doc.type == 'session')

      { emit(doc._id, null); }

      }

      Calling PHP Script:
      -------------------
      <?php
      $cb = new Couchbase('127.0.0.1:8091', 'default');
      $cb->view('dev_sessions', 'active');
      ?>

      Error Message:
      --------------
      php: contrib/http_parser/http_parser.c:422: parse_url_char: Assertion `!((*__ctype_b_loc ())[(int) ((ch))] & (unsigned short int) _ISspace)' failed.
      Aborted (core dumped)

      GDB Backtrace:
      --------------

      #0 0xb7fdd424 in __kernel_vsyscall ()
      #1 0xb78041ef in __GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
      #2 0xb7807835 in __GI_abort () at abort.c:91
      #3 0xb77fd095 in __assert_fail_base (fmt=0xb79368b8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
      assertion=0xb7042710 "!((*__ctype_b_loc ())[(int) ((ch))] & (unsigned short int) _ISspace)",
      file=0xb70426ec "contrib/http_parser/http_parser.c", line=422, function=0xb7042f60 "parse_url_char") at assert.c:94
      #4 0xb77fd147 in _GI_assert_fail (assertion=0xb7042710 "!((*_ctype_b_loc ())[(int) ((ch))] & (unsigned short int) _ISspace)",
      file=0xb70426ec "contrib/http_parser/http_parser.c", line=422, function=0xb7042f60 "parse_url_char") at assert.c:103
      #5 0xb703e97f in ?? () from /usr/lib/libcouchbase.so.1
      #6 0xb7041015 in ?? () from /usr/lib/libcouchbase.so.1
      #7 0xb70337da in libcouchbase_make_couch_request () from /usr/lib/libcouchbase.so.1
      #8 0xb73bcb45 in php_couchbase_view_impl (ht=<optimized out>, return_value=0xb779563c, this_ptr=0xb7798e70, oo=1,
      return_value_ptr=<optimized out>, return_value_used=<optimized out>)
      at /home/michael/Downloads/php-ext-couchbase/couchbase.c:2563
      #9 0x083d2a85 in execute_internal (execute_data_ptr=0xb741c883, return_value_used=-1216896628)
      at /build/buildd/php5-5.4.4/Zend/zend_execute.c:1480
      #10 0xb741c883 in xdebug_execute_internal (current_execute_data=0xb777a18c, return_value_used=1)
      at /build/buildd/xdebug-2.2.0/build-php5/xdebug.c:1482
      #11 0x083d1898 in zend_do_fcall_common_helper_SPEC (execute_data=0xb777a18c) at /build/buildd/php5-5.4.4/Zend/zend_vm_execute.h:644
      #12 0x0838d605 in execute (op_array=0xb741c491) at /build/buildd/php5-5.4.4/Zend/zend_vm_execute.h:410
      #13 0xb741c491 in xdebug_execute (op_array=0xb77991fc) at /build/buildd/xdebug-2.2.0/build-php5/xdebug.c:1390
      #14 0x083d1be2 in zend_do_fcall_common_helper_SPEC (execute_data=0xb777a030) at /build/buildd/php5-5.4.4/Zend/zend_vm_execute.h:669
      #15 0x0838d605 in execute (op_array=0xb741c491) at /build/buildd/php5-5.4.4/Zend/zend_vm_execute.h:410
      #16 0xb741c491 in xdebug_execute (op_array=0xb7794adc) at /build/buildd/xdebug-2.2.0/build-php5/xdebug.c:1390
      #17 0x083244b9 in zend_execute_scripts (type=0, retval=0xbfffe124, file_count=0) at /build/buildd/php5-5.4.4/Zend/zend.c:1279
      #18 0x082bda3e in php_execute_script (primary_file=0xbfffe124) at /build/buildd/php5-5.4.4/main/main.c:2473
      #19 0x083d4593 in do_cli (argc=0, argv=0xbffff4c5) at /build/buildd/php5-5.4.4/sapi/cli/php_cli.c:988
      #20 0x0806aefe in main (argc=2, argv=0xbffff344) at /build/buildd/php5-5.4.4/sapi/cli/php_cli.c:1361

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

        Activity

        Hide
        ingenthr Matt Ingenthron added a comment -

        Laruence: Can you have a quick look at this? Is this something simple?

        Show
        ingenthr Matt Ingenthron added a comment - Laruence: Can you have a quick look at this? Is this something simple?
        Hide
        ingenthr Matt Ingenthron added a comment -

        Another note from a user:
        i'm gonna guess that's what's really happening is a buffer overrun somewhere else which then clobbers' http_parser's internal state
        because i've been using http_parser for a long time and i've never seen it crap like that

        Show
        ingenthr Matt Ingenthron added a comment - Another note from a user: i'm gonna guess that's what's really happening is a buffer overrun somewhere else which then clobbers' http_parser's internal state because i've been using http_parser for a long time and i've never seen it crap like that
        Hide
        daschl Michael Nitschinger added a comment -

        I think this can be closed, it works with a recent build of php-ext-couchbase with the latest libcouchbase (also, this ticket was opened against the unstable branch and it will be fixed for the final relase).

        Show
        daschl Michael Nitschinger added a comment - I think this can be closed, it works with a recent build of php-ext-couchbase with the latest libcouchbase (also, this ticket was opened against the unstable branch and it will be fixed for the final relase).
        Hide
        avsej Sergey Avseyev added a comment -

        Looks like it still relevant

        <jgillmanjr> Greetings. I'm not sure if this would be the place to get further information, but when trying to make a view call using the PHP client, I get this as an error: php: contrib/http_parser/http_parser.c:422: parse_url_char: Assertion `!((*__ctype_b_loc ())[(int) ((ch))] & (unsigned short int) _ISspace)' failed.
        <jgillmanjr> Googling only shows a bug thread that indicates this has been resolved. I'm running the 2.0.4 version of the library and just recompiled the latest source version of the php client

        "php -i" output (http://dpaste.org/WGcNG/raw/)
        couchbase

        couchbase support => enabled
        version => 1.1.2
        json support => yes
        fastlz support => yes
        zlib support => yes

        Directive => Local Value => Master Value
        couchbase.compression_factor => 1.3 => 1.3
        couchbase.compression_threshold => 2000 => 2000
        couchbase.compressor => none => none
        couchbase.durability_default_poll_interval => 100000 => 100000
        couchbase.durability_default_timeout => 40000000 => 40000000
        couchbase.serializer => php => php
        couchbase.view_timeout => 75 => 75

        php code (http://dpaste.org/WCs3Z/raw/)
        <?php
        $cb = new Couchbase("couchbase1:8091", "customer_mrc", "customer_mrc", "customer_mrc");

        $view = $cb->view("mrc", "Index Latest MRC");

        print_r($view);
        ?>

        Show
        avsej Sergey Avseyev added a comment - Looks like it still relevant <jgillmanjr> Greetings. I'm not sure if this would be the place to get further information, but when trying to make a view call using the PHP client, I get this as an error: php: contrib/http_parser/http_parser.c:422: parse_url_char: Assertion `!((*__ctype_b_loc ()) [(int) ((ch))] & (unsigned short int) _ISspace)' failed. <jgillmanjr> Googling only shows a bug thread that indicates this has been resolved. I'm running the 2.0.4 version of the library and just recompiled the latest source version of the php client "php -i" output ( http://dpaste.org/WGcNG/raw/ ) couchbase couchbase support => enabled version => 1.1.2 json support => yes fastlz support => yes zlib support => yes Directive => Local Value => Master Value couchbase.compression_factor => 1.3 => 1.3 couchbase.compression_threshold => 2000 => 2000 couchbase.compressor => none => none couchbase.durability_default_poll_interval => 100000 => 100000 couchbase.durability_default_timeout => 40000000 => 40000000 couchbase.serializer => php => php couchbase.view_timeout => 75 => 75 php code ( http://dpaste.org/WCs3Z/raw/ ) <?php $cb = new Couchbase("couchbase1:8091", "customer_mrc", "customer_mrc", "customer_mrc"); $view = $cb->view("mrc", "Index Latest MRC"); print_r($view); ?>
        Hide
        avsej Sergey Avseyev added a comment -

        I think it because view named with spaces "Index Latest MRC"

        Show
        avsej Sergey Avseyev added a comment - I think it because view named with spaces "Index Latest MRC"
        Hide
        avsej Sergey Avseyev added a comment -

        closing this back. I've created another ticket PCBC-211

        Show
        avsej Sergey Avseyev added a comment - closing this back. I've created another ticket PCBC-211

          People

          • Assignee:
            trond Trond Norbye
            Reporter:
            daschl Michael Nitschinger
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes