Advertisement
Guest User

Untitled

a guest
Jan 6th, 2012
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.31 KB | None | 0 0
  1. root@stack01:~# cat rados_over_ipv6.c
  2. #include <stdio.h>
  3. #include "rados/librados.h"
  4.  
  5. int main(void) {
  6.  
  7. rados_t cluster;
  8.  
  9. int r;
  10.  
  11. r = rados_create(&cluster, "admin");
  12. if (r < 0) {
  13. printf("rados_create failed: %d", r);
  14. return -1;
  15. }
  16.  
  17. rados_conf_set(cluster, "auth_supported", "cephx");
  18. rados_conf_set(cluster, "mon_host", "monitor.ceph.widodh.nl");
  19. rados_conf_set(cluster, "keyring", "/etc/ceph/keyring.bin");
  20.  
  21. r = rados_connect(cluster);
  22. if (r < 0) {
  23. printf("rados_connect failed: %d", r);
  24. return -2;
  25. }
  26.  
  27. rados_shutdown(cluster);
  28.  
  29. }
  30. root@stack01:~# gcc -o rados_over_ipv6 rados_over_ipv6.c -lrados -lcrypto
  31. root@stack01:~# ./rados_over_ipv6
  32. Floating point exception
  33. root@stack01:~# gdb ./rados_over_ipv6
  34. GNU gdb (GDB) 7.1-ubuntu
  35. Copyright (C) 2010 Free Software Foundation, Inc.
  36. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  37. This is free software: you are free to change and redistribute it.
  38. There is NO WARRANTY, to the extent permitted by law. Type "show copying"
  39. and "show warranty" for details.
  40. This GDB was configured as "x86_64-linux-gnu".
  41. For bug reporting instructions, please see:
  42. <http://www.gnu.org/software/gdb/bugs/>...
  43. Reading symbols from /root/rados_over_ipv6...(no debugging symbols found)...done.
  44. (gdb) run
  45. Starting program: /root/rados_over_ipv6
  46. [Thread debugging using libthread_db enabled]
  47. [New Thread 0x7ffff5a1a700 (LWP 23370)]
  48. [New Thread 0x7ffff5219700 (LWP 23371)]
  49. [New Thread 0x7ffff4a18700 (LWP 23372)]
  50. [New Thread 0x7ffff4217700 (LWP 23373)]
  51. [New Thread 0x7ffff3a16700 (LWP 23374)]
  52.  
  53. Program received signal SIGFPE, Arithmetic exception.
  54. 0x00007ffff7b250b8 in std::string::operator= (this=0x60c9c8) at /usr/include/c++/4.4/bits/basic_string.h:506
  55. 506 { return this->assign(__str); }
  56. (gdb) bt
  57. #0 0x00007ffff7b250b8 in std::string::operator= (this=0x60c9c8) at /usr/include/c++/4.4/bits/basic_string.h:506
  58. #1 MonClient::_pick_new_mon (this=0x60c9c8) at mon/MonClient.cc:527
  59. #2 0x00007ffff7b26213 in MonClient::_reopen_session (this=0x60c9c8) at mon/MonClient.cc:547
  60. #3 0x00007ffff7b273c1 in MonClient::authenticate (this=0x60c9c8, timeout=<value optimized out>) at mon/MonClient.cc:409
  61. #4 0x00007ffff7a609b6 in librados::RadosClient::connect (this=0x60c6b0) at librados.cc:957
  62. #5 0x0000000000400825 in main ()
  63. (gdb)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement