Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-556

Segfault while freeing mongoc resources during shutdown

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor - P4
    • Resolution: Duplicate
    • 1.1.2
    • 1.1.5
    • None
    • None
    • php7

    Description

      (gdb) bt
      #0  zend_mm_free_heap (ptr=<value optimized out>) at /data/wwwroot/source_code/php-7.0.2/Zend/zend_alloc.c:1400
      #1  _efree (ptr=<value optimized out>) at /data/wwwroot/source_code/php-7.0.2/Zend/zend_alloc.c:2458
      #2  0x00002aefe8319ef5 in _mongoc_counters_cleanup () at /data/wwwroot/swoole_server/extensions/mongo/mongodb-1.1.2/src/libmongoc/src/mongoc/mongoc-counters.c:132
      #3  0x0000003154a0c1d3 in pthread_once () from /lib64/libpthread.so.0
      #4  0x00002aefe82e979f in __do_global_dtors_aux () from /usr/local/php7/lib/php/extensions/no-debug-non-zts-20151012/mongodb.so
      #5  0x000000001c0a6550 in ?? ()
      #6  0x00007fff5629f8a0 in ?? ()
      #7  0x00002aefe8340c91 in _fini () from /usr/local/php7/lib/php/extensions/no-debug-non-zts-20151012/mongodb.so
      #8  0x00007fff5629f8a0 in ?? ()
      #9  0x0000003153e0da94 in _dl_fini () from /lib64/ld-linux-x86-64.so.2
      Backtrace stopped: previous frame inner to this frame (corrupt stack?)
      (gdb) f 0
      #0  zend_mm_free_heap (ptr=<value optimized out>) at /data/wwwroot/source_code/php-7.0.2/Zend/zend_alloc.c:1400
      1400			ZEND_MM_CHECK(chunk->heap == heap, "zend_mm_heap corrupted");
      (gdb) f 2
      #2  0x00002aefe8319ef5 in _mongoc_counters_cleanup () at /data/wwwroot/swoole_server/extensions/mongo/mongodb-1.1.2/src/libmongoc/src/mongoc/mongoc-counters.c:132
      132	/data/wwwroot/swoole_server/extensions/mongo/mongodb-1.1.2/src/libmongoc/src/mongoc/mongoc-counters.c: No such file or directory.
      	in /data/wwwroot/swoole_server/extensions/mongo/mongodb-1.1.2/src/libmongoc/src/mongoc/mongoc-counters.c
      (gdb) 
      

      Attachments

        Issue Links

          Activity

            People

              jmikola@mongodb.com Jeremy Mikola
              JsonChen JsonChen [X]
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: