Uploaded image for project: 'PHP Driver: Library'
  1. PHP Driver: Library
  2. PHPLIB-432

Replica set CI build fails due to freeing invalid pointer on shutdown

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.6.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Environment:
      Driver: 1.6.0alpha1
      OS: Ubuntu 16.04
      Server: Replica set with MongoDB 4.0.9

      See: https://travis-ci.org/mongodb/mongo-php-library/jobs/533836053

      The replica set environment in PHPLIB's Travis CI recently started displaying sporadic failures after upgrading to PHP 7.3. It's not clear if this is an issue with PHPC, libmongoc, or PHP itself, but I'm opening this issue to track it.

      The error occurs after an otherwise successful test suite execution:

      OK, but incomplete, skipped, or risky tests!
      Tests: 2258, Assertions: 6700, Skipped: 4, Risky: 3.
      *** Error in `php': free(): invalid pointer: 0x0000000003a35700 ***
      ======= Backtrace: =========
      /lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f3d385d17e5]
      /lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7f3d385da37a]
      /lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f3d385de53c]
      /home/travis/.phpenv/versions/7.3.2/lib/php/extensions/no-debug-zts-20180731/mongodb.so(bson_destroy+0x3c)[0x7f3d30bec12c]
      /home/travis/.phpenv/versions/7.3.2/lib/php/extensions/no-debug-zts-20180731/mongodb.so(mongoc_client_session_advance_cluster_time+0xd0)[0x7f3d30c09d10]
      /home/travis/.phpenv/versions/7.3.2/lib/php/extensions/no-debug-zts-20180731/mongodb.so(_mongoc_client_session_handle_reply+0x176)[0x7f3d30c0a066]
      /home/travis/.phpenv/versions/7.3.2/lib/php/extensions/no-debug-zts-20180731/mongodb.so(+0x5ad09)[0x7f3d30c0bd09]
      /home/travis/.phpenv/versions/7.3.2/lib/php/extensions/no-debug-zts-20180731/mongodb.so(mongoc_cluster_run_command_monitored+0xef)[0x7f3d30c0c88f]
      /home/travis/.phpenv/versions/7.3.2/lib/php/extensions/no-debug-zts-20180731/mongodb.so(+0x53695)[0x7f3d30c04695]
      /home/travis/.phpenv/versions/7.3.2/lib/php/extensions/no-debug-zts-20180731/mongodb.so(_mongoc_client_kill_cursor+0x111)[0x7f3d30c06c31]
      /home/travis/.phpenv/versions/7.3.2/lib/php/extensions/no-debug-zts-20180731/mongodb.so(mongoc_cursor_destroy+0x1bf)[0x7f3d30c1a05f]
      /home/travis/.phpenv/versions/7.3.2/lib/php/extensions/no-debug-zts-20180731/mongodb.so(+0xb080f)[0x7f3d30c6180f]
      php(zend_objects_store_free_object_storage+0x5a)[0x98a5aa]
      php[0x93e374]
      php(zend_deactivate+0xb7)[0x94f8b7]
      php(php_request_shutdown+0x447)[0x8dece7]
      php[0x9e9e83]
      php[0x46522a]
      /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f3d3857a830]
      php(_start+0x29)[0x465929]
      

            Assignee:
            andreas.braun@mongodb.com Andreas Braun
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: