Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- root@stack01:~# cat rados_over_ipv6.c
- #include <stdio.h>
- #include "rados/librados.h"
- int main(void) {
- rados_t cluster;
- int r;
- r = rados_create(&cluster, "admin");
- if (r < 0) {
- printf("rados_create failed: %d", r);
- return -1;
- }
- rados_conf_set(cluster, "auth_supported", "cephx");
- rados_conf_set(cluster, "mon_host", "monitor.ceph.widodh.nl");
- rados_conf_set(cluster, "keyring", "/etc/ceph/keyring.bin");
- r = rados_connect(cluster);
- if (r < 0) {
- printf("rados_connect failed: %d", r);
- return -2;
- }
- rados_shutdown(cluster);
- }
- root@stack01:~# gcc -o rados_over_ipv6 rados_over_ipv6.c -lrados -lcrypto
- root@stack01:~# ./rados_over_ipv6
- Floating point exception
- root@stack01:~# gdb ./rados_over_ipv6
- GNU gdb (GDB) 7.1-ubuntu
- Copyright (C) 2010 Free Software Foundation, Inc.
- License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
- This is free software: you are free to change and redistribute it.
- There is NO WARRANTY, to the extent permitted by law. Type "show copying"
- and "show warranty" for details.
- This GDB was configured as "x86_64-linux-gnu".
- For bug reporting instructions, please see:
- <http://www.gnu.org/software/gdb/bugs/>...
- Reading symbols from /root/rados_over_ipv6...(no debugging symbols found)...done.
- (gdb) run
- Starting program: /root/rados_over_ipv6
- [Thread debugging using libthread_db enabled]
- [New Thread 0x7ffff5a1a700 (LWP 23370)]
- [New Thread 0x7ffff5219700 (LWP 23371)]
- [New Thread 0x7ffff4a18700 (LWP 23372)]
- [New Thread 0x7ffff4217700 (LWP 23373)]
- [New Thread 0x7ffff3a16700 (LWP 23374)]
- Program received signal SIGFPE, Arithmetic exception.
- 0x00007ffff7b250b8 in std::string::operator= (this=0x60c9c8) at /usr/include/c++/4.4/bits/basic_string.h:506
- 506 { return this->assign(__str); }
- (gdb) bt
- #0 0x00007ffff7b250b8 in std::string::operator= (this=0x60c9c8) at /usr/include/c++/4.4/bits/basic_string.h:506
- #1 MonClient::_pick_new_mon (this=0x60c9c8) at mon/MonClient.cc:527
- #2 0x00007ffff7b26213 in MonClient::_reopen_session (this=0x60c9c8) at mon/MonClient.cc:547
- #3 0x00007ffff7b273c1 in MonClient::authenticate (this=0x60c9c8, timeout=<value optimized out>) at mon/MonClient.cc:409
- #4 0x00007ffff7a609b6 in librados::RadosClient::connect (this=0x60c6b0) at librados.cc:957
- #5 0x0000000000400825 in main ()
- (gdb)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement