Uploaded image for project: 'Couchbase PHP client library'
  1. Couchbase PHP client library
  2. PCBC-76

Segfaults on view loading

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • None
    • 1.1.0-dp2
    • library
    • Security Level: Public
    • 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

      Attachments

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

        Activity

          People

            trond Trond Norbye
            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

                PagerDuty