Actions
Bug #1034
closedlibrados: Calling connect twice causes a segfault
% Done:
0%
Spent time:
Source:
Tags:
Backport:
Regression:
Severity:
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
While working on phprados I called rados.connect() twice by accident, this resulted in:
wido@wido-desktop:~/repos/phprados$ php testrados.php mon/MonMap.h: In function 'void MonMap::add(const std::string&, const entity_addr_t&)', in thread '0x7f42620ba720' mon/MonMap.h: 77: FAILED assert(mon_addr.count(name) == 0) mon/MonMap.h: In function 'void MonMap::add(const std::string&, const entity_addr_t&)', in thread '0x7f42620ba720' mon/MonMap.h: 77: FAILED assert(mon_addr.count(name) == 0) ceph version 0.27 (commit:793034c62c8e9ffab4af675ca97135fd1b193c9c) 1: (MonClient::build_initial_monmap()+0xc11) [0x7f4258b0d181] 2: (librados::RadosClient::connect()+0x20) [0x7f4258a43530] 3: (zim_Rados_connect(int, _zval_struct*, _zval_struct**, _zval_struct*, int)+0x15) [0x7f4258d94a25] 4: php() [0x6e7caa] 5: (execute()+0x210) [0x6bef90] 6: (zend_execute_scripts()+0x15d) [0x696bad] 7: (php_execute_script()+0x1d8) [0x6427a8] 8: php() [0x727dc6] 9: (__libc_start_main()+0xfd) [0x7f425f397c4d] 10: php() [0x42c6a9] ceph version 0.27 (commit:793034c62c8e9ffab4af675ca97135fd1b193c9c) 1: (MonClient::build_initial_monmap()+0xc11) [0x7f4258b0d181] 2: (librados::RadosClient::connect()+0x20) [0x7f4258a43530] 3: (zim_Rados_connect(int, _zval_struct*, _zval_struct**, _zval_struct*, int)+0x15) [0x7f4258d94a25] 4: php() [0x6e7caa] 5: (execute()+0x210) [0x6bef90] 6: (zend_execute_scripts()+0x15d) [0x696bad] 7: (php_execute_script()+0x1d8) [0x6427a8] 8: php() [0x727dc6] 9: (__libc_start_main()+0xfd) [0x7f425f397c4d] 10: php() [0x42c6a9] ceph version 0.27 (commit:793034c62c8e9ffab4af675ca97135fd1b193c9c) 1: (MonClient::build_initial_monmap()+0xc11) [0x7f4258b0d181] 2: (librados::RadosClient::connect()+0x20) [0x7f4258a43530] 3: (zim_Rados_connect(int, _zval_struct*, _zval_struct**, _zval_struct*, int)+0x15) [0x7f4258d94a25] 4: php() [0x6e7caa] 5: (execute()+0x210) [0x6bef90] 6: (zend_execute_scripts()+0x15d) [0x696bad] 7: (php_execute_script()+0x1d8) [0x6427a8] 8: php() [0x727dc6] 9: (__libc_start_main()+0xfd) [0x7f425f397c4d] 10: php() [0x42c6a9] ceph version 0.27 (commit:793034c62c8e9ffab4af675ca97135fd1b193c9c) 1: (MonClient::build_initial_monmap()+0xc11) [0x7f4258b0d181] 2: (librados::RadosClient::connect()+0x20) [0x7f4258a43530] 3: (zim_Rados_connect(int, _zval_struct*, _zval_struct**, _zval_struct*, int)+0x15) [0x7f4258d94a25] 4: php() [0x6e7caa] 5: (execute()+0x210) [0x6bef90] 6: (zend_execute_scripts()+0x15d) [0x696bad] 7: (php_execute_script()+0x1d8) [0x6427a8] 8: php() [0x727dc6] 9: (__libc_start_main()+0xfd) [0x7f425f397c4d] 10: php() [0x42c6a9] terminate called after throwing an instance of 'ceph::FailedAssertion' Aborted wido@wido-desktop:~/repos/phprados$
I know the "old" librados had the same issue with calling initialize double, a simple booling 'initialized' solved it.
Anyway, librados should not go down like this when calling connect twice.
Actions