-
Type: Bug
-
Resolution: Cannot Reproduce
-
Priority: Major - P3
-
None
-
Affects Version/s: 1.5.0
-
Component/s: None
-
None
Encountered the following error after successfully executing PHPLIB's WatchFunctionalTest using PHPC 1.5.0 and libmongoc 1.11.0:
$ vendor/bin/phpunit --filter WatchFunc PHPUnit 6.5.8 by Sebastian Bergmann and contributors. ...................... 22 / 22 (100%) Time: 18.24 seconds, Memory: 38.00MB OK (22 tests, 127 assertions) *** Error in `php': double free or corruption (!prev): 0x0000000002f90b30 *** ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f8e0116d7e5] /lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7f8e0117637a] /lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f8e0117a53c] /home/jmikola/bin/php-bin/php-7.2/lib/php/extensions/debug-non-zts-20170718/mongodb.so(+0xcf961)[0x7f8df9ea9961] /home/jmikola/bin/php-bin/php-7.2/lib/php/extensions/debug-non-zts-20170718/mongodb.so(bson_free+0x1c)[0x7f8df9e2964a] /home/jmikola/bin/php-bin/php-7.2/lib/php/extensions/debug-non-zts-20170718/mongodb.so(bson_destroy+0x33)[0x7f8df9e16e49] /home/jmikola/bin/php-bin/php-7.2/lib/php/extensions/debug-non-zts-20170718/mongodb.so(mongoc_client_session_advance_cluster_time+0x9b)[0x7f8df9e433ee] /home/jmikola/bin/php-bin/php-7.2/lib/php/extensions/debug-non-zts-20170718/mongodb.so(_mongoc_client_session_handle_reply+0x194)[0x7f8df9e42cd4] /home/jmikola/bin/php-bin/php-7.2/lib/php/extensions/debug-non-zts-20170718/mongodb.so(+0x7131f)[0x7f8df9e4b31f] /home/jmikola/bin/php-bin/php-7.2/lib/php/extensions/debug-non-zts-20170718/mongodb.so(mongoc_cluster_run_command_monitored+0x194)[0x7f8df9e45bb5] /home/jmikola/bin/php-bin/php-7.2/lib/php/extensions/debug-non-zts-20170718/mongodb.so(+0x654ca)[0x7f8df9e3f4ca] /home/jmikola/bin/php-bin/php-7.2/lib/php/extensions/debug-non-zts-20170718/mongodb.so(_mongoc_client_kill_cursor+0x162)[0x7f8df9e3eb72] /home/jmikola/bin/php-bin/php-7.2/lib/php/extensions/debug-non-zts-20170718/mongodb.so(mongoc_cursor_destroy+0x1d6)[0x7f8df9e59892] /home/jmikola/bin/php-bin/php-7.2/lib/php/extensions/debug-non-zts-20170718/mongodb.so(+0xe9c1d)[0x7f8df9ec3c1d] php(zend_objects_store_del+0x18e)[0xa20ed5] php(_zval_dtor_func+0x110)[0x9c9a52] php[0x9afda0] php(_zval_ptr_dtor+0x29)[0x9b20fc] php[0x803413] php(zend_objects_store_del+0x18e)[0xa20ed5] php(_zval_dtor_func+0x110)[0x9c9a52] php[0xa199ac] php(zend_object_std_dtor+0xc1)[0xa19b49] php(zend_objects_store_del+0x18e)[0xa20ed5] php(_zval_dtor_func+0x110)[0x9c9a52] php[0x9dfbe6] php(zend_array_destroy+0x15d)[0x9e3f8a] php(destroy_op_array+0x63)[0x9b81af] php[0xa08005] php(zend_objects_store_del+0x18e)[0xa20ed5] php(_zval_dtor_func+0x110)[0x9c9a52] php[0x9dfbe6] php(zend_array_destroy+0x11f)[0x9e3f4c] php(_zval_dtor_func+0xba)[0x9c99fc] php[0x9dfbe6] php(zend_array_destroy+0x11f)[0x9e3f4c] php(_zval_dtor_func+0xba)[0x9c99fc] php[0x9dfbe6] php(zend_array_destroy+0x11f)[0x9e3f4c] php(_zval_dtor_func+0xba)[0x9c99fc] php[0xa199ac] php(zend_object_std_dtor+0xc1)[0xa19b49] php(zend_objects_store_del+0x18e)[0xa20ed5] php(_zval_dtor_func+0x110)[0x9c9a52] php[0x9afda0] php(_zval_ptr_dtor+0x29)[0x9b20fc] /home/jmikola/bin/php-bin/php-7.2/lib/php/extensions/debug-non-zts-20170718/mongodb.so(+0xfc601)[0x7f8df9ed6601] php(zend_objects_store_del+0x18e)[0xa20ed5] php(_zval_dtor_func+0x110)[0x9c9a52] php[0x9dfbe6] php(zend_array_destroy+0x11f)[0x9e3f4c] php(_zval_dtor_func+0xba)[0x9c99fc] php[0x9dfbe6] php(zend_array_destroy+0x11f)[0x9e3f4c] php(_zval_dtor_func+0xba)[0x9c99fc] php[0x9c9931] php(_zval_dtor_func+0x14a)[0x9c9a8c] php[0x9dfbe6] php(zend_array_destroy+0x15d)[0x9e3f8a] php(destroy_op_array+0x63)[0x9b81af] php[0xa08005] php(zend_objects_store_free_object_storage+0x181)[0xa20bca] php[0x9b0cc1] ======= Memory map: ======== ... Aborted (core dumped)
Backtrace:
(gdb) bt #0 0x00007fbd6a64ddc3 in mongoc_cmd_parts_assemble (parts=0x7ffe4da198d0, server_stream=0x20297e0, error=0x0) at /tmp/pear/temp/mongodb/src/libmongoc/src/libmongoc/src/mongoc/mongoc-cmd.c:853 #1 0x00007fbd6a63f4a6 in _mongoc_client_killcursors_command (cluster=0x20292c8, server_stream=0x20297e0, cursor_id=7401453453944793374, db=0x7ffe4da19be0 "phplib_test", collection=0x2033730 "WatchFunctionalTest.213d0aaf", cs=0x2031ad0) at /tmp/pear/temp/mongodb/src/libmongoc/src/libmongoc/src/mongoc/mongoc-client.c:2290 #2 0x00007fbd6a63eb72 in _mongoc_client_kill_cursor (client=0x20292c0, server_id=1, cursor_id=7401453453944793374, operation_id=0, db=0x7ffe4da19be0 "phplib_test", collection=0x2033730 "WatchFunctionalTest.213d0aaf", cs=0x2031ad0) at /tmp/pear/temp/mongodb/src/libmongoc/src/libmongoc/src/mongoc/mongoc-client.c:2071 #3 0x00007fbd6a659892 in mongoc_cursor_destroy (cursor=0x2033660) at /tmp/pear/temp/mongodb/src/libmongoc/src/libmongoc/src/mongoc/mongoc-cursor.c:587 #4 0x00007fbd6a6c3c1d in php_phongo_cursor_free_object (object=0x7fbd66deb4a8) at /tmp/pear/temp/mongodb/src/MongoDB/Cursor.c:398 #5 0x0000000000a20ed5 in zend_objects_store_del (object=0x7fbd66deb4a8) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_objects_API.c:187 #6 0x00000000009c9a52 in _zval_dtor_func (p=0x7fbd66deb4a8, __zend_filename=0x11c7ef0 "/tmp/build_php-7.2.0.jjV/php-7.2.0/ext/spl/spl_iterators.c", __zend_lineno=2315) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_variables.c:56 #7 0x00000000009afda0 in i_zval_ptr_dtor (zval_ptr=0x7fbd66dbcee0, __zend_filename=0x11c7ef0 "/tmp/build_php-7.2.0.jjV/php-7.2.0/ext/spl/spl_iterators.c", __zend_lineno=2315) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_variables.h:49 #8 0x00000000009b20fc in _zval_ptr_dtor (zval_ptr=0x7fbd66dbcee0, __zend_filename=0x11c7ef0 "/tmp/build_php-7.2.0.jjV/php-7.2.0/ext/spl/spl_iterators.c", __zend_lineno=2315) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_execute_API.c:530 #9 0x0000000000803413 in spl_dual_it_free_storage (_object=0x7fbd66dbcf70) at /tmp/build_php-7.2.0.jjV/php-7.2.0/ext/spl/spl_iterators.c:2315 #10 0x0000000000a20ed5 in zend_objects_store_del (object=0x7fbd66dbcf70) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_objects_API.c:187 #11 0x00000000009c9a52 in _zval_dtor_func (p=0x7fbd66dbcf70, __zend_filename=0x1214dd8 "/tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_objects.c", __zend_lineno=58) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_variables.c:56 #12 0x0000000000a199ac in i_zval_ptr_dtor (zval_ptr=0x7fbd67bf3048, __zend_filename=0x1214dd8 "/tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_objects.c", __zend_lineno=58) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_variables.h:49 #13 0x0000000000a19b49 in zend_object_std_dtor (object=0x7fbd67bf3000) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_objects.c:58 #14 0x0000000000a20ed5 in zend_objects_store_del (object=0x7fbd67bf3000) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_objects_API.c:187 #15 0x00000000009c9a52 in _zval_dtor_func (p=0x7fbd67bf3000, __zend_filename=0x1210500 "/tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_hash.c", __zend_lineno=1308) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_variables.c:56 #16 0x00000000009dfbe6 in i_zval_ptr_dtor (zval_ptr=0x7fbd66deb660, __zend_filename=0x1210500 "/tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_hash.c", __zend_lineno=1308) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_variables.h:49 #17 0x00000000009e3f8a in zend_array_destroy (ht=0x7fbd66de2840) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_hash.c:1308 #18 0x00000000009b81af in destroy_op_array (op_array=0x7fbd66de8938) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_opcode.c:380 #19 0x0000000000a08005 in zend_closure_free_storage (object=0x7fbd66de8900) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_closures.c:447 #20 0x0000000000a20ed5 in zend_objects_store_del (object=0x7fbd66de8900) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_objects_API.c:187 #21 0x00000000009c9a52 in _zval_dtor_func (p=0x7fbd66de8900, __zend_filename=0x1210500 "/tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_hash.c", __zend_lineno=1304) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_variables.c:56 #22 0x00000000009dfbe6 in i_zval_ptr_dtor (zval_ptr=0x7fbd66defec8, __zend_filename=0x1210500 "/tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_hash.c", __zend_lineno=1304) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_variables.h:49 #23 0x00000000009e3f4c in zend_array_destroy (ht=0x7fbd66df09c0) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_hash.c:1304 #24 0x00000000009c99fc in _zval_dtor_func (p=0x7fbd66df09c0, __zend_filename=0x1210500 "/tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_hash.c", __zend_lineno=1304) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_variables.c:43 #25 0x00000000009dfbe6 in i_zval_ptr_dtor (zval_ptr=0x7fbd66defe40, __zend_filename=0x1210500 "/tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_hash.c", __zend_lineno=1304) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_variables.h:49 #26 0x00000000009e3f4c in zend_array_destroy (ht=0x7fbd66df0ae0) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_hash.c:1304 #27 0x00000000009c99fc in _zval_dtor_func (p=0x7fbd66df0ae0, __zend_filename=0x1210500 "/tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_hash.c", __zend_lineno=1304) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_variables.c:43 #28 0x00000000009dfbe6 in i_zval_ptr_dtor (zval_ptr=0x7fbd66db4388, __zend_filename=0x1210500 "/tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_hash.c", __zend_lineno=1304) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_variables.h:49 #29 0x00000000009e3f4c in zend_array_destroy (ht=0x7fbd66df66c0) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_hash.c:1304 #30 0x00000000009c99fc in _zval_dtor_func (p=0x7fbd66df66c0, __zend_filename=0x1214dd8 "/tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_objects.c", __zend_lineno=58) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_variables.c:43 #31 0x0000000000a199ac in i_zval_ptr_dtor (zval_ptr=0x7fbd66de44f8, __zend_filename=0x1214dd8 "/tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_objects.c", __zend_lineno=58) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_variables.h:49 #32 0x0000000000a19b49 in zend_object_std_dtor (object=0x7fbd66de4480) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_objects.c:58 #33 0x0000000000a20ed5 in zend_objects_store_del (object=0x7fbd66de4480) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_objects_API.c:187 #34 0x00000000009c9a52 in _zval_dtor_func (p=0x7fbd66de4480, __zend_filename=0x7fbd6a6f8d40 "/tmp/pear/temp/mongodb/src/MongoDB/Monitoring/CommandFailedEvent.c", __zend_lineno=198) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_variables.c:56 #35 0x00000000009afda0 in i_zval_ptr_dtor (zval_ptr=0x7fbd66c697b8, __zend_filename=0x7fbd6a6f8d40 "/tmp/pear/temp/mongodb/src/MongoDB/Monitoring/CommandFailedEvent.c", __zend_lineno=198) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_variables.h:49 #36 0x00000000009b20fc in _zval_ptr_dtor (zval_ptr=0x7fbd66c697b8, __zend_filename=0x7fbd6a6f8d40 "/tmp/pear/temp/mongodb/src/MongoDB/Monitoring/CommandFailedEvent.c", __zend_lineno=198) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_execute_API.c:530 #37 0x00007fbd6a6d6601 in php_phongo_commandfailedevent_free_object (object=0x7fbd66c697c8) at /tmp/pear/temp/mongodb/src/MongoDB/Monitoring/CommandFailedEvent.c:198 #38 0x0000000000a20ed5 in zend_objects_store_del (object=0x7fbd66c697c8) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_objects_API.c:187 #39 0x00000000009c9a52 in _zval_dtor_func (p=0x7fbd66c697c8, __zend_filename=0x1210500 "/tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_hash.c", __zend_lineno=1304) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_variables.c:56 #40 0x00000000009dfbe6 in i_zval_ptr_dtor (zval_ptr=0x7fbd66df3480, __zend_filename=0x1210500 "/tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_hash.c", __zend_lineno=1304) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_variables.h:49 #41 0x00000000009e3f4c in zend_array_destroy (ht=0x7fbd66df6240) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_hash.c:1304 #42 0x00000000009c99fc in _zval_dtor_func (p=0x7fbd66df6240, __zend_filename=0x1210500 "/tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_hash.c", __zend_lineno=1304) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_variables.c:43 #43 0x00000000009dfbe6 in i_zval_ptr_dtor (zval_ptr=0x7fbd66dcfb08, __zend_filename=0x1210500 "/tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_hash.c", __zend_lineno=1304) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_variables.h:49 #44 0x00000000009e3f4c in zend_array_destroy (ht=0x7fbd66df6900) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_hash.c:1304 #45 0x00000000009c99fc in _zval_dtor_func (p=0x7fbd66df6900, __zend_filename=0x1210500 "/tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_hash.c", __zend_lineno=1308) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_variables.c:43 #46 0x00000000009c9931 in i_zval_ptr_dtor (zval_ptr=0x7fbd66d9bb30, __zend_filename=0x1210500 "/tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_hash.c", __zend_lineno=1308) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_variables.h:49 #47 0x00000000009c9a8c in _zval_dtor_func (p=0x7fbd66d9bb28, __zend_filename=0x1210500 "/tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_hash.c", __zend_lineno=1308) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_variables.c:69 #48 0x00000000009dfbe6 in i_zval_ptr_dtor (zval_ptr=0x7fbd66df2ba0, __zend_filename=0x1210500 "/tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_hash.c", __zend_lineno=1308) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_variables.h:49 #49 0x00000000009e3f8a in zend_array_destroy (ht=0x7fbd66df69c0) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_hash.c:1308 #50 0x00000000009b81af in destroy_op_array (op_array=0x7fbd66de87b8) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_opcode.c:380 #51 0x0000000000a08005 in zend_closure_free_storage (object=0x7fbd66de8780) at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_closures.c:447 #52 0x0000000000a20bca in zend_objects_store_free_object_storage (objects=0x15ecef8 <executor_globals+824>, fast_shutdown=0 '\000') at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_objects_API.c:120 #53 0x00000000009b0cc1 in shutdown_executor () at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend_execute_API.c:265 #54 0x00000000009cc41d in zend_deactivate () at /tmp/build_php-7.2.0.jjV/php-7.2.0/Zend/zend.c:1036 #55 0x0000000000930289 in php_request_shutdown (dummy=0x0) at /tmp/build_php-7.2.0.jjV/php-7.2.0/main/main.c:1906 #56 0x0000000000ac1364 in do_cli (argc=4, argv=0x1e658a0) at /tmp/build_php-7.2.0.jjV/php-7.2.0/sapi/cli/php_cli.c:1178 #57 0x0000000000ac1bd2 in main (argc=4, argv=0x1e658a0) at /tmp/build_php-7.2.0.jjV/php-7.2.0/sapi/cli/php_cli.c:1404
- related to
-
PHPLIB-432 Replica set CI build fails due to freeing invalid pointer on shutdown
- Closed
-
PHPC-1541 Investigate double-free on shutdown when closing open cursors
- Backlog